[cairo-commit] 3 commits - src/cairo.c src/cairo-ft-font.c src/cairo-win32-font.c

Carl Worth cworth at kemper.freedesktop.org
Tue Oct 30 11:36:45 PDT 2007


 src/cairo-ft-font.c    |    3 +--
 src/cairo-win32-font.c |    3 +--
 src/cairo.c            |    7 +++++--
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 6957aa27e8df55ed3ef1e0cfc62c714ad9b644ee
Merge: 00d701f... 8d8724e...
Author: Carl Worth <cworth at cworth.org>
Date:   Tue Oct 30 09:45:59 2007 -0700

    Merge in fix for get-path-extents test case.
    
    With independent fixes on both branches, the test case now
    passes completely. Hurrah!

commit 8d8724e80462593f6fee434cf972a67cb4ded282
Author: Carl Worth <cworth at cworth.org>
Date:   Tue Oct 30 09:45:45 2007 -0700

    Improve brace readability for multi-line conditional

diff --git a/src/cairo.c b/src/cairo.c
index d5ee15c..f2b7917 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -3170,11 +3170,14 @@ cairo_get_current_point (cairo_t *cr, double *x_ret, double *y_ret)
     double x, y;
 
     if (cr->status == CAIRO_STATUS_SUCCESS &&
-	_cairo_path_fixed_get_current_point (cr->path, &x_fixed, &y_fixed)) {
+	_cairo_path_fixed_get_current_point (cr->path, &x_fixed, &y_fixed))
+    {
 	x = _cairo_fixed_to_double (x_fixed);
 	y = _cairo_fixed_to_double (y_fixed);
 	_cairo_gstate_backend_to_user (cr->gstate, &x, &y);
-    } else {
+    }
+    else
+    {
 	x = 0.0;
 	y = 0.0;
     }
commit f43f0c104045a88de87c5ebf28309a5ba728203e
Author: Carl Worth <cworth at cworth.org>
Date:   Tue Oct 30 09:44:42 2007 -0700

    Fix remaining two calls to _cairo_path_fixed_get_current_point
    
    The previous commit failed to fix up two callers to the
    _cairo_path_fixed_get_current_point function, (and since
    C doesn't distinguish between an enum and our integer-as-
    Boolean, the compiler didn't complain).
    
    Fortunately, though, the test suite did complain, as the
    bug introduced a new failure into the get-path-extents
    test, and git-bisect helpfully pointed to the previous
    commit.
    
    With this fix, the new failure of get-path-extents is
    eliminated, (though, in this branch the arc-based failure
    of that test still exists).

diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index f56cd8b..e8e7d1a 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -1734,8 +1734,7 @@ _conic_to (FT_Vector *control, FT_Vector *to, void *closure)
     cairo_fixed_t x3, y3;
     cairo_point_t conic;
 
-    if (_cairo_path_fixed_get_current_point (path, &x0, &y0) !=
-	    CAIRO_STATUS_SUCCESS)
+    if (! _cairo_path_fixed_get_current_point (path, &x0, &y0))
 	return 1;
 
     conic.x = _cairo_fixed_from_26_6 (control->x);
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c
index 32e47df..dbabbef 100644
--- a/src/cairo-win32-font.c
+++ b/src/cairo-win32-font.c
@@ -1421,8 +1421,7 @@ _cairo_win32_scaled_font_init_glyph_path (cairo_win32_scaled_font_t *scaled_font
 	    case TT_PRIM_QSPLINE:
 		for (i = 0; i < curve->cpfx - 1; i++) {
 		    cairo_fixed_t p1x, p1y, p2x, p2y, cx, cy, c1x, c1y, c2x, c2y;
-		    status = _cairo_path_fixed_get_current_point (path, &p1x, &p1y);
-		    if (status)
+		    if (! _cairo_path_fixed_get_current_point (path, &p1x, &p1y))
 			goto CLEANUP_BUFFER;
                     _cairo_win32_transform_FIXED_to_fixed (&transform,
                                                            points[i].x,


More information about the cairo-commit mailing list