<br><br><div class="gmail_quote">On Thu, Nov 11, 2010 at 10:27 PM, Michael Lawrence <span dir="ltr"><<a href="mailto:lawrence.michael@gene.com">lawrence.michael@gene.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div class="im">On Thu, Nov 11, 2010 at 7:32 PM, Tengfei Yin <span dir="ltr"><<a href="mailto:yintengfei@gmail.com" target="_blank">yintengfei@gmail.com</a>></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">
So even when you use view$rotate(), the text direction won't change..is this also what we expected to see?<div><br></div></blockquote></div><div><br>Yes. I can see how that may not always be desirable, but it would be tough to work around it. That is, I cannot tease out the rotation from the rest of the transformation. In the case of a word cloud, I think it would be desirable, i.e., one is thinking of the text as glyphs that are independent of the scales.<br>
<br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div></div><div>and by the way, do you know any way to change to text size, the use case here is sth like "tag cloud", but I guess I can draw text as path to solve this problem.<div>
<div></div><div><br></div></div></div></blockquote></div><div><br>Just change the font.. do you want some sort of vectorized "cex" argument to qdrawText? Might not be that hard to add.<br></div></div></blockquote>
<div><br></div><div>Yes, if you don't mind spend some time on it, it will be really nice to have a control over the text size, e.g. when I plot a sequence data, like ACTGGGC....I can resize one single character to address the mis-alignment.</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div><font color="#888888"><br>Michael<br> <br>
</font></div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div><div>
<br><div class="gmail_quote">On Thu, Nov 11, 2010 at 6:14 PM, Tengfei Yin <span dir="ltr"><<a href="mailto:yintengfei@gmail.com" target="_blank">yintengfei@gmail.com</a>></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">
<br><br><div class="gmail_quote"><div>On Thu, Nov 11, 2010 at 5:39 PM, Michael Lawrence <span dir="ltr"><<a href="mailto:lawrence.michael@gene.com" target="_blank">lawrence.michael@gene.com</a>></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">
This is by design. If this didn't work that way, then when the user zoomed into a chromosome, for example, the text labels would get really stretched out. Glyphs are the same way (they're essentially fancy characters). Zooming into a scatterplot should not make the glyphs larger. Circles (after much debate inside my head) behave the same as glyphs. This is because their radius, like in a bubble plot, is derived from something other than the X and Y axes.<br>
<br>Shapes however, like rectangles, polygons and paths, are zoomed. You expect a mosaic plot rectangle or a map polygon to scale with the plot. <br><br></blockquote><div> </div></div><div>This make sense to me, in most cases, i guess people won't expect the circle or text to be zoomed in.</div>
<div>
<div><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">Are you sure you really need the text to scale with the zoom? Deepayan and I decided a long time ago that zooming does not behave like a "magnifying glass." It rescales the plot. <br>
<br></blockquote><div><br></div></div><div>No, you don't have to change that, it's convenient so far, I am just curious why this doesn't work for text and circle, because in other rare case, I will draw very small text as labels of axis for one circular track, or if I draw points around the circular track, I am still expecting the points will be zoomed in when I rescale the view. I guess I am confused the "rescale of the view" with the one you defined with Deepayan, but it make sense to me.</div>
<div>
<div><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">There are some ways to get around this if you really want to:<br>- Draw the text as a path.<br>
- Use the "render" method on the scene to render to a QPicture, rescale that and display it. This is how I imagined someone making a magnifying glass. QPicture is a vectorized representation, so no nasty scaling artifacts are introduced.<br>
</blockquote><div><br></div></div><div>Thanks, I think I need to do it in this way, if I really need them to be rescaled. I never try QPicture before, I will take a look at it.</div><div><div></div><div><div>
<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<br>Michael<br><br><div class="gmail_quote"><div><div></div><div>On Thu, Nov 11, 2010 at 3:24 PM, Tengfei Yin <span dir="ltr"><<a href="mailto:yintengfei@gmail.com" target="_blank">yintengfei@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div>
Hi <div><br></div><div>Here comes another question with text, please see the attached code below, only rect could be resized, when I call v$scale()</div><div><br></div><div>text, circle doesn't change. it happens to visnab, the circular view, when I scale the view, every thing resize but the text, it's still in the same size.<br>
<div><br></div><div><div>library(qtpaint)</div><div>s <- qscene()</div><div>test_layer <- qlayer(s,function(layer,painter){</div><div> qdrawRect(painter,30,30,70,70,stroke="blue")</div><div> qdrawCircle(painter,50,50,20,stroke="red")</div>
<div> qdrawText(painter,"TEST",50,50)</div><div>},limits=qrect(0,0,100,100))</div><div>v <- qplotView(s)</div><div>v$show()</div><div><br></div><div>v$scale(1.5,1.5)</div><div><br></div>Thanks</div><div><br>
</div><div>Tengfei<br>-- <br>Tengfei Yin<br>MCDB PhD student <br>1620 Howe Hall, 2274,<br>Iowa State University<br>Ames, IA,50011-2274<br>Homepage: <a href="http://www.tengfei.name" target="_blank">www.tengfei.name</a><br>
<div><br></div><br>
</div></div>
<br></div></div>_______________________________________________<br>
Qtinterfaces-devel mailing list<br>
<a href="mailto:Qtinterfaces-devel@lists.r-forge.r-project.org" target="_blank">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>
<br></blockquote></div><br>
</blockquote></div></div></div><div><div></div><div><br><br clear="all"><br>-- <br>Tengfei Yin<br>MCDB PhD student <br>1620 Howe Hall, 2274,<br>Iowa State University<br>Ames, IA,50011-2274<br>Homepage: <a href="http://www.tengfei.name" target="_blank">www.tengfei.name</a><br>
<div><br></div><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Tengfei Yin<br>MCDB PhD student <br>1620 Howe Hall, 2274,<br>Iowa State University<br>Ames, IA,50011-2274<br>Homepage: <a href="http://www.tengfei.name" target="_blank">www.tengfei.name</a><br>
<div><br></div><br>
</div></div></div>
<br>_______________________________________________<br>
Qtinterfaces-devel mailing list<br>
<a href="mailto:Qtinterfaces-devel@lists.r-forge.r-project.org" target="_blank">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>
<br></blockquote></div></div></div><br>
</blockquote></div><br><br clear="all"><br>-- <br>Tengfei Yin<br>MCDB PhD student <br>1620 Howe Hall, 2274,<br>Iowa State University<br>Ames, IA,50011-2274<br>Homepage: <a href="http://www.tengfei.name" target="_blank">www.tengfei.name</a><br>
<div><br></div><br>