summaryrefslogtreecommitdiff
path: root/src/cairo-path-fixed-private.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-07-05 09:09:42 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-07-05 09:30:02 +0100
commit1645352bfb69cc6d43fcbf3c77b4da5693af322a (patch)
tree5c0dc8db321c5a5b239ea9e2ef1a1773ee22f961 /src/cairo-path-fixed-private.h
parent4bb157672ef8cb7d486d6ccdaaa3890e3f45e17a (diff)
[path] Evaluate is_box && is_region during construction
Whilst constructing the path, if the operations continue to be axis-aligned lines, allow the is_box and is_region flags to persist. These are set to false as soon as a curve-to is added, a diagonal or in the case of is_region a non-integer point.
Diffstat (limited to 'src/cairo-path-fixed-private.h')
-rw-r--r--src/cairo-path-fixed-private.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cairo-path-fixed-private.h b/src/cairo-path-fixed-private.h
index 0ade9880..5df18493 100644
--- a/src/cairo-path-fixed-private.h
+++ b/src/cairo-path-fixed-private.h
@@ -73,6 +73,8 @@ struct _cairo_path_fixed {
cairo_point_t current_point;
unsigned int has_current_point : 1;
unsigned int has_curve_to : 1;
+ unsigned int is_box : 1;
+ unsigned int is_region : 1;
cairo_path_buf_t *buf_tail;
cairo_path_buf_fixed_t buf_head;
@@ -105,4 +107,10 @@ _cairo_path_fixed_iter_is_fill_box (cairo_path_fixed_iter_t *_iter,
cairo_private cairo_bool_t
_cairo_path_fixed_iter_at_end (const cairo_path_fixed_iter_t *iter);
+static inline cairo_bool_t
+_cairo_path_fixed_is_region (cairo_path_fixed_t *path)
+{
+ return path->is_region;
+}
+
#endif /* CAIRO_PATH_FIXED_PRIVATE_H */