[cairo-commit] test/get-path-extents.c
Jeff Muizelaar
jrmuizel at kemper.freedesktop.org
Wed Nov 10 11:22:23 PST 2010
test/get-path-extents.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
New commits:
commit 7237eb62be34370b34e0ba31504b5ae2708e44e5
Author: Jeff Muizelaar <jmuizelaar at mozilla.com>
Date: Wed Nov 10 14:21:58 2010 -0500
Sync get-path-extents test with the one on 1.10.
The problem fixed by e9bb70d2dee4ef7a54e3971f09a08df30c2b5287
had already been fixed on master by always computing exact extents:
89e1261dd0fdb6c6c0271f71dd84d72504969ab1
diff --git a/test/get-path-extents.c b/test/get-path-extents.c
index 7a09317..5bd3eb7 100644
--- a/test/get-path-extents.c
+++ b/test/get-path-extents.c
@@ -187,7 +187,7 @@ draw (cairo_t *cr, int width, int height)
cairo_restore (cr2);
/* http://bugs.freedesktop.org/show_bug.cgi?id=7965 */
- phase = "A vertical, open path";
+ phase = "A horizontal, open path";
cairo_save (cr2);
cairo_set_line_cap (cr2, CAIRO_LINE_CAP_ROUND);
cairo_set_line_join (cr2, CAIRO_LINE_JOIN_ROUND);
@@ -199,6 +199,32 @@ draw (cairo_t *cr, int width, int height)
cairo_new_path (cr2);
cairo_restore (cr2);
+ phase = "A vertical, open path";
+ cairo_save (cr2);
+ cairo_set_line_cap (cr2, CAIRO_LINE_CAP_ROUND);
+ cairo_set_line_join (cr2, CAIRO_LINE_JOIN_ROUND);
+ cairo_new_path (cr2);
+ cairo_move_to (cr2, 180, 0);
+ cairo_line_to (cr2, 180, 750);
+ errors += !check_extents (ctx, phase, cr2, FILL, EQUALS, 0, 0, 0, 0);
+ errors += !check_extents (ctx, phase, cr2, STROKE, EQUALS, 175, -5, 10, 760);
+ errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 180, 0, 0, 750);
+ cairo_new_path (cr2);
+ cairo_restore (cr2);
+
+ phase = "A degenerate open path";
+ cairo_save (cr2);
+ cairo_set_line_cap (cr2, CAIRO_LINE_CAP_ROUND);
+ cairo_set_line_join (cr2, CAIRO_LINE_JOIN_ROUND);
+ cairo_new_path (cr2);
+ cairo_move_to (cr2, 180, 0);
+ cairo_line_to (cr2, 180, 0);
+ errors += !check_extents (ctx, phase, cr2, FILL, EQUALS, 0, 0, 0, 0);
+ errors += !check_extents (ctx, phase, cr2, STROKE, EQUALS, 175, -5, 10, 10);
+ errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 180, 0, 0, 0);
+ cairo_new_path (cr2);
+ cairo_restore (cr2);
+
phase = "Simple rect";
cairo_save (cr2);
cairo_rectangle (cr2, 10, 10, 80, 80);
More information about the cairo-commit
mailing list