mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-06 09:18:11 +02:00
Sync get-path-extents test with the one on 1.10.
The problem fixed bye9bb70d2dehad already been fixed on master by always computing exact extents:89e1261dd0
This commit is contained in:
parent
3afd7cd031
commit
7237eb62be
1 changed files with 27 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue