diff options
author | Owen Taylor <otaylor@redhat.com> | 2005-05-02 13:39:30 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@redhat.com> | 2005-05-02 13:39:30 +0000 |
commit | 7dbd1f4401eb892ea58c147a61f02535d30318ab (patch) | |
tree | efd17c3a18cdc578ef1c9923940578efdff9b469 /src/cairo-gstate-private.h | |
parent | 4ce3d3fb266908f2fe98564bf7dad387420dba9c (diff) |
src/cairo-surface.c src/cairoint.h: Add _cairo_surface_begin/end to save and restore the clip state of a surface. Copy and store clip regions set on a surface so that we can save and restore them.
Add a CAIRO_STATUS_BAD_NESTING error for interleaved use of two cairo_t's on the same surface. Also, add a skeleton doc comment for cairo_status_t.
src/cairo.c src/cairo-gstate.c src/cairoint.h: Use _cairo_surface_begin/end to replace _cairo_gstate_restore_external_state.
Use _cairo_surface_begin/end to save the state of a surface when we start drawing at it and restore it at the end. Check that the save level of the surface is what we expect on drawing operations and fail with CAIRO_STATUS_BAD_NESTING otherwise.
src/cairo-pattern.c src/cairoint.h (_cairo_pattern_acquire_surface_for_surface) (_cairo_pattern_release_surface): Surround use of pattern->surface with _cairo_surface->begin/end so we don't clip surfaces used as sources.
test/clip-nesting.c test/Makefile.am: Test of destinatin clipping with the nested creation of cairo_t's for the same context.
test/source-clip.c test/Makefile.am: Test that clipping on a source as a destination doesn't affect use of it as a source.
XFAIL test for copying from a surface as a source to itself as a destination with a clip.
Diffstat (limited to 'src/cairo-gstate-private.h')
-rw-r--r-- | src/cairo-gstate-private.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cairo-gstate-private.h b/src/cairo-gstate-private.h index fcf8a23f..eeb35b83 100644 --- a/src/cairo-gstate-private.h +++ b/src/cairo-gstate-private.h @@ -61,6 +61,7 @@ struct _cairo_gstate { cairo_scaled_font_t *scaled_font; /* Specific to the current CTM */ cairo_surface_t *surface; + int surface_level; /* Used to detect bad nested use */ cairo_pattern_t *source; |