[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.
This commit is contained in:
Chris Wilson 2007-10-26 18:06:36 +01:00
parent ce44cd6523
commit 0c02b998f9

View file

@ -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);