[cairo] Write ups on Microsoft Avalon

Owen Taylor otaylor at redhat.com
Mon May 17 12:20:38 PDT 2004


On Mon, 2004-05-17 at 13:09, Carl Worth wrote:
> 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.

I'm not completely happy with this idea:

 - The granularity of this is too big to be useful for current
   screen resolutions ... you don't want things to suddenly
   double at 144 dpi. These means that there still isn't going
   to be a fixed relationship between say, font size, and
   Cairo units.

 - Apps care about pixel sizes (window size is in pixels,
   they may have images in pixel sizes, etc.) Having to 
   query and translate is very painful.

 - People are going to assume that 1-unit == 1 pixel in their apps,
   because virtually all displays are still < 144 dpi.

 - Also, say I want to draw a "hairline" - a pixel aligned very thin
   line.. how do I do it in that scheme? Do I make the line 
   0.5 pixel with an offset of 0.25, 1 pixel with an offset of 0.5?

 - DPI is a wrong measure for screens as has been discussed here
   in the past (projectors, handhelds, etc.)

For these reasons, my current inclination for GTK+/Cairo integration
is to deviate and fix a 1-pixel : 1-unit default matrix.

Regards,
						Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20040517/8224a156/attachment.pgp


More information about the cairo mailing list