[cairo] Write ups on Microsoft Avalon

Carl Worth cworth at east.isi.edu
Mon May 17 13:44:40 PDT 2004


On Mon, 17 May 2004 15:20:38 -0400, Owen Taylor wrote:
>  - 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.

Ah, but we're using 1/96. So things don't change until 192 dpi. So, you
have a little more room to breathe at least. Whether that actually
changes anything for you or not...

>  - 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.

I'd prefer that new applications care less about pixel sizes. It would
be nice if displays had pixels small enough to be ignored completely,
(in which case cairo could be truly resolution independent), but that's
just not the case. The scheme in cairo is intended to be a compromise.

If application/toolkit authors have to think a bit about how to work in
non-pixel space, then I think cairo will have had a positive impact.

You're in the position to try to transition a large number of existing
applications, so the analysis may be different.

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

Shame on them.

Print output is intended to be a primary output device in cairo. And a 1
unit, 1 pixel assumption there is almost guaranteed to be wrong.

>  - 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=20
>    0.5 pixel with an offset of 0.25, 1 pixel with an offset of 0.5?

Do you really want to address a single row of pixels? You can always set
up an identity matrix for that case.

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

I'll gladly listen to proposals for alternate metrics. Something along
the lines of pixels per radian in field of view?

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

That's the same matrix you get with the current scheme and today's
display devices anyway. So naive users will do the same thing in either
case.

-Carl




More information about the cairo mailing list