summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-offset.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-05-20 07:01:56 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-05-20 07:01:56 +0000
commitb69c1855bb4e9defbf951aaae359a7f6cfa8ea4a (patch)
treeb3e686f7cfef6352c1def147875e7dd886ecc305 /src/live_effects/lpe-offset.cpp
parentImprovements to Offset LPE (diff)
downloadinkscape-b69c1855bb4e9defbf951aaae359a7f6cfa8ea4a.tar.gz
inkscape-b69c1855bb4e9defbf951aaae359a7f6cfa8ea4a.zip
Improve reading of last LPE offset commit
Diffstat (limited to '')
-rw-r--r--src/live_effects/lpe-offset.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/live_effects/lpe-offset.cpp b/src/live_effects/lpe-offset.cpp
index da86ce62d..cc03891d1 100644
--- a/src/live_effects/lpe-offset.cpp
+++ b/src/live_effects/lpe-offset.cpp
@@ -283,13 +283,14 @@ LPEOffset::doEffect_path(Geom::PathVector const & path_in)
Geom::OptRect big_gap_bounds = big.boundsFast();
Geom::OptRect small_gap_bounds = small.boundsFast();
Geom::OptRect original_bounds = original.boundsFast();
+ bool fix_reverse = ((*original_bounds).width() + (*original_bounds).height()) / 2.0 > std::abs(offset) * 2;
if (offset < 0) {
- if (((*original_bounds).width() + (*original_bounds).height()) / 2.0 > std::abs(offset) * 2) {
+ if (fix_reverse) {
big_gap_ret.insert(big_gap_ret.end(), big_gap.begin(), big_gap.end());
}
} else {
if (path_inside) {
- if (((*original_bounds).width() + (*original_bounds).height()) / 2.0 > offset * 2) {
+ if (fix_reverse) {
big_gap_ret.insert(big_gap_ret.end(),small_gap.begin(), small_gap.end());
}
} else {