[cairo-commit] Branch '1.10' - src/cairo.c

Benjamin Otte company at kemper.freedesktop.org
Fri Feb 18 10:59:54 PST 2011


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

New commits:
commit 24ed8b1e60ea21dcf88fdade34078bbdd617bcbe
Author: Benjamin Otte <otte at redhat.com>
Date:   Fri Feb 18 19:56:39 2011 +0100

    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.

diff --git a/src/cairo.c b/src/cairo.c
index 5117f8a..1e8332a 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)


More information about the cairo-commit mailing list