[cairo-commit] src/cairo.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Dec 30 08:24:10 PST 2009


 src/cairo.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit a0ea0b63fdd38a73d6696da5cd4800d9a7289240
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Dec 30 16:21:50 2009 +0000

    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

diff --git a/src/cairo.c b/src/cairo.c
index 8d16314..3c9d892 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;


More information about the cairo-commit mailing list