[cairo] cairo internal design ideas
Bill Spitzak
spitzak at d2.com
Fri Jan 7 10:02:26 PST 2005
On Thursday 06 January 2005 11:07 pm, Carl Worth wrote:
> > 1. get rid of all operators that can modify a pixel outside the path (or
> > when the alpha is zero in a source pattern).
>
> Will the recent proposals to fix clipping obviate the need to drop all
> these operators in your view?
Yes.
Also because I forgot we want operators that don't use the path (text is the
obvious one, but this "draw the alpha of a surface" is also the same, and
"clear the entire clip region" is another) there is no savings by combining
the path and clip, which was the intention of my proposal.
> > 2. Add a "invert path" operator that makes the "interior" of the path be
> > everything outside it, rather than inside it.
>
> Rather than "invert path" though, how about extending the fill rules
> to do the inversion? Maybe something like:
>
> typedef enum cairo_fill_rule {
> CAIRO_FILL_RULE_WINDING,
> CAIRO_FILL_RULE_EVEN_ODD,
> CAIRO_FILL_RULE_INVERSE_WINDING,
> CAIRO_FILL_RULE_INVERSE_EVEN_ODD
> } cairo_fill_rule_t;
>
> Both cairo_fill and cairo_clip are already defined to use this fill
> rule.
I agree this would do exactly what is needed. And it avoids any questions
about what "invert path" does to the "stroke" operator.
--
,~,~,~,~ ~ ~ ~ ~
/\_ _|_========___ Bill Spitzak
~~~/\/\\~~~~~~\____________/~~~~~~~~ spitzak at d2.com
More information about the cairo
mailing list