index 2cc26e4e10ef88f58da2b2901c5eac571ec99855..3ea57de23f3f3110134db2e8654e8dd82d19c7ca 100644 (file)
-#define INKSCAPE_LIVEPATHEFFECT_CPP
-
/*
* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
/*
* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
+ * Abhishek Sharma
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/lpe-line_segment.h"
#include "live_effects/lpe-recursiveskeleton.h"
#include "live_effects/lpe-extrude.h"
#include "live_effects/lpe-line_segment.h"
#include "live_effects/lpe-recursiveskeleton.h"
#include "live_effects/lpe-extrude.h"
+#include "live_effects/lpe-powerstroke.h"
namespace Inkscape {
namespace Inkscape {
{PATH_LENGTH, N_("Path length"), "path_length"},
{PERP_BISECTOR, N_("Perpendicular bisector"), "perp_bisector"},
{PERSPECTIVE_PATH, N_("Perspective path"), "perspective_path"},
{PATH_LENGTH, N_("Path length"), "path_length"},
{PERP_BISECTOR, N_("Perpendicular bisector"), "perp_bisector"},
{PERSPECTIVE_PATH, N_("Perspective path"), "perspective_path"},
+ {POWERSTROKE, N_("Power stroke"), "powerstroke"},
{COPY_ROTATE, N_("Rotate copies"), "copy_rotate"},
{RECURSIVE_SKELETON, N_("Recursive skeleton"), "recursive_skeleton"},
{TANGENT_TO_CURVE, N_("Tangent to curve"), "tangent_to_curve"},
{COPY_ROTATE, N_("Rotate copies"), "copy_rotate"},
{RECURSIVE_SKELETON, N_("Recursive skeleton"), "recursive_skeleton"},
{TANGENT_TO_CURVE, N_("Tangent to curve"), "tangent_to_curve"},
{ROUGH_HATCHES, N_("Hatches (rough)"), "rough_hatches"},
{SKETCH, N_("Sketch"), "sketch"},
{RULER, N_("Ruler"), "ruler"},
{ROUGH_HATCHES, N_("Hatches (rough)"), "rough_hatches"},
{SKETCH, N_("Sketch"), "sketch"},
{RULER, N_("Ruler"), "ruler"},
+/* 0.49 */
};
const Util::EnumDataConverter<EffectType> LPETypeConverter(LPETypeData, sizeof(LPETypeData)/sizeof(*LPETypeData));
};
const Util::EnumDataConverter<EffectType> LPETypeConverter(LPETypeData, sizeof(LPETypeData)/sizeof(*LPETypeData));
case EXTRUDE:
neweffect = static_cast<Effect*> ( new LPEExtrude(lpeobj) );
break;
case EXTRUDE:
neweffect = static_cast<Effect*> ( new LPEExtrude(lpeobj) );
break;
+ case POWERSTROKE:
+ neweffect = static_cast<Effect*> ( new LPEPowerStroke(lpeobj) );
+ break;
default:
g_warning("LivePathEffect::Effect::New called with invalid patheffect type (%d)", lpenr);
neweffect = NULL;
default:
g_warning("LivePathEffect::Effect::New called with invalid patheffect type (%d)", lpenr);
neweffect = NULL;
return neweffect;
}
return neweffect;
}
-void
-Effect::createAndApply(const char* name, SPDocument *doc, SPItem *item)
+void Effect::createAndApply(const char* name, SPDocument *doc, SPItem *item)
{
// Path effect definition
{
// Path effect definition
- Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
+ Inkscape::XML::Document *xml_doc = doc->getReprDoc();
Inkscape::XML::Node *repr = xml_doc->createElement("inkscape:path-effect");
repr->setAttribute("effect", name);
Inkscape::XML::Node *repr = xml_doc->createElement("inkscape:path-effect");
repr->setAttribute("effect", name);