Skip to content

Commit

Permalink
Sync get-path-extents test with the one on 1.10.
Browse files Browse the repository at this point in the history
The problem fixed by e9bb70d
had already been fixed on master by always computing exact extents:
89e1261
  • Loading branch information
Jeff Muizelaar committed Nov 10, 2010
1 parent 3afd7cd commit 7237eb6
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion test/get-path-extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 7237eb6

Please sign in to comment.