<br><br><div class="gmail_quote">On Fri, Sep 3, 2010 at 2:05 PM, Yihui Xie <span dir="ltr">&lt;<a href="mailto:xie@yihui.name">xie@yihui.name</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi all,<br>
<br>
What is the &#39;frame of reference&#39; when we calculating the width of a<br>
string using qstrWidth()?</blockquote><div><br>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.<br>
 <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> For example, if the string &quot;Hello World&quot; is<br>
centered at (1,1) with width 2 while the limits of the corresponding<br>
layer are qrect(0, 0, 20, 10) (I mean the &#39;limits&#39; argument in<br>
qlayer(); not geometry), what is the x-coordinate of the point which<br>
lies exactly on the right edge of that string? Thanks!<br>
<br>
Regards,<br>
Yihui<br>
--<br>
<font color="#888888">Yihui Xie &lt;<a href="mailto:xieyihui@gmail.com">xieyihui@gmail.com</a>&gt;<br>
Phone: 515-294-2465 Web: <a href="http://yihui.name" target="_blank">http://yihui.name</a><br>
Department of Statistics, Iowa State University<br>
2215 Snedecor Hall, Ames, IA<br>
_______________________________________________<br>
Qtinterfaces-devel mailing list<br>
<a href="mailto:Qtinterfaces-devel@lists.r-forge.r-project.org">Qtinterfaces-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel</a><br>
</font></blockquote></div><br>