[cairo-commit] 2 commits - src/cairo-ps-surface.c

Carl Worth cworth at kemper.freedesktop.org
Wed Apr 12 11:11:16 PDT 2006


 src/cairo-ps-surface.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletion(-)

New commits:
diff-tree 0386a728957bdb3549da8e772c31b86295175a4b (from 39592788b38a8e8db5335d836a8eaa7ace08fc1c)
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Apr 12 11:06:06 2006 -0700

    Add some documentation to string_array_stream

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index badadb1..c8f1f9a 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -754,6 +754,20 @@ _string_array_stream_close (void *closur
     return status;
 }
 
+/* A string_array_stream wraps an existing output stream. It takes the
+ * data provided to it and output one or more consecutive string
+ * objects, each within the standard PostScript implementation limit
+ * of 65k characters.
+ *
+ * The strings are each separated by a space character for easy
+ * inclusion within an array object, (but the array delimiters are not
+ * added by the string_array_stream).
+ *
+ * The string array stream is also careful to wrap the output within
+ * STRING_ARRAY_MAX_COLUMN columns (+/- 1). The stream also adds
+ * necessary escaping for special characters within a string,
+ * (specifically '\', '(', and ')').
+ */
 static cairo_output_stream_t *
 _string_array_stream_create (cairo_output_stream_t *output)
 {
diff-tree 39592788b38a8e8db5335d836a8eaa7ace08fc1c (from 523f9e46d87392a539c26ade18d99a3db7ed833d)
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Apr 12 10:56:42 2006 -0700

    Print both page label and number in PostScript %%Page headers.

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 8a37868..badadb1 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -320,7 +320,7 @@ static void
 _cairo_ps_surface_start_page (cairo_ps_surface_t *surface)
 {
     _cairo_output_stream_printf (surface->stream,
-				 "%%%%Page: %d\n",
+				 "%%%%Page: %d %d\n",
 				 ++surface->num_pages);
 
 


More information about the cairo-commit mailing list