diff options
author | Carl Worth <cworth@cworth.org> | 2007-04-10 10:45:15 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2007-04-10 10:45:15 -0700 |
commit | b1086caf3b108b0df19f70a2b6df161ad51bb280 (patch) | |
tree | afd4c39feb6628539a37e9ba7155f739ca5520e6 /src/cairo-pen.c | |
parent | bff45ec9f90b5949a8ffa19cb03c140a08119e4d (diff) | |
download | cairo-b1086caf3b108b0df19f70a2b6df161ad51bb280.tar.gz |
Add a status field to cairo_polygon_t
Now, the functions to add new data to a polygon all become void,
and there's a new _cairo_polygon_status call to query the status
at the end of a sequence of operations.
With this change, we fix many callerswhich were previously not
checking the return values of _cairo_polygon functions by adding
only a single call to _cairo_polygon_status rathern than several
new checks.
Diffstat (limited to 'src/cairo-pen.c')
-rw-r--r-- | src/cairo-pen.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cairo-pen.c b/src/cairo-pen.c index c53201900..ec9eb7ac4 100644 --- a/src/cairo-pen.c +++ b/src/cairo-pen.c @@ -399,9 +399,8 @@ _cairo_pen_stroke_spline_half (cairo_pen_t *pen, while (i != stop) { hull_point.x = point[i].x + pen->vertices[active].point.x; hull_point.y = point[i].y + pen->vertices[active].point.y; - status = _cairo_polygon_line_to (polygon, &hull_point); - if (status) - return status; + + _cairo_polygon_line_to (polygon, &hull_point); if (i + step == stop) slope = final_slope; @@ -452,9 +451,11 @@ _cairo_pen_stroke_spline (cairo_pen_t *pen, if (status) goto BAIL; - status = _cairo_polygon_close (&polygon); + _cairo_polygon_close (&polygon); + status = _cairo_polygon_status (&polygon); if (status) goto BAIL; + status = _cairo_bentley_ottmann_tessellate_polygon (traps, &polygon, CAIRO_FILL_RULE_WINDING); BAIL: _cairo_polygon_fini (&polygon); |