diff options
author | Andrea Canciani <ranma42@gmail.com> | 2010-10-22 23:06:36 +0200 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2010-10-29 17:31:23 +0200 |
commit | a1d8763236ccbb7bc11724a87b25bacafce44a7c (patch) | |
tree | bacb04569c85cf811588464288fdc04423ac262c /src/cairo-path-fixed.c | |
parent | 02687065509aa4dead4528b2c8dd9aa31dc76332 (diff) |
path: Replace _cairo_path_fixed_extents_add with _cairo_box_add_point
Path extents now satisfy _cairo_box_add_point requirements, so it can
be used instead of _cairo_path_fixed_extents_add.
Diffstat (limited to 'src/cairo-path-fixed.c')
-rw-r--r-- | src/cairo-path-fixed.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c index 8952cff13..636a88931 100644 --- a/src/cairo-path-fixed.c +++ b/src/cairo-path-fixed.c @@ -408,21 +408,6 @@ _cairo_path_fixed_drop_line_to (cairo_path_fixed_t *path) buf->num_ops--; } -static inline void -_cairo_path_fixed_extents_add (cairo_path_fixed_t *path, - const cairo_point_t *point) -{ - if (point->x < path->extents.p1.x) - path->extents.p1.x = point->x; - if (point->y < path->extents.p1.y) - path->extents.p1.y = point->y; - - if (point->x > path->extents.p2.x) - path->extents.p2.x = point->x; - if (point->y > path->extents.p2.y) - path->extents.p2.y = point->y; -} - cairo_status_t _cairo_path_fixed_move_to (cairo_path_fixed_t *path, cairo_fixed_t x, @@ -625,9 +610,9 @@ _cairo_path_fixed_curve_to (cairo_path_fixed_t *path, point[2].x = x2; point[2].y = y2; /* coarse bounds */ - _cairo_path_fixed_extents_add (path, &point[0]); - _cairo_path_fixed_extents_add (path, &point[1]); - _cairo_path_fixed_extents_add (path, &point[2]); + _cairo_box_add_point (&path->extents, &point[0]); + _cairo_box_add_point (&path->extents, &point[1]); + _cairo_box_add_point (&path->extents, &point[2]); path->current_point = point[2]; path->has_curve_to = TRUE; |