diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-12-30 16:21:50 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-02-19 13:33:42 -0800 |
commit | af10ae114b005c5a5ed92e2130371bed2bfba210 (patch) | |
tree | 9f8dd49bebe0de033594e0bf8ac07a23a121f1b8 | |
parent | 546edda52190ceaf8024113e6685e5f8fb275f19 (diff) | |
download | cairo-af10ae114b005c5a5ed92e2130371bed2bfba210.tar.gz |
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
(cherry picked from commit a0ea0b63fdd38a73d6696da5cd4800d9a7289240)
-rw-r--r-- | src/cairo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo.c b/src/cairo.c index 63d269336..ceaf3a8e6 100644 --- a/src/cairo.c +++ b/src/cairo.c @@ -1572,8 +1572,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; |