[cairo] Write ups on Microsoft Avalon
Carl Worth
cworth at east.isi.edu
Mon May 17 10:09:31 PDT 2004
On Mon, 17 May 2004 18:59:58 +0200, Jost Boekemeier wrote:
> On Mon, 2004-05-17 at 13:39, Owen Taylor wrote:
>
> > Neither of these requires turning off AA for graphics primitives. The
> > first is a font-rendering layer operation, the second is just a matter
> > of drawing your line with the right coordinates so that it doesn't
> > have any partly-occupied pixels.
>
> Glyphs okay, but I don't understand your suggestion to draw in device
> coordinates; does a common device space exist for all output formats?
One feature in cairo to help with this issue is the default user->device
transformation which is close to:
1 user-space unit == 1/96 inch
but is actually rounded so that:
1 user-space unit == an integer number of device-space pixels
So, it's quite easy to align elements to pixel boundaries. For example,
even integer stroke widths, half-unit offsets, and integer scale factors
will all help here.
If you can't take advantage of that feature for whatever reason, it's
still possible to query the current transformation and adjust
coordinates as necessary to account for its effects.
-Carl
More information about the cairo
mailing list