[cairo] which operations modify the canvas?

Carl Worth cworth at cworth.org
Wed Jun 20 10:56:34 PDT 2007


On Wed, 20 Jun 2007 19:21:00 +0200, Tamas K Papp wrote:
> I think I will just call XSync when needed.  For this, I need a
> complete list of operations that modify the "canvas".  Here is what I
> have come up with (dropping cairo_):

Hi Tamas,

These are correct:

> fill
> fill_preserve
> mask
> mask_surface
> paint
> paint_with_alpha
> stroke
> stroke_preserve

These are not, (they measure things without drawing):

> fill_extents
> stroke_extents
>
> Did I miss anything?

Yes, show_text and show_glyphs are the other drawing operations that
you missed. I think that should be everything. There really are just 5
drawing operations in cairo:

	mask, paint, fill, stroke, and show_glyphs

but there are a few variations of those as you discovered above.

> For future developments, it would be ideal if I could attach a
> callback function to the surface or context (whichever is easier) that
> would be called (with a pointer to user-suppled data) whenever actual
> drawing happens.  Would this be feasible?

Anything is possible, really. But I'm a bit confused as to what
problem you are running into. You really shouldn't be needing to call
XSync to get results to appear, (and if you are, I fear negative
performance impacts).

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://cairographics.org/archives/cairo/attachments/20070620/da74c56b/attachment.pgp 


More information about the cairo mailing list