[cairo] Draw a single pixel or group of pixels
cworth at cworth.org
Thu Apr 10 10:20:16 PDT 2008
On Thu, 10 Apr 2008 18:13:23 +0200, "Gerdus van Zyl" wrote:
> I use the following:
> 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
I think I really need to clarify that FAQ answer somehow. The correct
code for drawing a single pixel, (assuming the default identity
transformation matrix), is:
cairo_rectangle (cr, x, y, 1.0, 1.0);
with both x and y as integers.
Please let me know what text on that page might have caused the
misunderstanding so that I can fix it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080410/5a1d87a7/attachment.pgp
More information about the cairo