Skip to content

Commit

Permalink
path: Tighten curve_to extents
Browse files Browse the repository at this point in the history
The additional time spent in the computation of tight extents for the
curve_to operation doesn't seem to be significant, but it makes the
extents computations faster and the approximations more accurate.
  • Loading branch information
Andrea Canciani committed Oct 29, 2010
1 parent 0655198 commit 958c56e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/cairo-path-fixed.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,8 @@ _cairo_path_fixed_curve_to (cairo_path_fixed_t *path,
point[1].x = x1; point[1].y = y1;
point[2].x = x2; point[2].y = y2;

/* coarse bounds */
_cairo_box_add_point (&path->extents, &point[0]);
_cairo_box_add_point (&path->extents, &point[1]);
_cairo_box_add_point (&path->extents, &point[2]);
_cairo_box_add_curve_to (&path->extents, &path->current_point,
&point[0], &point[1], &point[2]);

path->current_point = point[2];
path->has_curve_to = TRUE;
Expand Down

0 comments on commit 958c56e

Please sign in to comment.