summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/clonetiler.cpp
diff options
context:
space:
mode:
authorFlorian Märkl <info@florianmaerkl.de>2018-01-10 13:02:16 +0000
committerFlorian Märkl <info@florianmaerkl.de>2018-01-10 13:02:16 +0000
commit3342fa1df49d51f450c569466910a0dcedbbd1c8 (patch)
treed39ebbdd716ab09d4832aa8721dd4539b316d557 /src/ui/dialog/clonetiler.cpp
parentFix and improve window size/position handling/restoration (diff)
downloadinkscape-3342fa1df49d51f450c569466910a0dcedbbd1c8.tar.gz
inkscape-3342fa1df49d51f450c569466910a0dcedbbd1c8.zip
Tiled Cloned: Apply shift exponent to absolute shift
Diffstat (limited to 'src/ui/dialog/clonetiler.cpp')
-rw-r--r--src/ui/dialog/clonetiler.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp
index 71edcf259..b31eed39c 100644
--- a/src/ui/dialog/clonetiler.cpp
+++ b/src/ui/dialog/clonetiler.cpp
@@ -1315,8 +1315,20 @@ Geom::Affine CloneTiler::get_transform(
if( !shifty_excludeh ) shiftj += j;
// Add exponential shift if necessary
- if ( shiftx_exp != 1.0 ) shifti = pow( shifti, shiftx_exp );
- if ( shifty_exp != 1.0 ) shiftj = pow( shiftj, shifty_exp );
+ if (shiftx_exp != 1.0) {
+ if (shifti >= 0.0) {
+ shifti = pow(shifti, shiftx_exp);
+ } else {
+ shifti = -pow(-shifti, shiftx_exp);
+ }
+ }
+ if (shifty_exp != 1.0) {
+ if (shiftj >= 0.0) {
+ shiftj = pow(shiftj, shifty_exp);
+ } else {
+ shiftj = -pow(-shiftj, shifty_exp);
+ }
+ }
// Final shift
Geom::Affine rect_translate (Geom::Translate (w * shifti, h * shiftj));