From 7237eb62be34370b34e0ba31504b5ae2708e44e5 Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Wed, 10 Nov 2010 14:21:58 -0500 Subject: [PATCH] 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 --- test/get-path-extents.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/test/get-path-extents.c b/test/get-path-extents.c index 7a09317d4..5bd3eb70a 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);