[cairo] Write ups on Microsoft Avalon

Bill Spitzak spitzak at d2.com
Thu May 13 09:26:14 PDT 2004


On Thursday 13 May 2004 06:29 am, Carl Worth wrote:

> >    - setting for dash cap
>
> What do you mean by this one?

I would think he means a different end cap for each piece of the dash pattern 
than for the end of the entire stroke. Most useful is to make the dashes 
square while still making rounded ends of the lines. There is a question of 
what to do if the line-end cap and the dash-cap would overlap, probably they 
would have to intersect.

It seems it would be possible to specify arbitrary line end caps without 
expanding cairo too much. The idea would be that you draw an open path using 
Cairo and then do a call to indicate that this path (scaled and rotated so 
0,0 is at the end of the line) is the current end cap. So the only additional 
call is the "set this path as line cap" call. However the implementation may 
be way too complex to consider.

> But my guess would be that "turn off anti-aliasing" is probably intended
> to mean "I'm willing to sacrifice rendering quality in exchange for
> speed"

He may also be asking for the ability to erase a previous graphic 100%. It 
may be useful to provide a compositing operator which is basically "replace 
alpha with alpha!=0". This would produce a "fat" graphic that probably should 
not be shown to the user, but it can erase a previous antialiased graphic if 
you draw the image you know is the background. I agree that Cairo should not 
provide any way to "turn off antialiasing". But this operator is useful and 
an emulation library could simulate no-antialiasing well enough by using this.

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




More information about the cairo mailing list