[cairo-commit] cairo/src cairo-paginated-surface.c, 1.5,
1.6 cairo-ps-surface.c, 1.65, 1.66
Carl Worth
commit at pdx.freedesktop.org
Wed Jan 11 16:01:27 PST 2006
Committed by: cworth
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv15983/src
Modified Files:
cairo-paginated-surface.c cairo-ps-surface.c
Log Message:
2006-01-11 Carl Worth <cworth at cworth.org>
* ROADMAP: Note that PS backend has now been switched over to use
cairo_paginated_surface_t.
* src/cairo-paginated-surface.c:
(_cairo_paginated_surface_acquire_source_image), (_paint_page),
(_cairo_paginated_surface_snapshot): Switch from ARGB32 to RGB24
for intermediate image surface since that's all that the current
users of cairo_paginated_surface support anyway.
* src/cairo-ps-surface.c: (_cairo_ps_surface_emit_header),
(_cairo_ps_surface_emit_footer),
(_cairo_ps_surface_create_for_stream_internal),
(_cairo_surface_is_ps), (cairo_ps_surface_set_dpi),
(_cairo_ps_surface_finish), (_cairo_ps_surface_start_page),
(_cairo_ps_surface_copy_page), (_cairo_ps_surface_show_page),
(_cairo_ps_surface_add_fallback_area),
(_cairo_ps_surface_composite), (_cairo_ps_surface_fill_rectangles),
(_cairo_ps_surface_composite_trapezoids),
(_cairo_ps_surface_path_move_to), (_cairo_ps_surface_path_line_to),
(_cairo_ps_surface_path_curve_to),
(_cairo_ps_surface_path_close_path),
(_cairo_ps_surface_intersect_clip_path),
(_cairo_ps_surface_get_extents),
(_cairo_ps_surface_old_show_glyphs), (_cairo_ps_surface_fill):
Switch cairo_ps_surface_t over to use the new
cairo_paginated_surface_t. This drastically simplifies the
implementation, but temporarily puts the PostScript output back
into the land of one-image-per-page. To be fixed soon though with
improvements to cairo_paginated_surface_t. Everything still passes
the test suite which is good. The test suite currently does no
testing of multi-page output, which is quite bad.
Index: cairo-paginated-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-paginated-surface.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cairo-paginated-surface.c 11 Jan 2006 19:53:33 -0000 1.5
+++ cairo-paginated-surface.c 12 Jan 2006 00:01:25 -0000 1.6
@@ -166,7 +166,7 @@
_cairo_surface_get_extents (surface->target, &extents);
- image = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+ image = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
extents.width, extents.height);
_cairo_meta_surface_replay (surface->meta, image);
@@ -191,7 +191,7 @@
cairo_surface_t *image;
cairo_pattern_t *pattern;
- image = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+ image = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
surface->width, surface->height);
_cairo_meta_surface_replay (surface->meta, image);
@@ -375,7 +375,7 @@
_cairo_surface_get_extents (other->target, &extents);
- surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+ surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
extents.width,
extents.height);
Index: cairo-ps-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-ps-surface.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- cairo-ps-surface.c 22 Dec 2005 01:08:29 -0000 1.65
+++ cairo-ps-surface.c 12 Jan 2006 00:01:25 -0000 1.66
@@ -40,7 +40,7 @@
#include "cairoint.h"
#include "cairo-ps.h"
#include "cairo-font-subset-private.h"
-#include "cairo-meta-surface-private.h"
+#include "cairo-paginated-surface-private.h"
#include "cairo-ft-private.h"
#include <time.h>
@@ -68,19 +68,67 @@
double x_dpi;
double y_dpi;
[...1076 lines suppressed...]
- 1.0/surface->base.device_x_scale,
- -1.0/surface->base.device_y_scale);
-
- ps_output = _ps_output_surface_create (surface);
- if (ps_output->status)
- return CAIRO_STATUS_NO_MEMORY;
-
- status = _cairo_meta_surface_replay (page, ps_output);
-
- _ps_output_render_fallbacks (ps_output, page);
-
- cairo_surface_destroy (ps_output);
-
- _cairo_output_stream_printf (surface->stream,
- "showpage\n"
- "grestore\n"
- "%%%%EndPage\n");
-
- return status;
-}
More information about the cairo-commit
mailing list