Extend fallback-resolution test to expose bug with groups

Groups appear to always be rendered with a fallback resolution of
72.0 ppi rather than the desired fallback resolution.
This commit is contained in:
Carl Worth 2008-05-21 10:23:37 -07:00
parent 26eeb1c7ee
commit 8efb103600

View file

@ -129,7 +129,33 @@ main (void)
{
cairo_surface_set_fallback_resolution (surface, ppi[page], ppi[page]);
/* First draw the top half in a conventional way. */
cairo_save (cr);
{
cairo_rectangle (cr, 0, 0, SIZE, SIZE / 2.0);
cairo_clip (cr);
draw_with_ppi (cr, SIZE, SIZE, ppi[page]);
}
cairo_restore (cr);
/* Then draw the bottom half in a separate group,
* (exposing a bug in 1.6.4 with the group not being
* rendered with the correct fallback resolution). */
cairo_save (cr);
{
cairo_rectangle (cr, 0, SIZE / 2.0, SIZE, SIZE / 2.0);
cairo_clip (cr);
cairo_push_group (cr);
{
draw_with_ppi (cr, SIZE, SIZE, ppi[page]);
}
cairo_pop_group_to_source (cr);
cairo_paint (cr);
}
cairo_restore (cr);
cairo_show_page (cr);
}