[PATCH] Add a spline to the degenerate-pen test case
Carl Worth
cworth at cworth.org
Thu Feb 14 12:27:47 PST 2008
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.
---
test/degenerate-pen-ref.png | Bin 278 -> 788 bytes
test/degenerate-pen.c | 3 +++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/test/degenerate-pen-ref.png b/test/degenerate-pen-ref.png
index 0ad3325b58ccaa61bd2b9c845f5bc54b695a8fb6..539a32572287e58d3be7a78ab1b19ec240d5a74f 100644
GIT binary patch
delta 740
zcmV<A0vr970+a at jJb%~%4io_>pC^K*0008ENkl<ZXo2n7J!lj`7{>8mG-472wNML1
zf?}s23Vv1=R@#|D5CjVg3k5~6v9whS3mZSMjL|A~TBum~fe^Ix8?96{1|<eHXED26
zVzPI8w>uYv{lmiE?aVXtKJU)#>?{=(6%`d_(UtLktwZg^=6~Nf#_<q;+SGf5)6EKX
zw<%tfG}z7PPmbkyg4-BtQ?F~5|EAK5UCH?v9=FiOMohHWuW9sP1$N*FZs42H(aGfZ
zngaSYGlTBMK|H`UY$~XCD>+~Z_TVBuPbq&7J9D-%Rj)MCpr0lk`hnxx8``s(kkW;H
zcqxDKnwdJ49)BFd3-z1i3YIo$BZ{dhY0$5dP7MopLMt>fHKh;d at LludwPI>YH;xL^
zKn?G(r9t_qrlzDpPvSXNwoo^ZsVRH$RpaEfV`|E3+)wKN#QuzO9WgZ}4f+jM<*d_+
zsjwa&WGAnPsf4 at se4_COhi56%QB$c0{S1q9lyB8k!hZ_kz1fpj)YO!d!pQrL110Dc
zre6qpSo4QhJEp=0jGCFevP^|jiPnVabL^a$N<HWkP0F=vDq*^rG(CA`nhIytA71II
zV9rb>1pOUr8<Z(xD)pe#<dtn|xBA2DatV5+a27)it`{}6PguwP5RzB6sf1O*m at q1~
zm!MaeK7V0xo%L2!)KnNqG=?(t$}r(rqI<U_y}}IOYR0uPOzjfh?j|$z$}nMpFd}OB
zm{)IJ!A2W#6YH=jl70;r#N7e=g)_<dvb>dInp(pp?2g#Rpzu(P$soQY=kxPah-oUJ
zL)#+ij|*FcF&W48<a}$M3b9Qc$EV0`+=;ADeO)eXwv&bUro!vU`XiC`346S`>4d3o
zBkRXb8exMzH(8%k{-<wLqYbWY6 at Sj1!CZZ#D%0ej8G0jFSYkU9!dHWeii(Pg4)Pat
WTG7^k`)>9C0000<MNUMnLSTYb3~B-Z
delta 226
zcmbQjHjQb5P5pH)IdL<IT at 6fc7#J9Kc)B=-WHi3LY0Y)WLB#FhVvb!h*5(Pzy^F%_
zxQ?>k*eN&rMnsxN%WvrkpB-l<?qF6AR#os^Wt6?9+}=w4Eyo(J=e7-pFD$Ek*m(cN
zirT{3&+88C`_S|Cx#X6NHU6cWwe~g`mnQlroBNdp|DP4e+#?m8aD`zpn}q3s6^w4Y
z23ZXtF;pRk*QfvQ|FifO!}djy(GTp>lC`s<N}uej^iPPaIL3NI^xR~X-Vbbnn*;<G
TJwDM6^aO*atDnm{r-UW|s25={
diff --git a/test/degenerate-pen.c b/test/degenerate-pen.c
index c92a689..858949f 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);
--
1.5.3.2
More information about the cairo
mailing list