summaryrefslogtreecommitdiff
path: root/src/cairo-clip.c
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2010-10-16 23:57:06 +0200
committerAndrea Canciani <ranma42@gmail.com>2010-10-29 17:31:21 +0200
commite9c1fc31887c5bfbb7d086f923a7628b7cfa739c (patch)
treeeb09b160574905223235f4efb45e0e165689946a /src/cairo-clip.c
parent14cc9846b302a990e65d7572e7f095a8873a213d (diff)
downloadcairo-e9c1fc31887c5bfbb7d086f923a7628b7cfa739c.tar.gz
path: Do not access flags directly
Use inline accessors to hide the flags in the code. This ensures that flags that need additional computations (example: is_rectilinear for the fill case) are always used correctly.
Diffstat (limited to 'src/cairo-clip.c')
-rw-r--r--src/cairo-clip.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index d5a2fab7e..5b5d66ee9 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -229,7 +229,7 @@ _cairo_clip_intersect_path (cairo_clip_t *clip,
if (clip->path != NULL) {
if (clip->path->fill_rule == fill_rule &&
- (path->is_rectilinear || tolerance == clip->path->tolerance) &&
+ (_cairo_path_fixed_fill_is_rectilinear (path) || tolerance == clip->path->tolerance) &&
antialias == clip->path->antialias &&
_cairo_path_fixed_equal (&clip->path->path, path))
{
@@ -553,7 +553,7 @@ static inline cairo_bool_t
_clip_paths_are_rectilinear (cairo_clip_path_t *clip_path)
{
while (clip_path != NULL) {
- if (! clip_path->path.is_rectilinear)
+ if (! _cairo_path_fixed_fill_is_rectilinear (&clip_path->path))
return FALSE;
clip_path = clip_path->prev;
@@ -578,7 +578,7 @@ _cairo_clip_path_to_region_geometric (cairo_clip_path_t *clip_path)
goto UNSUPPORTED;
/* Start simple... Intersect some boxes with an arbitrary path. */
- if (! clip_path->path.is_rectilinear)
+ if (! _cairo_path_fixed_fill_is_rectilinear (&clip_path->path))
goto UNSUPPORTED;
if (clip_path->prev->prev != NULL)
goto UNSUPPORTED;
@@ -651,7 +651,7 @@ _cairo_clip_path_to_region (cairo_clip_path_t *clip_path)
CAIRO_STATUS_SUCCESS;
}
- if (! clip_path->path.maybe_fill_region)
+ if (! _cairo_path_fixed_fill_maybe_region (&clip_path->path))
return _cairo_clip_path_to_region_geometric (clip_path);
/* first retrieve the region for our antecedents */
@@ -961,7 +961,7 @@ _cairo_clip_path_get_surface (cairo_clip_path_t *clip_path,
while (clip_path->prev != NULL &&
clip_path->flags & CAIRO_CLIP_PATH_IS_BOX &&
- clip_path->path.maybe_fill_region)
+ _cairo_path_fixed_fill_maybe_region (&clip_path->path))
{
clip_path = clip_path->prev;
}
@@ -989,7 +989,7 @@ _cairo_clip_path_get_surface (cairo_clip_path_t *clip_path,
need_translate = clip_extents->x | clip_extents->y;
if (clip_path->flags & CAIRO_CLIP_PATH_IS_BOX &&
- clip_path->path.maybe_fill_region)
+ _cairo_path_fixed_fill_maybe_region (&clip_path->path))
{
status = _cairo_surface_paint (surface,
CAIRO_OPERATOR_SOURCE,
@@ -1033,11 +1033,11 @@ _cairo_clip_path_get_surface (cairo_clip_path_t *clip_path,
prev = clip_path->prev;
while (prev != NULL) {
if (prev->flags & CAIRO_CLIP_PATH_IS_BOX &&
- prev->path.maybe_fill_region)
+ _cairo_path_fixed_fill_maybe_region (&prev->path))
{
/* a simple box only affects the extents */
}
- else if (prev->path.is_rectilinear ||
+ else if (_cairo_path_fixed_fill_is_rectilinear (&prev->path) ||
prev->surface == NULL ||
prev->surface->backend != target->backend)
{
@@ -1233,7 +1233,7 @@ _cairo_clip_combine_with_surface (cairo_clip_t *clip,
}
if (clip_path->flags & CAIRO_CLIP_PATH_IS_BOX &&
- clip_path->path.maybe_fill_region)
+ _cairo_path_fixed_fill_maybe_region (&clip_path->path))
{
continue;
}