diff options
author | Carl Worth <cworth@cworth.org> | 2008-01-21 14:45:06 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2008-01-21 14:45:06 -0800 |
commit | 55e0dddf0408046ea0ded419ebe45099a4eb563e (patch) | |
tree | e522519c45ac54db621859dd7eb0b68417989aca /test/get-path-extents.c | |
parent | 63df3a82a3a4a035edf89152995a324449616059 (diff) | |
download | cairo-55e0dddf0408046ea0ded419ebe45099a4eb563e.tar.gz |
Add cairo_path_extents testing to several cases missing it
With these degenerate shapes, cairo_path_extents still returns
a zero-area rectangle, but with a non-zero offset.
Diffstat (limited to 'test/get-path-extents.c')
-rw-r--r-- | test/get-path-extents.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/get-path-extents.c b/test/get-path-extents.c index 5520b39e9..0be57a704 100644 --- a/test/get-path-extents.c +++ b/test/get-path-extents.c @@ -134,7 +134,8 @@ draw (cairo_t *cr, int width, int height) cairo_rel_line_to (cr2, 0., 0.); phase = "Degenerate line"; if (!check_extents (phase, cr2, FILL, EQUALS, 0, 0, 0, 0) || - !check_extents (phase, cr2, STROKE, EQUALS, 0, 0, 0, 0)) + !check_extents (phase, cr2, STROKE, EQUALS, 0, 0, 0, 0) || + !check_extents (phase, cr2, PATH, EQUALS, 200, 400, 0, 0)) ret = CAIRO_TEST_FAILURE; cairo_new_path (cr2); @@ -142,21 +143,24 @@ draw (cairo_t *cr, int width, int height) cairo_rel_curve_to (cr2, 0., 0., 0., 0., 0., 0.); phase = "Degenerate curve"; if (!check_extents (phase, cr2, FILL, EQUALS, 0, 0, 0, 0) || - !check_extents (phase, cr2, STROKE, EQUALS, 0, 0, 0, 0)) + !check_extents (phase, cr2, STROKE, EQUALS, 0, 0, 0, 0) || + !check_extents (phase, cr2, PATH, EQUALS, 200, 400, 0, 0)) ret = CAIRO_TEST_FAILURE; cairo_new_path (cr2); cairo_arc (cr2, 200, 400, 0., 0, 2 * M_PI); phase = "Degenerate arc (R=0)"; if (!check_extents (phase, cr2, FILL, EQUALS, 0, 0, 0, 0) || - !check_extents (phase, cr2, STROKE, EQUALS, 0, 0, 0, 0)) + !check_extents (phase, cr2, STROKE, EQUALS, 0, 0, 0, 0) || + !check_extents (phase, cr2, PATH, EQUALS, 200, 400, 0, 0)) ret = CAIRO_TEST_FAILURE; cairo_new_path (cr2); cairo_arc (cr2, 200, 400, 10., 0, 0); phase = "Degenerate arc (Θ=0)"; if (!check_extents (phase, cr2, FILL, EQUALS, 0, 0, 0, 0) || - !check_extents (phase, cr2, STROKE, EQUALS, 0, 0, 0, 0)) + !check_extents (phase, cr2, STROKE, EQUALS, 0, 0, 0, 0) || + !check_extents (phase, cr2, PATH, EQUALS, 200, 400, 0, 0)) ret = CAIRO_TEST_FAILURE; cairo_new_path (cr2); |