From 5f5afac8f470ae13ab2827f04e05ca585d69b898 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 28 Feb 2007 14:32:11 -0500 Subject: [PATCH] [boilerplate/test-paginated] Issue a show_page before writing buffer This is needed since cairo-test does not issue a show_page now, and the one coming from paginated layer is too late (around finish). The way we force the show_page is kinda funny. That is, we create a temporary cairo_t and call cairo_show_page() on it. But works. --- boilerplate/cairo-boilerplate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c index aff747e22..1bb102be7 100644 --- a/boilerplate/cairo-boilerplate.c +++ b/boilerplate/cairo-boilerplate.c @@ -210,6 +210,11 @@ test_paginated_write_to_png (cairo_surface_t *surface, cairo_format_t format; test_paginated_closure_t *tpc; + /* show page first. the automatic show_page is too late for us */ + cairo_t *cr = cairo_create (surface); + cairo_show_page (cr); + cairo_destroy (cr); + tpc = cairo_surface_get_user_data (surface, &test_paginated_closure_key); switch (tpc->content) {