[cairo] Drawing diagonal lines with antialiasing off
pippin at gimp.org
Tue Sep 27 01:55:37 PDT 2005
On 9/27/05, Jordi Mas <jordi at ximian.com> wrote:
> Hi folks,
> When turning off the antialiasing (CAIRO_ANTIALIAS_NONE) and drawing a
> vertical line, it gets rendered as two pixel width instead of one.
> Is there any way using a cairo function to override this behaviour?
> I'm attaching a very simple case to reproduce the issue and the
> generated image.
Your issue is very related to the first entry in the FAQ. Changing
your code to:
cairo_move_to (cr, 5.0, 5.5);
cairo_move_to (cr, 10.0, 10.5);
Will render the image you expect.
1 - http://cairographics.org/FAQ
«The future is already here. It's just not very evenly distributed»
-- William Gibson
More information about the cairo