[cairo] Write ups on Microsoft Avalon

Owen Taylor otaylor at redhat.com
Mon May 17 12:44:32 PDT 2004


On Mon, 2004-05-17 at 14:54, Bill Spitzak wrote:

> Can you confirm that the default transformation also puts integers at the 
> corners of pixels, not in the center? It appears to be the case but I'm not 
> sure if this has really been stated.

Definitely the case; it's the only reasonable thing to do for AA
rendering interface. Java tried to go half-way by having some rules that
were different for stroked lines, but that was decided after a while to
be a big mistake and backed out.

> I personally feel that this is vitally important, plus there must be 
> something in the documentation to discourage people from "fixing" it by 
> moving the CTM by .5. This thinking completely broke the tNt toolkit for NeWS 
> and destroyed it's ability to make a scale-independent user interface, 
> because people started to draw rectangles assumming they would end up .5 
> pixel larger than they drew them, and making assumptions about how rectangles 
> would line up with image and font pixels that did not scale.

There's no way of getting around this; lining odd-width stroked lines up
with the pixel grid is a non-scalable operation.

The default Cairo line-width is 2 to try and keep people from having to
add that 0.5 pixel in most cases, but I'm pretty much skeptical about
the whole idea of scaling a user interface by changing the
transformation. You either add tons of fuzz or have a huge discrete 
jump when a unit switches from 1 pixels to 2 pixels.

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/45023a98/attachment.pgp


More information about the cairo mailing list