[cairo] reset clip api needed

Jost Boekemeier jost2345 at yahoo.de
Wed Jul 7 08:27:35 PDT 2004


Hi,

I think I need a cairo_reset_clip() function, i.e. I want to get rid of
the clip surface entirely:

  draw_rectangle(drawable, gc, ...) {
   cairo_set_target_surface ( gc, drawable );
   cairo_draw_rectangle( gc, ...);
  }
  ...
  gc_set_clip_rectangles( gc, ...) {
    cairo_reset_clip( gc );
    ...
  }

Without it I must store the clip rectangles outside of cairo and wrap
each cairo draw call by a save/restore pair (or one could create a fresh
cairo_t for each drawing, but I don't think that's a good idea).

Also what about a cairo_set_user_info(cairo_t, void*) /
cairo_get_user_info function?  So one could attach arbitrary state to
the cairo_t and applications could pass cairo_t around instead of
wrapping it by their own gc structure.


Jost







More information about the cairo mailing list