I use the following:<br>ctx.rectangle(p.x,p.y,1.5,1.5)<br>ctx.fill() <br><br>the reason for the 0.5 larger is the little squares,sample
point model described in "How do I draw a sharp, single-pixel-wide line?" in <a href="http://www.cairographics.org/FAQ/#sharp_lines">http://www.cairographics.org/FAQ/#sharp_lines</a><br><br>I don't know of any setpixel API in cairo (because cairo isnt pixel orientated). Except if you use an image surface and manipulate the buffer directly but that's not cairo directly. The rectangle method was fast enough for 500 pixels @ 25fps in my case.<br>
<br>~Gerdus<br><br><div class="gmail_quote">On Thu, Apr 10, 2008 at 5:27 PM, Joseph Fradley <<a href="mailto:joe.fradley@fradeng.com">joe.fradley@fradeng.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>I'm sure there must be a way somewhere but I haven't been able to find it. How do you draw just a single pixel? or better yet a group of disjoint pixels at specific 'x,y' locations?<br><br>Joe<br>
<br>_______________________________________________<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br></blockquote></div><br>