diff options
author | Carl Worth <cworth@cworth.org> | 2006-10-18 15:01:58 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2006-11-02 13:02:03 -0800 |
commit | 137ced1dd7a8d6a161be8f3b7e186cf60ce59d91 (patch) | |
tree | 2c61f787273a0fd1c905e7644142b0d8159bd135 | |
parent | 75b6d21ed5af7bb25d760423f6de2610bbbc24f0 (diff) |
test/infinite-join: Modify to draw something visible, and make the output a more reasonable size.
The modification was performed with care to ensure that the bug
is still exercised. Also, reference images are added.
(cherry picked from 5b7a7f39ad8b726e9ee582bcd10500a1e5b16554 commit)
-rw-r--r-- | test/infinite-join.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/test/infinite-join.c b/test/infinite-join.c index fffb38615..74d4206fa 100644 --- a/test/infinite-join.c +++ b/test/infinite-join.c @@ -38,13 +38,18 @@ static cairo_test_draw_function_t draw; cairo_test_t test = { "infinite-join", "Test case for infinite loop when stroking with round joins", - 120, 70, + 8, 8, draw }; static cairo_test_status_t draw (cairo_t *cr, int width, int height) { + /* Paint white, then draw in black. */ + cairo_set_source_rgb (cr, 1, 1, 1); /* white */ + cairo_paint (cr); + cairo_set_source_rgb (cr, 0, 0, 0); /* black */ + cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND); /* scaling 2 times causes a slight rounding error in the ctm. @@ -55,11 +60,13 @@ draw (cairo_t *cr, int width, int height) cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND); cairo_set_line_width (cr, 20); + cairo_translate (cr, -18300, -13200); + cairo_new_path (cr); cairo_move_to (cr, 18928, 13843); - cairo_line_to (cr, -6928, 13843); - cairo_line_to (cr, -6928, -6842); - cairo_line_to (cr, 18928, -6842); + cairo_line_to (cr, 18500, 13843); + cairo_line_to (cr, 18500, 13400); + cairo_line_to (cr, 18928, 13400); cairo_line_to (cr, 18928, 13843); cairo_stroke (cr); |