<br><br><div class="gmail_quote">On Fri, Nov 12, 2010 at 2:42 PM, Michael Lawrence <span dir="ltr"><<a href="mailto:michafla@gene.com">michafla@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;">
<br><br><div class="gmail_quote"><div class="im">On Fri, Nov 12, 2010 at 2:13 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 Fri, Nov 12, 2010 at 3:27 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;">
<br><br><div class="gmail_quote"><div>On Fri, Nov 12, 2010 at 8:59 AM, 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 Fri, Nov 12, 2010 at 7:09 AM, 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;">
<br><br><div class="gmail_quote"><div>On Thu, Nov 11, 2010 at 9:35 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 10:27 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;">
<br><br><div class="gmail_quote"><div>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><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><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>
</div></blockquote></div><div><br>You mean like a sequence logo plot, based on the counts of each base? Sweet idea. The feature is committed, have fun.<br></div></div></blockquote><div><br></div></div><div>Yes, I plan to do sth like this~the problem of this kind of graphic is that, no problem showing as a single plot, but when showing along a shot-read alighment, due to resale of all the text, even a single size change of one base will make it hard to align a single sequence with other "normal" text. I will work around this to see if I have some problem. </div>
<div><br></div></div></blockquote></div><div><br>Text glyphs could be scaled differently in the horizontal and vertical. Would this help with this issue? That is, you could stretch the letters vertically.<br></div></div>
</blockquote><div><br></div></div><div>Do you mean sth that is already in qtpaint?</div></div></blockquote></div><div><br>No it's not there yet but it would be easy to support it. Right now 'cex' causes a symmetric scale; it does not need to be that way. I will add it.<br>
<br></div></div></blockquote><div><br><br>I added support for this. Just specify the 'vcex' parameter instead of 'cex' to expand only in the vertical direction.<br> <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;">
<div class="gmail_quote"><div> <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 class="gmail_quote"><div> it's not in qdrawText(), and the qglyphText has no such a parameter, do you suggest me to create text as path and use qdrawPath to plot those stuff?? and by the way, in the qt document, </div>
void QFont::setStretch ( int factor )<br><div>only set width of character. How can I specify whether to stretch it vertically or horizontally? Or do you mean doing sth like transformation?</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;"><div class="gmail_quote"><div><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 class="gmail_quote"><div></div><div>Btw: any idea where is globalPos(), I try to use tooltip associated with locate() function to do this:when mouse over on exon, show the id, but I can only find pos, based on the documentation, it looks like I need to get globalPos..of course I have alternative workaround instead of using QToolTip.</div>
<div><br></div></div></blockquote></div><div><br>I'm not sure I follow. Are you talking about globalPos() on the event object? That is global screen position, not even relative to the window, so you would need to be careful to adjust it.<br>
</div></div></blockquote><div><br></div></div><div>Yes, I can not find globalPos() on event object? </div></div></blockquote></div><div><br>What about screenPos()?<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 class="gmail_quote"><div>and I think you are right, I guess I cannot use it. I am thinking that maybe qdrawText will be faster than QToolTip, maybe tooltip is not used in this purpose to show the exon names, maybe it's designed to show widget name and function description.</div>
<div><br></div></div></blockquote></div><div><br>Well the tooltip window has various features, like hypertext. The user could click on something and launch a web browser to some external database, for example.<br> <br></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 class="gmail_quote"><div></div><div>Thanks </div><div><div></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 class="gmail_quote">
<div>
<br></div><div><div></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 class="gmail_quote"><div></div><div>Thanks</div><div>
<div></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 class="gmail_quote"><div> <br></div><div><div></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 class="gmail_quote"><div><div></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 class="gmail_quote"><div><font color="#888888"><br>Michael<br> <br>
</font></div><div><div></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>
<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></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></div></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></div></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></div></div><br>
</blockquote></div><br>