[Cairo] Rectangle-based clipping for surfaces
Carl Worth
cworth at east.isi.edu
Mon Oct 20 13:38:56 PDT 2003
On Oct 15, Keith Packard wrote:
> I think it's important to keep the intended usage for this operation in
> mind. The requirement is that we provide device pixel clipping for things
> like Expose events.
Yes, this new API is specifically designed for X expose events. I
don't see much use for this specialized pixel-aligned clipping for
offscreen or PostScript surfaces.
> Alternatively, we could expose a new data type (cairo_region) along with
> calls to construct it from rectangles. I'd like to avoid that as it seems
> unnecessary.
I'd also like to avoid this.
Instead, if we restrict the new API to the Xlib-specific backend then
it can just use the existing Xlib Region object:
void
cairo_xlib_surface_set_clip_region (cairo_surface_t *surface,
Region region);
Which would prevent muddling of the generic Cairo API.
-Carl
More information about the cairo
mailing list