[cairo] Alpha masks
Keith Packard
keithp at keithp.com
Thu Jan 6 12:43:59 PST 2005
Around 15 o'clock on Jan 6, Owen Taylor wrote:
> I think in terms of the original requested operation (basically, use
> an A8 surface in place of a polygon or set of glyphs), this doesn't
> fit very will.
In Twin (a tiny window system), I provide two levels in the API; the low
level 'Composite' api which performs basic image compositing upon which
the geometry is built, following the Plan 9 architecture which makes paths
just an implicit mask to the path compositing operation. In cairo, we
would then have something like:
cairo_composite (cairo_t dst,
cairo_pattern_t src,
cairo_pattern_t msk);
(this is not a formal proposal; I realize the confusion in having a
pattern in dst).
We would then formally define cairo_fill and cairo_stroke in terms of this
primitive -- the msk operand is build from the provided geometry.
And, your cairo_show_surface_mask becomes a simple wrapper around the
above general compositing function.
I guess what I'm trying to avoid is having a collection of useful but not
obviously related rendering operations.
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050106/7bb1c1b0/attachment.pgp
More information about the cairo
mailing list