summaryrefslogtreecommitdiff
path: root/boilerplate/cairo-boilerplate-ps.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-04-12 10:51:38 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-04-12 12:21:22 +0100
commit6ad8c96fd81e06cea6ada4a83e7c5614f150f914 (patch)
treebe851b5c27e7fec31d62a10381173a4997104303 /boilerplate/cairo-boilerplate-ps.c
parentbf5adaf3942388e58ad3bda30173e53b214df885 (diff)
downloadcairo-6ad8c96fd81e06cea6ada4a83e7c5614f150f914.tar.gz
ps (API): Export the ability to set the creation date of the surface
A PostScript surface embeds a CreationDate comment into its document description pre-amble. Normally this is set to the time the surface is written out, except we set this to a constant value in the boilerplate for the purposes of mimicking a reference file. It may also be useful for external applications, so make it a public export. References: https://bugs.freedesktop.org/show_bug.cgi?id=48577 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'boilerplate/cairo-boilerplate-ps.c')
-rw-r--r--boilerplate/cairo-boilerplate-ps.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/boilerplate/cairo-boilerplate-ps.c b/boilerplate/cairo-boilerplate-ps.c
index ae61239f3..938e40aed 100644
--- a/boilerplate/cairo-boilerplate-ps.c
+++ b/boilerplate/cairo-boilerplate-ps.c
@@ -55,24 +55,6 @@ typedef struct _ps_target_closure {
cairo_ps_level_t level;
} ps_target_closure_t;
-static cairo_status_t
-_cairo_boilerplate_ps_surface_set_creation_date (cairo_surface_t *abstract_surface,
- time_t date)
-{
- cairo_paginated_surface_t *paginated = (cairo_paginated_surface_t*) abstract_surface;
- cairo_ps_surface_t *surface;
-
- if (cairo_surface_get_type (abstract_surface) != CAIRO_SURFACE_TYPE_PS)
- return CAIRO_STATUS_SURFACE_TYPE_MISMATCH;
-
- surface = (cairo_ps_surface_t*) paginated->target;
-
- surface->has_creation_date = TRUE;
- surface->creation_date = date;
-
- return CAIRO_STATUS_SUCCESS;
-}
-
static cairo_surface_t *
_cairo_boilerplate_ps_create_surface (const char *name,
cairo_content_t content,
@@ -106,7 +88,7 @@ _cairo_boilerplate_ps_create_surface (const char *name,
goto CLEANUP_FILENAME;
cairo_ps_surface_restrict_to_level (surface, level);
- _cairo_boilerplate_ps_surface_set_creation_date (surface, 0);
+ cairo_ps_surface_debug_set_creation_date (surface, 0);
cairo_surface_set_fallback_resolution (surface, 72., 72.);
if (content == CAIRO_CONTENT_COLOR) {