summaryrefslogtreecommitdiff
path: root/test/infinite-join.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-10-18 15:01:58 -0700
committerCarl Worth <cworth@cworth.org>2006-10-18 15:01:58 -0700
commit5b7a7f39ad8b726e9ee582bcd10500a1e5b16554 (patch)
tree32da3428a2e4d7e94bbeb42d79d9c01287ebe054 /test/infinite-join.c
parent5492a7c7618a747130b844a509fb79b886f1bc54 (diff)
downloadcairo-5b7a7f39ad8b726e9ee582bcd10500a1e5b16554.tar.gz
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.
Diffstat (limited to 'test/infinite-join.c')
-rw-r--r--test/infinite-join.c15
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);