diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-01-26 05:26:46 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-01-26 05:26:46 +0000 |
| commit | 5d59fbd4fc5e96abfb8a3a6de9b00ff412858fa1 (patch) | |
| tree | fd8e20534ccc03d694f5327aaf99ee9d5e074786 /src | |
| parent | remember rotation centers, correctly this time (by johncliff and me) (diff) | |
| download | inkscape-5d59fbd4fc5e96abfb8a3a6de9b00ff412858fa1.tar.gz inkscape-5d59fbd4fc5e96abfb8a3a6de9b00ff412858fa1.zip | |
fix silly bug - was unable to flip by scaling
(bzr r29)
Diffstat (limited to 'src')
| -rw-r--r-- | src/seltrans.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp index f83c646b7..1a8c69827 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -1144,11 +1144,12 @@ void Inkscape::SelTrans::stretch(SPSelTransHandle const &handle, NR::Point &pt, s[!dim] = fabs(s[dim]); } - NR::Rect new_bbox = _box * (NR::translate(-scale_origin) * NR::Matrix(s) * NR::translate(scale_origin)); + NR::Point new_bbox_min = _box.min() * (NR::translate(-scale_origin) * NR::Matrix(s) * NR::translate(scale_origin)); + NR::Point new_bbox_max = _box.max() * (NR::translate(-scale_origin) * NR::Matrix(s) * NR::translate(scale_origin)); int transform_stroke = prefs_get_int_attribute ("options.transform", "stroke", 1); NR::Matrix scaler = get_scale_transform_with_stroke (_box, _strokewidth, transform_stroke, - new_bbox.min()[NR::X], new_bbox.min()[NR::Y], new_bbox.max()[NR::X], new_bbox.max()[NR::Y]); + new_bbox_min[NR::X], new_bbox_min[NR::Y], new_bbox_max[NR::X], new_bbox_max[NR::Y]); transform(scaler, NR::Point(0, 0)); // we have already accounted for origin, so pass 0,0 } @@ -1164,11 +1165,12 @@ void Inkscape::SelTrans::scale(NR::Point &pt, guint state) if (fabs(s[i]) < 1e-9) s[i] = 1e-9; } - NR::Rect new_bbox = _box * (NR::translate(-_origin) * NR::Matrix(s) * NR::translate(_origin)); + NR::Point new_bbox_min = _box.min() * (NR::translate(-_origin) * NR::Matrix(s) * NR::translate(_origin)); + NR::Point new_bbox_max = _box.max() * (NR::translate(-_origin) * NR::Matrix(s) * NR::translate(_origin)); int transform_stroke = prefs_get_int_attribute ("options.transform", "stroke", 1); NR::Matrix scaler = get_scale_transform_with_stroke (_box, _strokewidth, transform_stroke, - new_bbox.min()[NR::X], new_bbox.min()[NR::Y], new_bbox.max()[NR::X], new_bbox.max()[NR::Y]); + new_bbox_min[NR::X], new_bbox_min[NR::Y], new_bbox_max[NR::X], new_bbox_max[NR::Y]); transform(scaler, NR::Point(0, 0)); // we have already accounted for origin, so pass 0,0 } |
