summaryrefslogtreecommitdiff
path: root/src/cairo-pdf.h
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2005-03-16 12:08:41 +0000
committerKristian Høgsberg <krh@redhat.com>2005-03-16 12:08:41 +0000
commit6993c086ebaa9a98b1794f2c483013ec51cc41ec (patch)
treefcfc4cff8c0fb6197198587b453e92ebba5fa35e /src/cairo-pdf.h
parent5fecf69e2c41ed1957fdde8b0208e7a4aa031466 (diff)
downloadcairo-6993c086ebaa9a98b1794f2c483013ec51cc41ec.tar.gz
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-pdf.h')
-rw-r--r--src/cairo-pdf.h40
1 files changed, 29 insertions, 11 deletions
diff --git a/src/cairo-pdf.h b/src/cairo-pdf.h
index 701a7b4a7..99d53a8cd 100644
--- a/src/cairo-pdf.h
+++ b/src/cairo-pdf.h
@@ -46,20 +46,38 @@
CAIRO_BEGIN_DECLS
void
-cairo_set_target_pdf (cairo_t *cr,
- FILE *file,
- double width_inches,
- double height_inches,
- double x_pixels_per_inch,
- double y_pixels_per_inch);
+cairo_set_target_pdf (cairo_t *cr,
+ cairo_write_func_t write_func,
+ cairo_destroy_func_t destroy_closure_func,
+ void *closure,
+ double width_inches,
+ double height_inches,
+ double x_pixels_per_inch,
+ double y_pixels_per_inch);
+void
+cairo_set_target_pdf_as_file (cairo_t *cr,
+ FILE *fp,
+ double width_inches,
+ double height_inches,
+ double x_pixels_per_inch,
+ double y_pixels_per_inch);
+
+cairo_surface_t *
+cairo_pdf_surface_create (cairo_write_func_t write_func,
+ cairo_destroy_func_t destroy_closure_func,
+ void *closure,
+ double width_inches,
+ double height_inches,
+ double x_pixels_per_inch,
+ double y_pixels_per_inch);
cairo_surface_t *
-cairo_pdf_surface_create (FILE *file,
- double width_inches,
- double height_inches,
- double x_pixels_per_inch,
- double y_pixels_per_inch);
+cairo_pdf_surface_create_for_file (FILE *fp,
+ double width_inches,
+ double height_inches,
+ double x_pixels_per_inch,
+ double y_pixels_per_inch);
CAIRO_END_DECLS