summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Muizelaar <jmuizelaar@mozilla.com>2013-11-07 18:34:15 -0500
committerJeff Muizelaar <jmuizelaar@mozilla.com>2013-11-07 18:34:15 -0500
commit17f1e44dee1491a66c6a22164d6121188a196c68 (patch)
tree611fd91c4e67618bc2f60093c92cb1e06bd2e008
parent3ba704a390d332ff27e7793e68db248d3a1c77d0 (diff)
Handle another degeneracy.stroke-to-path2
Caught by Bas
-rw-r--r--src/cairo-spline-offset.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cairo-spline-offset.c b/src/cairo-spline-offset.c
index 211938c9..b7e09ad5 100644
--- a/src/cairo-spline-offset.c
+++ b/src/cairo-spline-offset.c
@@ -354,6 +354,11 @@ inflection_points (knots_t s)
solving gives:
x = -c/b
*/
+ if (b == 0.) {
+ /* no inflection points */
+ ret.t1 = ret.t2 = 1.;
+ ret.count = 0;
+ }
ret.t1 = -c/b;
ret.t2 = ret.t1;
ret.count = 1;