[Cairo] Clip rectangle
Carl Worth
cworth at east.isi.edu
Thu Mar 18 06:20:32 PST 2004
On Jul 29, 2003, Soorya Kuloor wrote:
> Here are 2 patches that implement cairo_surfcae_set_clip_rectangle(). I
> could not find a way to implement cairo_surface_clip_restore(). Any help
> in implementing this is appreciated.
Soorya,
Thanks for doing this work and contributing it.
I know that these patches implement an API that I proposed, but I've
now decided against this interface for a couple of reasons:
1) I want to move rendering state information away from the surface
objects into the single graphics state within cairo_t.
2) We shouldn't implement a new clipping interface with different
semantics, if we can use the existing clipping interface for both
purposes.
Point 2 wasn't obvious at the time this patch was put together. But I
think the subsequent work by Graydon Hoare makes a good case that we
should be able to use cairo_rectangle/cairo_clip to implement
efficient clipping for pixel-aligned rectangles.
-Carl
PS. Yes, I am awakening an ancient thread here. I'm currently going
through old cairo posts that had never been been properly responded
to. I want to make sure nothing useful gets dropped on the floor.
More information about the cairo
mailing list