[cairo] Drawing diagonal lines with antialiasing off
Øyvind Kolås
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[1]. 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.
/Øyvind K.
---
1 - http://cairographics.org/FAQ
--
«The future is already here. It's just not very evenly distributed»
-- William Gibson
http://pippin.gimp.org/ http://ffii.org/
More information about the cairo
mailing list