| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #include "cairo-test.h" |
| |
| static cairo_test_status_t |
| draw_aligned (cairo_t *cr, int width, int height) |
| { |
| cairo_set_source_rgb (cr, 1, 1, 1); |
| cairo_paint (cr); |
| |
| cairo_rectangle (cr, -10, -10, 20, 20); |
| cairo_rectangle (cr, 5, 5, 20, 20); |
| cairo_set_source_rgb (cr, 0, 0, 0); |
| cairo_fill_preserve (cr); |
| cairo_set_source_rgba (cr, 1, 0, 0, .5); |
| cairo_stroke (cr); |
| |
| return CAIRO_TEST_SUCCESS; |
| } |
| |
| static cairo_test_status_t |
| draw_unaligned (cairo_t *cr, int width, int height) |
| { |
| cairo_set_source_rgb (cr, 1, 1, 1); |
| cairo_paint (cr); |
| |
| cairo_rectangle (cr, -10.5, -10.5, 20, 20); |
| cairo_rectangle (cr, 5.5, 5.5, 20, 20); |
| cairo_set_source_rgb (cr, 0, 0, 0); |
| cairo_fill_preserve (cr); |
| cairo_set_source_rgba (cr, 1, 0, 0, .5); |
| cairo_stroke (cr); |
| |
| return CAIRO_TEST_SUCCESS; |
| } |
| |
| CAIRO_TEST (image_bug_710072_aligned, |
| "Tests a bug where we may compute spans greater than bounded extents", |
| "extents, fill, stroke", |
| NULL, |
| 15, 15, |
| NULL, draw_aligned) |
| |
| CAIRO_TEST (image_bug_710072_unaligned, |
| "Tests a bug where we may compute spans greater than bounded extents", |
| "extents, fill, stroke", |
| NULL, |
| 15, 15, |
| NULL, draw_unaligned) |