mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-20 17:30:07 +01:00
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:
parent
26eeb1c7ee
commit
8efb103600
1 changed files with 27 additions and 1 deletions
|
|
@ -129,7 +129,33 @@ main (void)
|
||||||
{
|
{
|
||||||
cairo_surface_set_fallback_resolution (surface, ppi[page], ppi[page]);
|
cairo_surface_set_fallback_resolution (surface, ppi[page], ppi[page]);
|
||||||
|
|
||||||
draw_with_ppi (cr, SIZE, SIZE, 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);
|
cairo_show_page (cr);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue