summaryrefslogtreecommitdiffstats
path: root/src/seltrans.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-01-12 19:02:53 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-01-12 19:02:53 +0000
commitad38e0a823da469ba8a4866e0d6c46c87ed1b69c (patch)
tree10d2a97375a51ad9ab32e9de58a1fb513e82cdef /src/seltrans.cpp
parentUpdate to trunk (diff)
parentpass class variables by reference for performance (diff)
downloadinkscape-ad38e0a823da469ba8a4866e0d6c46c87ed1b69c.tar.gz
inkscape-ad38e0a823da469ba8a4866e0d6c46c87ed1b69c.zip
update to trunk
(bzr r12588.1.31)
Diffstat (limited to 'src/seltrans.cpp')
-rw-r--r--src/seltrans.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index f961e309d..78d9958c4 100644
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -1460,7 +1460,8 @@ Geom::Point Inkscape::SelTrans::_getGeomHandlePos(Geom::Point const &visual_hand
// Calculate the absolute affine while taking into account the scaling of the stroke width
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
bool transform_stroke = prefs->getBool("/options/transform/stroke", true);
- Geom::Affine abs_affine = get_scale_transform_for_uniform_stroke (*_bbox, _strokewidth, transform_stroke,
+ bool preserve = prefs->getBool("/options/preservetransform/value", false);
+ Geom::Affine abs_affine = get_scale_transform_for_uniform_stroke (*_bbox, _strokewidth, _strokewidth, transform_stroke, preserve,
new_bbox.min()[Geom::X], new_bbox.min()[Geom::Y], new_bbox.max()[Geom::X], new_bbox.max()[Geom::Y]);
// Calculate the scaled geometrical bbox
@@ -1499,15 +1500,19 @@ Geom::Point Inkscape::SelTrans::_calcAbsAffineDefault(Geom::Scale const default_
Geom::Point new_bbox_max = _visual_bbox->max() * abs_affine;
bool transform_stroke = false;
- gdouble strokewidth = 0;
+ bool preserve = false;
+ gdouble stroke_x = 0;
+ gdouble stroke_y = 0;
if ( _snap_bbox_type != SPItem::GEOMETRIC_BBOX) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
transform_stroke = prefs->getBool("/options/transform/stroke", true);
- strokewidth = _strokewidth;
+ preserve = prefs->getBool("/options/preservetransform/value", false);
+ stroke_x = _visual_bbox->width() - _geometric_bbox->width();
+ stroke_y = _visual_bbox->height() - _geometric_bbox->height();
}
- _absolute_affine = get_scale_transform_for_uniform_stroke (*_visual_bbox, strokewidth, transform_stroke,
+ _absolute_affine = get_scale_transform_for_uniform_stroke (*_visual_bbox, stroke_x, stroke_y, transform_stroke, preserve,
new_bbox_min[Geom::X], new_bbox_min[Geom::Y], new_bbox_max[Geom::X], new_bbox_max[Geom::Y]);
// return the new handle position