summaryrefslogtreecommitdiff
path: root/src/cairo-path-fixed.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-08-09 23:39:07 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-08-10 10:23:51 +0100
commit34ce4680d12aecc5565e09fcc6a6a9103e1c752d (patch)
treed748ea1ff402e9cf079a8eddad6d38b0fae891a0 /src/cairo-path-fixed.c
parentf8a30380084ae3d6ac4aa7b18d738d6e6980cb05 (diff)
fixed: Allow the implicit close of the last fill path to complete a fill-box
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-path-fixed.c')
-rw-r--r--src/cairo-path-fixed.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c
index 7af45f86a..a562e5bbf 100644
--- a/src/cairo-path-fixed.c
+++ b/src/cairo-path-fixed.c
@@ -1375,13 +1375,13 @@ _cairo_path_fixed_iter_is_fill_box (cairo_path_fixed_iter_t *_iter,
if (iter.buf->op[iter.n_op] != CAIRO_PATH_OP_LINE_TO)
return FALSE;
points[3] = iter.buf->points[iter.n_point++];
- if (! _cairo_path_fixed_iter_next_op (&iter))
- return FALSE;
/* Now, there are choices. The rectangle might end with a LINE_TO
* (to the original point), but this isn't required. If it
* doesn't, then it must end with a CLOSE_PATH (which may be implicit). */
- if (iter.buf->op[iter.n_op] == CAIRO_PATH_OP_LINE_TO) {
+ if (! _cairo_path_fixed_iter_next_op (&iter)) {
+ /* implicit close due to fill */
+ } else if (iter.buf->op[iter.n_op] == CAIRO_PATH_OP_LINE_TO) {
points[4] = iter.buf->points[iter.n_point++];
if (points[4].x != points[0].x || points[4].y != points[0].y)
return FALSE;
@@ -1389,7 +1389,7 @@ _cairo_path_fixed_iter_is_fill_box (cairo_path_fixed_iter_t *_iter,
} else if (iter.buf->op[iter.n_op] == CAIRO_PATH_OP_CLOSE_PATH) {
_cairo_path_fixed_iter_next_op (&iter);
} else if (iter.buf->op[iter.n_op] == CAIRO_PATH_OP_MOVE_TO) {
- /* implicit close-path */
+ /* implicit close-path due to new-sub-path */
} else {
return FALSE;
}