[cairo-commit] test/get-path-extents.c

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Feb 21 08:50:40 PST 2007


 test/get-path-extents.c |   13 +++++++++++++
 1 files changed, 13 insertions(+)

New commits:
diff-tree c6a067f967f9b92328e7d1ca2a4eba6fb4c6dfdf (from 363b1a40b5719582c670bdb9e7cd8087bcbf9666)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Feb 21 11:50:24 2007 -0500

    [test] Add test case for bug #7965 to the get-path-extents test

diff --git a/test/get-path-extents.c b/test/get-path-extents.c
index e755f84..c487400 100644
--- a/test/get-path-extents.c
+++ b/test/get-path-extents.c
@@ -114,6 +114,19 @@ draw (cairo_t *cr, int width, int height
         !check_extents (phase, cr2, STROKE, EQUALS, 0, 0, 0, 0))
 	return CAIRO_TEST_FAILURE;
 
+    /* http://bugs.freedesktop.org/show_bug.cgi?id=7965 */
+    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_move_to (cr2, 0, 180);
+    cairo_line_to (cr2, 750, 180);
+    if (!check_extents (phase, cr2, FILL, EQUALS, 0, 0, 0, 0) ||
+        !check_extents (phase, cr2, STROKE, EQUALS, -5, 175, 760, 10))
+	return CAIRO_TEST_FAILURE;
+    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