Code

New LPE: Tangent to curve (draws a tangent of fixed length which can be dragged along...
authorcilix42 <cilix42@users.sourceforge.net>
Mon, 19 May 2008 15:59:20 +0000 (15:59 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Mon, 19 May 2008 15:59:20 +0000 (15:59 +0000)
src/live_effects/Makefile_insert
src/live_effects/effect.cpp
src/live_effects/effect.h

index 7e8a9e3a37326ad3b1d6e85d4f900645dcb36bbe..4629a4d02c60f98bc418d2db51a4a3218843aeda 100644 (file)
@@ -46,5 +46,7 @@ live_effects_liblive_effects_a_SOURCES = \
        live_effects/lpe-envelope.cpp   \
        live_effects/lpe-envelope.h     \
        live_effects/lpe-perp_bisector.cpp      \
-       live_effects/lpe-perp_bisector.h
+       live_effects/lpe-perp_bisector.h        \
+       live_effects/lpe-tangent_to_curve.cpp   \
+       live_effects/lpe-tangent_to_curve.h
 
index 2a90687f1262d03c6885b6d7b9ca8de2195424fd..2e33098d23fe276583e2b79c1b7d22a8b09a9b91 100644 (file)
@@ -46,6 +46,7 @@
 #include "live_effects/lpe-constructgrid.h"
 #include "live_effects/lpe-envelope.h"
 #include "live_effects/lpe-perp_bisector.h"
+#include "live_effects/lpe-tangent_to_curve.h"
 // end of includes
 
 #include "nodepath.h"
@@ -72,6 +73,7 @@ const Util::EnumData<EffectType> LPETypeData[INVALID_LPE] = {
     {CONSTRUCT_GRID,        N_("Construct grid"),        "construct_grid"},
     {ENVELOPE,              N_("Envelope Deformation"),  "envelope"},
     {PERP_BISECTOR, N_("Perpendicular bisector"), "perp_bisector"},
+    {TANGENT_TO_CURVE, N_("Tangent to curve"), "tangent_to_curve"},
 };
 const Util::EnumDataConverter<EffectType> LPETypeConverter(LPETypeData, INVALID_LPE);
 
@@ -124,6 +126,9 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj)
         case PERP_BISECTOR:
             neweffect = static_cast<Effect*> ( new LPEPerpBisector(lpeobj) );
             break;
+        case TANGENT_TO_CURVE:
+            neweffect = static_cast<Effect*> ( new LPETangentToCurve(lpeobj) );
+            break;
         default:
             g_warning("LivePathEffect::Effect::New   called with invalid patheffect type (%d)", lpenr);
             neweffect = NULL;
index 693c6ad46e9589a561dfa6a10175b991b70b14e9..ad2d5126f3d6addb4b5ae882942822f70b338cb1 100644 (file)
@@ -68,6 +68,7 @@ enum EffectType {
     CONSTRUCT_GRID,
     ENVELOPE,
     PERP_BISECTOR,
+    TANGENT_TO_CURVE,
     INVALID_LPE // This must be last
 };