diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2017-04-26 09:16:33 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2017-04-26 09:16:33 +0000 |
| commit | b84137c431a7e236131f71a17f8f2c71e26c6162 (patch) | |
| tree | 04cbe26ab83d5a7ddf1fde8d2da153cc9039306b /src/ui/widget/selected-style.cpp | |
| parent | Allow set and reset default values of LPE parameters (diff) | |
| parent | Improve 0.92 support for Clone Original LPE (diff) | |
| download | inkscape-b84137c431a7e236131f71a17f8f2c71e26c6162.tar.gz inkscape-b84137c431a7e236131f71a17f8f2c71e26c6162.zip | |
Update to trunk
(bzr r15620.1.2)
Diffstat (limited to 'src/ui/widget/selected-style.cpp')
| -rw-r--r-- | src/ui/widget/selected-style.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index 0370d55db..65d68195c 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -1380,13 +1380,8 @@ RotateableStrokeWidth::value_adjust(double current, double by, guint /*modifier* { double newval; // by is -1..1 - if (by < 0) { - // map negative 0..-1 to current..0 - newval = current * (1 + by); - } else { - // map positive 0..1 to current..4*current - newval = current * (1 + by) * (1 + by); - } + double max_f = 50; // maximum width is (current * max_f), minimum - zero + newval = current * (std::exp(std::log(max_f-1) * (by+1)) - 1) / (max_f-2); SPCSSAttr *css = sp_repr_css_attr_new (); if (final && newval < 1e-6) { @@ -1394,6 +1389,7 @@ RotateableStrokeWidth::value_adjust(double current, double by, guint /*modifier* // if it's not final, leave it a chance to increase again (which is not possible with "none") sp_repr_css_set_property (css, "stroke", "none"); } else { + newval = Inkscape::Util::Quantity::convert(newval, parent->_sw_unit, "px"); Inkscape::CSSOStringStream os; os << newval; sp_repr_css_set_property (css, "stroke-width", os.str().c_str()); |
