[cairo-commit] src/cairo.c test/Makefile.sources

Benjamin Otte company at kemper.freedesktop.org
Fri Feb 18 10:52:34 PST 2011


 src/cairo.c           |    7 ++++++-
 test/Makefile.sources |    1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit e46dc9e17a6f6737d5624dbcdd3c42c2353a72f1
Author: Benjamin Otte <otte at redhat.com>
Date:   Fri Feb 18 19:51:44 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 73dbaee..8c19cd1 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -1904,7 +1904,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;
 
     if (angle2 > angle1) {
diff --git a/test/Makefile.sources b/test/Makefile.sources
index e88c85c..207dcd0 100644
--- a/test/Makefile.sources
+++ b/test/Makefile.sources
@@ -11,6 +11,7 @@ test_sources = \
 	alpha-similar.c					\
 	arc-infinite-loop.c				\
 	arc-looping-dash.c				\
+	arc-negative.c					\
 	api-special-cases.c				\
 	big-line.c					\
 	big-trap.c					\


More information about the cairo-commit mailing list