From: cilix42 Date: Mon, 19 May 2008 15:59:20 +0000 (+0000) Subject: New LPE: Tangent to curve (draws a tangent of fixed length which can be dragged along... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ab99111a42436818e6902e044c8f3af2b724263b;p=inkscape.git New LPE: Tangent to curve (draws a tangent of fixed length which can be dragged along the curve) --- diff --git a/src/live_effects/Makefile_insert b/src/live_effects/Makefile_insert index 7e8a9e3a3..4629a4d02 100644 --- a/src/live_effects/Makefile_insert +++ b/src/live_effects/Makefile_insert @@ -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 diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 2a90687f1..2e33098d2 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -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 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 LPETypeConverter(LPETypeData, INVALID_LPE); @@ -124,6 +126,9 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj) case PERP_BISECTOR: neweffect = static_cast ( new LPEPerpBisector(lpeobj) ); break; + case TANGENT_TO_CURVE: + neweffect = static_cast ( new LPETangentToCurve(lpeobj) ); + break; default: g_warning("LivePathEffect::Effect::New called with invalid patheffect type (%d)", lpenr); neweffect = NULL; diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h index 693c6ad46..ad2d5126f 100644 --- a/src/live_effects/effect.h +++ b/src/live_effects/effect.h @@ -68,6 +68,7 @@ enum EffectType { CONSTRUCT_GRID, ENVELOPE, PERP_BISECTOR, + TANGENT_TO_CURVE, INVALID_LPE // This must be last };