From d477daf95c60978ed83e1b4047ffdf354edc1b46 Mon Sep 17 00:00:00 2001 From: joncruz Date: Thu, 18 Sep 2008 04:50:18 +0000 Subject: [PATCH] Fixed initialization order issue --- src/live_effects/lpe-vonkoch.cpp | 16 ++++++++-------- src/live_effects/lpe-vonkoch.h | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/live_effects/lpe-vonkoch.cpp b/src/live_effects/lpe-vonkoch.cpp index 5c77801c8..ef9d38ee4 100644 --- a/src/live_effects/lpe-vonkoch.cpp +++ b/src/live_effects/lpe-vonkoch.cpp @@ -28,12 +28,12 @@ namespace Inkscape { namespace LivePathEffect { VonKochPathParam::~VonKochPathParam() -{ +{ } void VonKochPathParam::param_setup_nodepath(Inkscape::NodePath::Path *np) -{ +{ PathParam::param_setup_nodepath(np); sp_nodepath_make_straight_path(np); } @@ -48,9 +48,9 @@ LPEVonKoch::LPEVonKoch(LivePathEffectObject *lpeobject) : Effect(lpeobject), nbgenerations(_("Nb of generations"), _("Depth of the recursion --- keep low!!"), "nbgenerations", &wr, this, 1), generator(_("Generating path"), _("Path whos segments define the fractal"), "generator", &wr, this, "M0,0 L3,0 M0,1 L1,1 M 2,1 L3,1"), + similar_only(_("Use uniform scale/rotation only"), _("If off, 2segments component of generating path can be used to define a general rtansform. If on, they only affect the orientation preserving/reversing of the transform."), "similar_only", &wr, this, false), drawall(_("Draw all generations"), _("If unchecked, draw only the last generation"), "drawall", &wr, this, true), reftype(_("Reference"), _("Generating path segments define transforms in reference to bbox or last segment"), "reftype", VonKochRefTypeConverter, &wr, this, VKREF_BBOX), - similar_only(_("Use uniform scale/rotation only"), _("If off, 2segments component of generating path can be used to define a general rtansform. If on, they only affect the orientation preserving/reversing of the transform."), "similar_only", &wr, this, false), maxComplexity(_("Max complexity"), _("Disable effect if the output is too complex"), "maxComplexity", &wr, this, 1000) { registerParameter( dynamic_cast(&generator) ); @@ -95,7 +95,7 @@ LPEVonKoch::doEffect_path (std::vector const & path_in) std::vector transforms; - unsigned end = generating_path.size(); + unsigned end = generating_path.size(); if (type==VKREF_SEG) end-=1; for (unsigned i=0; i const & path_in) if (transforms.size()==0) return path_in; - //Do nothing if the output is too complex... + //Do nothing if the output is too complex... int path_in_complexity = 0; for (unsigned k = 0; k < path_in.size(); k++){ path_in_complexity+=path_in[k].size(); - } + } double complexity = pow(transforms.size(),nbgenerations)*path_in_complexity; if (drawall.get_value()){ int k = transforms.size(); @@ -145,7 +145,7 @@ LPEVonKoch::doEffect_path (std::vector const & path_in) //Generate path: std::vector pathi = path_in; std::vector path_out = path_in; - + for (unsigned i = 0; i const & path_in) } for (unsigned j = 0; j