[cairo-commit] src/cairo-gstate.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Oct 26 10:07:50 PDT 2007


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

New commits:
commit 0c02b998f9e8589a90b2e744392995903b94414f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Oct 26 18:06:36 2007 +0100

    [cairo-gstate] Allow angle==0 whilst rotating.
    
    Cut'n'paste error whilst copying the NaN check from
    _cairo_gstate_scale() flagged the no rotation case as an error.

diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index 1d70611..0c6b217 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -663,7 +663,10 @@ _cairo_gstate_rotate (cairo_gstate_t *gstate, double angle)
 {
     cairo_matrix_t tmp;
 
-    if (! (angle * angle > 0.)) /* check for NaNs */
+    if (angle == 0.)
+	return CAIRO_STATUS_SUCCESS;
+
+    if (! (angle * angle >= 0.)) /* check for NaNs */
 	return _cairo_error (CAIRO_STATUS_INVALID_MATRIX);
 
     _cairo_gstate_unset_scaled_font (gstate);


More information about the cairo-commit mailing list