From 06cd6b0ab2dbe286184e35d1078bab18c966b0d2 Mon Sep 17 00:00:00 2001 From: jfbarraud Date: Wed, 26 Nov 2008 20:56:08 +0000 Subject: [PATCH] renamed lpe-hatches to lpe-rough-hatches. --- src/live_effects/CMakeLists.txt | 2 +- src/live_effects/effect-enum.h | 2 +- src/live_effects/effect.cpp | 10 ++++----- ...{lpe-hatches.cpp => lpe-rough-hatches.cpp} | 22 +++++++++---------- .../{lpe-hatches.h => lpe-rough-hatches.h} | 16 +++++++------- 5 files changed, 26 insertions(+), 26 deletions(-) rename src/live_effects/{lpe-hatches.cpp => lpe-rough-hatches.cpp} (95%) rename src/live_effects/{lpe-hatches.h => lpe-rough-hatches.h} (80%) diff --git a/src/live_effects/CMakeLists.txt b/src/live_effects/CMakeLists.txt index 89b7b9e3a..72d955586 100644 --- a/src/live_effects/CMakeLists.txt +++ b/src/live_effects/CMakeLists.txt @@ -11,7 +11,7 @@ lpe-gears.cpp lpegroupbbox.cpp lpe-interpolate.cpp lpe-knot.cpp -lpe-hatches.cpp +lpe-rough-hatches.cpp lpe-lattice.cpp lpe-mirror_symmetry.cpp lpeobject.cpp diff --git a/src/live_effects/effect-enum.h b/src/live_effects/effect-enum.h index 1e82954f8..4c0d9389f 100644 --- a/src/live_effects/effect-enum.h +++ b/src/live_effects/effect-enum.h @@ -21,7 +21,7 @@ enum EffectType { PATTERN_ALONG_PATH, FREEHAND_SHAPE, SKETCH, - HATCHES, + ROUGH_HATCHES, VONKOCH, KNOT, #ifdef LPE_ENABLE_TEST_EFFECTS diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index bb5f0c554..2a316a0bb 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -42,7 +42,7 @@ #include "live_effects/lpe-sketch.h" #include "live_effects/lpe-vonkoch.h" #include "live_effects/lpe-knot.h" -#include "live_effects/lpe-hatches.h" +#include "live_effects/lpe-rough-hatches.h" #include "live_effects/lpe-test-doEffect-stack.h" #include "live_effects/lpe-gears.h" #include "live_effects/lpe-curvestitch.h" @@ -73,7 +73,7 @@ namespace Inkscape { namespace LivePathEffect { const Util::EnumData LPETypeData[] = { - // {constant defined in effect.h, N_("name of your effect"), "name of your effect in SVG"} + // {constant defined in effect-enum.h, N_("name of your effect"), "name of your effect in SVG"} {ANGLE_BISECTOR, N_("Angle bisector"), "angle_bisector"}, {BEND_PATH, N_("Bend"), "bend_path"}, {BOOLOPS, N_("Boolops"), "boolops"}, @@ -100,7 +100,7 @@ const Util::EnumData LPETypeData[] = { {COPY_ROTATE, N_("Rotate copies"), "copy_rotate"}, {RULER, N_("Ruler"), "ruler"}, {SKETCH, N_("Sketch"), "sketch"}, - {HATCHES, N_("Hatches"), "hatches"}, + {ROUGH_HATCHES, N_("Hatches (rough)"), "rough_hatches"}, {SPIRO, N_("Spiro spline"), "spiro"}, {CURVE_STITCH, N_("Stitch Sub-Paths"), "curvestitching"}, {TANGENT_TO_CURVE, N_("Tangent to curve"), "tangent_to_curve"}, @@ -139,8 +139,8 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj) case SKETCH: neweffect = static_cast ( new LPESketch(lpeobj) ); break; - case HATCHES: - neweffect = static_cast ( new LPEHatches(lpeobj) ); + case ROUGH_HATCHES: + neweffect = static_cast ( new LPERoughHatches(lpeobj) ); break; case VONKOCH: neweffect = static_cast ( new LPEVonKoch(lpeobj) ); diff --git a/src/live_effects/lpe-hatches.cpp b/src/live_effects/lpe-rough-hatches.cpp similarity index 95% rename from src/live_effects/lpe-hatches.cpp rename to src/live_effects/lpe-rough-hatches.cpp index 2205d91f3..94d9669aa 100644 --- a/src/live_effects/lpe-hatches.cpp +++ b/src/live_effects/lpe-rough-hatches.cpp @@ -1,4 +1,4 @@ -#define INKSCAPE_LPE_HATCHES_CPP +#define INKSCAPE_LPE_ROUGH_HATCHES_CPP /** \file * LPE Curve Stitching implementation, used as an example for a base starting class * when implementing new LivePathEffects. @@ -13,7 +13,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include "live_effects/lpe-hatches.h" +#include "live_effects/lpe-rough-hatches.h" #include "sp-item.h" #include "sp-path.h" @@ -263,9 +263,9 @@ Piecewise > bend(Piecewise > const &f, Piecewise b } //-------------------------------------------------------- -// The Hatches lpe. +// The RoughHatches lpe. //-------------------------------------------------------- -LPEHatches::LPEHatches(LivePathEffectObject *lpeobject) : +LPERoughHatches::LPERoughHatches(LivePathEffectObject *lpeobject) : Effect(lpeobject), dist_rdm(_("Dist randomness"), _("Variation of dist between hatches, in %."), "dist_rdm", &wr, this, 75), growth(_("Growth"), _("Growth of distance between hatches."), "growth", &wr, this, 0.), @@ -321,13 +321,13 @@ LPEHatches::LPEHatches(LivePathEffectObject *lpeobject) : show_orig_path = true; } -LPEHatches::~LPEHatches() +LPERoughHatches::~LPERoughHatches() { } Geom::Piecewise > -LPEHatches::doEffect_pwd2 (Geom::Piecewise > const & pwd2_in){ +LPERoughHatches::doEffect_pwd2 (Geom::Piecewise > const & pwd2_in){ Piecewise > result; @@ -371,7 +371,7 @@ LPEHatches::doEffect_pwd2 (Geom::Piecewise > const & pwd2 // Generate the levels with random, growth... //------------------------------------------------ std::vector -LPEHatches::generateLevels(Interval const &domain){ +LPERoughHatches::generateLevels(Interval const &domain){ std::vector result; double x = domain.min() + double(hatch_dist)/2.; double step = double(hatch_dist); @@ -392,7 +392,7 @@ LPEHatches::generateLevels(Interval const &domain){ // Walk through the intersections to create linear hatches //------------------------------------------------------- std::vector > -LPEHatches::linearSnake(Piecewise > const &f){ +LPERoughHatches::linearSnake(Piecewise > const &f){ std::vector > result; @@ -451,7 +451,7 @@ LPEHatches::linearSnake(Piecewise > const &f){ // Smooth the linear hatches according to params... //------------------------------------------------------- Piecewise > -LPEHatches::smoothSnake(std::vector > const &linearSnake){ +LPERoughHatches::smoothSnake(std::vector > const &linearSnake){ Piecewise > result; for (unsigned comp=0; comp > const &linearSnake){ } void -LPEHatches::doBeforeEffect (SPLPEItem */*lpeitem*/) +LPERoughHatches::doBeforeEffect (SPLPEItem */*lpeitem*/) { using namespace Geom; top_edge_variation.resetRandomizer(); @@ -561,7 +561,7 @@ LPEHatches::doBeforeEffect (SPLPEItem */*lpeitem*/) void -LPEHatches::resetDefaults(SPItem * item) +LPERoughHatches::resetDefaults(SPItem * item) { Geom::OptRect bbox = item->getBounds(Geom::identity(), SPItem::GEOMETRIC_BBOX); Geom::Point origin(0.,0.); diff --git a/src/live_effects/lpe-hatches.h b/src/live_effects/lpe-rough-hatches.h similarity index 80% rename from src/live_effects/lpe-hatches.h rename to src/live_effects/lpe-rough-hatches.h index 029847186..23b2a0966 100644 --- a/src/live_effects/lpe-hatches.h +++ b/src/live_effects/lpe-rough-hatches.h @@ -1,8 +1,8 @@ -#ifndef INKSCAPE_LPE_HATCHES_H -#define INKSCAPE_LPE_HATCHES_H +#ifndef INKSCAPE_LPE_ROUGH_HATCHES_H +#define INKSCAPE_LPE_ROUGH_HATCHES_H /** \file - * Implementation of the curve stitch effect, see lpe-hatches.cpp + * Fills an area with rough hatches. */ /* @@ -24,10 +24,10 @@ namespace Inkscape { namespace LivePathEffect { -class LPEHatches : public Effect { +class LPERoughHatches : public Effect { public: - LPEHatches(LivePathEffectObject *lpeobject); - virtual ~LPEHatches(); + LPERoughHatches(LivePathEffectObject *lpeobject); + virtual ~LPERoughHatches(); virtual Geom::Piecewise > doEffect_pwd2 (Geom::Piecewise > const & pwd2_in); @@ -67,8 +67,8 @@ private: PointParam bender; VectorParam direction; - LPEHatches(const LPEHatches&); - LPEHatches& operator=(const LPEHatches&); + LPERoughHatches(const LPERoughHatches&); + LPERoughHatches& operator=(const LPERoughHatches&); }; } //namespace LivePathEffect -- 2.30.2