summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-02-18 19:56:39 +0100
committerBenjamin Otte <otte@redhat.com>2011-02-18 19:56:39 +0100
commit24ed8b1e60ea21dcf88fdade34078bbdd617bcbe (patch)
tree9aa7207d16e1421f2a2044b5ba7bdd56df41f0ba
parent9d37bd963005549640171c88aa519eba3e1d0e34 (diff)
downloadcairo-24ed8b1e60ea21dcf88fdade34078bbdd617bcbe.tar.gz
arc: Handle radius == 0 the same no matter the arc direction
Commit a0ea0b63fdd38a73d6696da5cd4800d9a7289240 fixed cairo_arc() but did not apply the same patch to cairo_arc_negative(). This patch fixes that oversight.
-rw-r--r--src/cairo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cairo.c b/src/cairo.c
index 5117f8a97..1e8332ae9 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -1896,7 +1896,12 @@ cairo_arc_negative (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); /* might become a move_to */
+ cairo_line_to (cr, xc, yc);
+ return;
+ }
+
return;
while (angle2 > angle1)