[RQt-devel] meaning of qstrWidth() in qtpaint

Yihui Xie xie at yihui.name
Fri Sep 3 23:05:40 CEST 2010


Hi all,

What is the 'frame of reference' when we calculating the width of a
string using qstrWidth()? For example, if the string "Hello World" is
centered at (1,1) with width 2 while the limits of the corresponding
layer are qrect(0, 0, 20, 10) (I mean the 'limits' argument in
qlayer(); not geometry), what is the x-coordinate of the point which
lies exactly on the right edge of that string? Thanks!

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


More information about the Qtinterfaces-devel mailing list