[Cairo] cairo_surfce_set_clip_region
Soorya Kuloor
skuloor at verano.com
Mon Jul 28 11:04:52 PDT 2003
How do I restore a clip? I do not see a function to do this in either
Render or libic. Do I need to remember the original surface dimensions
and set the clip to the full dimension? I see an internal function in
libic to destroy a clip, but don't see anything like that for Render.
Thanks,
-- Soorya
On Sun, 2003-07-27 at 11:41, Carl Worth wrote:
> On Jul 25, Soorya Kuloor wrote:
> > I could not figure out a way to convert from Region to
> > PixRegion. However, if the function cairo_surfce_set_clip_region()
> > takes x, y, width and height as argument rather than the Region, it
> > is possible to convert these to PixRegion.
>
> Yes, this sounds like the right idea. I don't want to actually export
> any Region/PixRegion data structure. Instead, I'd like to propose the
> following two functions for pixel-aligned clipping on a surface:
>
> cairo_surface_clip_rectangle (cairo_surface_t *surface,
> int x, int y,
> int width, int height);
>
> cairo_surface_clip_restore (cairo_surface_t *surface);
>
> Those should be sufficient for any purpose and should be quite simple
> to implement. As always, any other suggestions are quite welcome.
>
> > Does this sound OK? Should I go ahead and implement it?
>
> Please feel free to go ahead with this.
>
> -Carl
More information about the cairo
mailing list