[cairo] Write ups on Microsoft Avalon

Bill Spitzak spitzak at d2.com
Mon May 17 16:02:50 PDT 2004


On Monday 17 May 2004 12:44 pm, Owen Taylor wrote:
> 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.

In the example I was referring to in NeWS it did not do anti-aliasing, but 
instead filled all shapes to the nearest pixel. When scaling a lot of 
same-sized rectangles would then become different sizes, which was a problem, 
but at least if they touched they always touched and never overlapped or had 
a gap between them. In NeWS the line stroking algorithim also produced 
aligned lines at any scale as long as the scale was greater than one (when 
scaled down it always draw 1 pixel, which could go into adjacent areas). 
Considering this was 1989 I was pretty impressed with the ability to produce 
working GUI at any scale. This was all broken when they changed the default 
CTM to a .5 one, pretty much every single rectangle in tnt was drawn 1 unit 
smaller than it should be and the result did not scale at all.

You are right this is probably irrelevant to the antialiased Cairo except for 
integer scales.

-- 
                   ,~,~,~,~ ~ ~ ~ ~
     /\_       _|_========___         Bill Spitzak
 ~~~/\/\\~~~~~~\____________/~~~~~~~~ spitzak at d2.com




More information about the cairo mailing list