[RQt-devel] meaning of qstrWidth() in qtpaint
Yihui Xie
xie at yihui.name
Fri Sep 3 23:38:24 CEST 2010
That would be perfect. We can focus on data then. Thanks a lot!
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
On Fri, Sep 3, 2010 at 4:34 PM, Michael Lawrence
<lawrence.michael at gene.com> wrote:
>
>
> On Fri, Sep 3, 2010 at 2:05 PM, Yihui Xie <xie at yihui.name> wrote:
>>
>> Hi all,
>>
>> What is the 'frame of reference' when we calculating the width of a
>> string using qstrWidth()?
>
> It only returns a width in item (data) coordinates. There is no concept of
> position. But if you did draw it at (1,1) with horizontal centering, then
> the right X boundary would be 2.
>
>>
>> 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
>> _______________________________________________
>> Qtinterfaces-devel mailing list
>> Qtinterfaces-devel at lists.r-forge.r-project.org
>>
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel
>
>
More information about the Qtinterfaces-devel
mailing list