diff options
author | Kristian Høgsberg <krh@redhat.com> | 2005-03-16 12:08:41 +0000 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2005-03-16 12:08:41 +0000 |
commit | 6993c086ebaa9a98b1794f2c483013ec51cc41ec (patch) | |
tree | fcfc4cff8c0fb6197198587b453e92ebba5fa35e /src/cairo-ps-surface.c | |
parent | 5fecf69e2c41ed1957fdde8b0208e7a4aa031466 (diff) |
Add cairo_output_stream.c
Add new errors, CAIRO_STATUS_WRITE_ERROR and CAIRO_STATUS_SURFACE_FINISHED, add cairo_surface_finish() prototype, add cairo_write_func_t.
Add strings for new errors, documentation fix.
Rename surface destroy functions to finish and change them to not free the surface.
Change PDF surface constructors to take a write function in the general case and add stdio convenience constructors. Change destroy function to finish for cairo_pdf_surface. Change implementation to use cairo_output_stream_t functions for output.
Use _cairo_surface_show_glyphs instead of calling function pointer directly.
Add prototypes for cairo output stream functions, rename destroy to finish in cairo_surface_backend_t and add finished flag to cairo_surface_t.
Add cairo_surface_finish() and call it from cairo_surface_destroy(). Check the finished flag in cairo_surface_t in functions that change the surface.
Diffstat (limited to 'src/cairo-ps-surface.c')
-rw-r--r-- | src/cairo-ps-surface.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c index 4a45fc679..a0a92dc21 100644 --- a/src/cairo-ps-surface.c +++ b/src/cairo-ps-surface.c @@ -170,8 +170,8 @@ _cairo_ps_surface_create_similar (void *abstract_src, return NULL; } -static void -_cairo_ps_surface_destroy (void *abstract_surface) +static cairo_status_t +_cairo_ps_surface_finish (void *abstract_surface) { cairo_ps_surface_t *surface = abstract_surface; @@ -180,7 +180,7 @@ _cairo_ps_surface_destroy (void *abstract_surface) cairo_surface_destroy (&surface->image->base); - free (surface); + return CAIRO_STATUS_SUCCESS; } static void @@ -426,7 +426,7 @@ _cairo_ps_surface_set_clip_region (void *abstract_surface, static const cairo_surface_backend_t cairo_ps_surface_backend = { _cairo_ps_surface_create_similar, - _cairo_ps_surface_destroy, + _cairo_ps_surface_finish, _cairo_ps_surface_pixels_per_inch, _cairo_ps_surface_acquire_source_image, _cairo_ps_surface_release_source_image, |