summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-12-30 16:21:50 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2009-12-30 16:21:50 +0000
commita0ea0b63fdd38a73d6696da5cd4800d9a7289240 (patch)
tree46e2bf4a593093f15ef023101c81d083733b1387
parent21560b3ec6d015004867207c5bdd90061b8a5d80 (diff)
arc: Just emit a line-to if radius is zero.
In order to be consistent with the semantics of cairo_arc() using a radius of 0 should simply degenerate into a line-to. Reported-by: Benjamin Berg
-rw-r--r--src/cairo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo.c b/src/cairo.c
index 8d1631452..3c9d892ea 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -1678,8 +1678,10 @@ cairo_arc (cairo_t *cr,
return;
/* Do nothing, successfully, if radius is <= 0 */
- if (radius <= 0.0)
+ if (radius <= 0.0) {
+ cairo_line_to (cr, xc, yc);
return;
+ }
while (angle2 < angle1)
angle2 += 2 * M_PI;