diff options
author | Andrea Canciani <ranma42@gmail.com> | 2010-10-21 15:14:31 +0200 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2010-10-29 17:31:22 +0200 |
commit | 166453c1abf2279b884a4d878729fa4fcfa550cb (patch) | |
tree | 8d4c9a4d2849e11432413f4d3b324f78bc803f28 /src/cairo-path-bounds.c | |
parent | a2ac91eb5f66f4c633abbcd6945f6015837ff211 (diff) | |
download | cairo-166453c1abf2279b884a4d878729fa4fcfa550cb.tar.gz |
path: New path construction logic
Now move_to's are actually added to the path when followed by a
drawing operation (line_to, curve_to or close_path).
This is implemented by updating the current_point and setting the
needs_move_to when a move_to operation is requested.
Whenever a drawing operation is requested and the needs_move_to flag
is set, a move_to is added before the drawing operation.
Diffstat (limited to 'src/cairo-path-bounds.c')
-rw-r--r-- | src/cairo-path-bounds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cairo-path-bounds.c b/src/cairo-path-bounds.c index d32c2607f..9cfc56d3b 100644 --- a/src/cairo-path-bounds.c +++ b/src/cairo-path-bounds.c @@ -235,8 +235,8 @@ _cairo_path_fixed_approximate_stroke_extents (const cairo_path_fixed_t *path, bounder.extents = path->extents; /* include trailing move-to for degenerate segments */ - if (path->has_last_move_point) { - const cairo_point_t *point = &path->last_move_point; + if (path->needs_move_to) { + const cairo_point_t *point = &path->current_point; if (point->x < bounder.extents.p1.x) bounder.extents.p1.x = point->x; @@ -331,7 +331,7 @@ _cairo_path_fixed_extents (const cairo_path_fixed_t *path, if (! path->has_curve_to) { *box = path->extents; - return path->extents.p1.x < path->extents.p2.x; + return path->has_extents; } _cairo_path_bounder_init (&bounder); |