diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2011-07-11 18:44:59 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mail@diedenrezi.nl> | 2011-07-11 18:44:59 +0000 |
| commit | 6ffe6f384a2d322451cb21e720effdae7aa904f0 (patch) | |
| tree | a78e32c1bc33d896b1db25f73bd49d5a103bca7a /src/sp-item-transform.cpp | |
| parent | Tutorials. New Greek translation of Advanced, Calligraphy, Elements and Tips ... (diff) | |
| download | inkscape-6ffe6f384a2d322451cb21e720effdae7aa904f0.tar.gz inkscape-6ffe6f384a2d322451cb21e720effdae7aa904f0.zip | |
Fix crash caused by my previous commit; as reported by ~suv in bug lp:212768
Fixed bugs:
- https://launchpad.net/bugs/212768
(bzr r10443)
Diffstat (limited to 'src/sp-item-transform.cpp')
| -rw-r--r-- | src/sp-item-transform.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/sp-item-transform.cpp b/src/sp-item-transform.cpp index 45d965e44..eb4b81a61 100644 --- a/src/sp-item-transform.cpp +++ b/src/sp-item-transform.cpp @@ -183,11 +183,11 @@ get_scale_transform_with_uniform_stroke (Geom::Rect const &bbox_visual, gdouble scale *= direct; } } else { // The stroke should not be scaled, or is zero - if (!transform_stroke) { // Nonscaling strokewidth + if (r0 == 0 || r0 == Geom::infinity() ) { // Strokewidth is zero or infinite + scale *= direct; + } else { // Nonscaling strokewidth scale *= direct_constant_r; unbudge *= Geom::Translate (flip_x * 0.5 * r0 * (1 - ratio_x), flip_y * 0.5 * r0 * (1 - ratio_y)); - } else { // Strokewidth is zero or infinite - scale *= direct; } } @@ -336,11 +336,11 @@ get_scale_transform_with_unequal_stroke (Geom::Rect const &bbox_visual, Geom::Re scale *= direct; } } else { // The stroke should not be scaled, or is zero (or infinite) - if (!transform_stroke) { + if (r0w == 0 || r0w == Geom::infinity() || r0h == 0 || r0h == Geom::infinity()) { // can't calculate, because apparently strokewidth is zero or infinite + scale *= direct; + } else { scale *= direct_constant_r; unbudge *= Geom::Translate (flip_x * stroke_ratio_w * r0w * (1 - ratio_x), flip_y * stroke_ratio_h * r0h * (1 - ratio_y)); - } else { // can't calculate, because apparently strokewidth is zero or infinite - scale *= direct; } } @@ -350,7 +350,6 @@ get_scale_transform_with_unequal_stroke (Geom::Rect const &bbox_visual, Geom::Re Geom::Rect get_visual_bbox (Geom::OptRect const &initial_geom_bbox, Geom::Affine const &abs_affine, gdouble const initial_strokewidth, bool const transform_stroke) { - g_assert(initial_geom_bbox); // Find the new geometric bounding box; Do this by transforming each corner of |
