summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-10-12 10:04:17 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-10-12 10:04:17 +0000
commitf369e0ed4157c33e09c426b40ec1e39c7591d2c6 (patch)
tree5f97846fbcfbf5d8d639a91c548e536df8462189 /src
parentmaintain page size units when resizing page to drawing (Bug 1310787) (diff)
downloadinkscape-f369e0ed4157c33e09c426b40ec1e39c7591d2c6.tar.gz
inkscape-f369e0ed4157c33e09c426b40ec1e39c7591d2c6.zip
LPEVonKoch: improve rev. 13589 by removing the else branch for complexity calculation for better human readability
(bzr r13591)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-vonkoch.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/live_effects/lpe-vonkoch.cpp b/src/live_effects/lpe-vonkoch.cpp
index 7e396e84a..709c9e56e 100644
--- a/src/live_effects/lpe-vonkoch.cpp
+++ b/src/live_effects/lpe-vonkoch.cpp
@@ -132,8 +132,8 @@ LPEVonKoch::doEffect_path (std::vector<Geom::Path> const & path_in)
int path_in_complexity = 0;
for (unsigned k = 0; k < path_in.size(); k++){
path_in_complexity+=path_in[k].size();
- }
- double complexity;
+ }
+ double complexity = std::pow(transforms.size(), nbgenerations) * path_in_complexity;
if (drawall.get_value()){
int k = transforms.size();
if(k>1){
@@ -141,8 +141,6 @@ LPEVonKoch::doEffect_path (std::vector<Geom::Path> const & path_in)
}else{
complexity = nbgenerations*k*path_in_complexity;
}
- }else{
- complexity = std::pow(transforms.size(),nbgenerations)*path_in_complexity;
}
if (complexity > double(maxComplexity)){
g_warning("VonKoch lpe's output too complex. Effect bypassed.");