diff options
| author | Alvin Penner <penner@vaxxine.com> | 2012-01-04 00:51:01 +0000 |
|---|---|---|
| committer | apenner <penner@vaxxine.com> | 2012-01-04 00:51:01 +0000 |
| commit | 24901d78071586fc3cb5b67c9d350ce3696fda89 (patch) | |
| tree | a02d3ae583d7c27d6ee5d517caa34a4a6f033682 /src | |
| parent | Rename LaTeX formula extension to LaTeX (diff) | |
| download | inkscape-24901d78071586fc3cb5b67c9d350ce3696fda89.tar.gz inkscape-24901d78071586fc3cb5b67c9d350ce3696fda89.zip | |
for bbox calculation, disable call to Path::Coalesce (Bug 906952)
Fixed bugs:
- https://launchpad.net/bugs/906952
(bzr r10835)
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp-shape.cpp | 2 | ||||
| -rw-r--r-- | src/splivarot.cpp | 10 | ||||
| -rw-r--r-- | src/splivarot.h | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index 8bfa99392..5fd33bef7 100644 --- a/src/sp-shape.cpp +++ b/src/sp-shape.cpp @@ -515,7 +515,7 @@ Geom::OptRect SPShape::sp_shape_bbox(SPItem const *item, Geom::Affine const &tra // convert the stroke to a path and calculate that path's geometric bbox SPStyle* style = item->style; if (!style->stroke.isNone()) { - Geom::PathVector *pathv = item_outline(item); + Geom::PathVector *pathv = item_outline(item, false); // disable Path::Coalesce if (pathv) { bbox |= bounds_exact_transformed(*pathv, transform); delete pathv; diff --git a/src/splivarot.cpp b/src/splivarot.cpp index 63eb5c8ff..22b0f2241 100644 --- a/src/splivarot.cpp +++ b/src/splivarot.cpp @@ -676,7 +676,7 @@ void item_outline_add_marker( SPObject const *marker_object, Geom::Affine marker * Returns a pathvector that is the outline of the stroked item, with markers. * item must be SPShape or SPText. */ -Geom::PathVector* item_outline(SPItem const *item) +Geom::PathVector* item_outline(SPItem const *item, bool coalesce) { Geom::PathVector *ret_pathv = NULL; @@ -774,14 +774,18 @@ Geom::PathVector* item_outline(SPItem const *item) originaux[0] = res; theRes->ConvertToForme(orig, 1, originaux); - res->Coalesce(5.0); + if (coalesce) { + res->Coalesce(5.0); + } delete theShape; delete theRes; } else { orig->Outline(res, 0.5 * o_width, o_join, o_butt, 0.5 * o_miter); - orig->Coalesce(0.5 * o_width); + if (coalesce) { + orig->Coalesce(0.5 * o_width); + } Shape *theShape = new Shape; Shape *theRes = new Shape; diff --git a/src/splivarot.h b/src/splivarot.h index 9dc596888..079139775 100644 --- a/src/splivarot.h +++ b/src/splivarot.h @@ -43,7 +43,7 @@ void sp_selected_path_create_updating_offset_object_zero (SPDesktop *desktop); // outline of a curve // uses the stroke-width void sp_selected_path_outline (SPDesktop *desktop); -Geom::PathVector* item_outline(SPItem const *item); +Geom::PathVector* item_outline(SPItem const *item, bool coalesce = true); // simplifies a path (removes small segments and the like) void sp_selected_path_simplify (SPDesktop *desktop); |
