I tried to fix this. Please let me know.<br><br>Michael<br><br><div class="gmail_quote">On Wed, Oct 20, 2010 at 10:23 PM, Michael Lawrence <span dir="ltr">&lt;<a href="mailto:michafla@gene.com">michafla@gene.com</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;">I&#39;ll look into this. Just FYI, this works fine when OpenGL is disabled by passing opengl=FALSE to qplotView(). Need to get this working with GL.<br>
<br>Michael<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Wed, Oct 20, 2010 at 3:18 PM, Yihui Xie <span dir="ltr">&lt;<a href="mailto:xieyihui@gmail.com" target="_blank">xieyihui@gmail.com</a>&gt;</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 class="h5">Hi,<br>
<br>
I want to define a glyph which is a short segment as follows, but when<br>
the slope b=0, the glyph looks weird on screen (it is a filled<br>
square); other slopes are fine. I don&#39;t know what&#39;s going on:<br>
<br>
library(qtpaint)<br>
## x: length; b: slope<br>
qglyphSegment &lt;- function(x = 5, b = 0) {<br>
  glyph &lt;- Qt$QPainterPath()<br>
  x0 &lt;- x * cos(atan(b))<br>
  y0 &lt;- x * sin(atan(b))<br>
  glyph$moveTo(-x0, -y0)<br>
  glyph$lineTo(x0, y0)<br>
#  glyph$closeSubpath()<br>
  glyph<br>
}<br>
<br>
s &lt;- qscene()<br>
test_layer &lt;- qlayer(s, function(layer, painter) {<br>
    qdrawGlyph(painter, qglyphSegment(), 1:10, .5, stroke = &#39;black&#39;)<br>
    qdrawGlyph(painter, qglyphSegment(10, 1), 1:10, .7, stroke = &#39;black&#39;)<br>
    qdrawGlyph(painter, qglyphSegment(10, -1), 1:10, .3, stroke = &#39;black&#39;)<br>
}, limits=qrect(0,0,11,1))<br>
qplotView(s)<br>
## see the screenshot attached<br>
<br>
<br>
Thanks!<br>
<br>
Regards,<br>
Yihui<br>
<font color="#888888">--<br>
Yihui Xie &lt;<a href="mailto:xieyihui@gmail.com" target="_blank">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>
</font><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><br>