diff options
author | Carl Worth <cworth@cworth.org> | 2008-02-14 12:27:47 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2008-02-20 04:04:04 -0800 |
commit | 1747718406b3450bc8869f0e050f9a18b3036030 (patch) | |
tree | 22fbc72591ffad9d81994abeb6278c5410bb85b3 /test/degenerate-pen.c | |
parent | d6d81c92b501b32be6c48d134683ebd51f63c134 (diff) | |
download | cairo-1747718406b3450bc8869f0e050f9a18b3036030.tar.gz |
Add a spline to the degenerate-pen test case
This was triggering an infinite loop (with 24.8 fixed-point) just before
the previous fix.
NOTE: I usually put bug demonstrations just before the fixes, but this
one was quite harsh---not only was cairo looping infinitely, but it
was appending to an array on each iteration---so not kind at all.
Diffstat (limited to 'test/degenerate-pen.c')
-rw-r--r-- | test/degenerate-pen.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/degenerate-pen.c b/test/degenerate-pen.c index c92a6893e..858949f50 100644 --- a/test/degenerate-pen.c +++ b/test/degenerate-pen.c @@ -66,6 +66,7 @@ draw (cairo_t *cr, int width, int height) /* First compress the pen to a vertical line. */ cairo_rectangle (cr, 0, 0, SIZE, SIZE); + cairo_curve_to (cr, SIZE / 2, 0, SIZE, SIZE / 2, SIZE, SIZE); cairo_save (cr); { cairo_scale (cr, 0.000001, 1.0); @@ -77,6 +78,7 @@ draw (cairo_t *cr, int width, int height) /* Then compress the pen to a horizontal line. */ cairo_rectangle (cr, 0, 0, SIZE, SIZE); + cairo_curve_to (cr, SIZE / 2, 0, SIZE, SIZE / 2, SIZE, SIZE); cairo_save (cr); { cairo_scale (cr, 1.0, 0.000001); @@ -88,6 +90,7 @@ draw (cairo_t *cr, int width, int height) /* Finally a line at an angle. */ cairo_rectangle (cr, 0, 0, SIZE, SIZE); + cairo_curve_to (cr, SIZE / 2, 0, SIZE, SIZE / 2, SIZE, SIZE); cairo_save (cr); { cairo_rotate (cr, M_PI / 4.0); |