summaryrefslogtreecommitdiffstats
path: root/src/live_effects
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-01-18 23:37:04 +0000
committerJabiertxo Arraiza Cenoz <jtx@jtx.marker.es>2013-01-18 23:37:04 +0000
commit686ddfefd34634a2d3ccacee4c5d243bbe47629f (patch)
treeec9fd88a0acc73cfadb5668becdc2dba7b98e50d /src/live_effects
parentDelete bspline node whith node tool and fix 1 segment continue shift error (diff)
parentSome Corrections (diff)
downloadinkscape-686ddfefd34634a2d3ccacee4c5d243bbe47629f.tar.gz
inkscape-686ddfefd34634a2d3ccacee4c5d243bbe47629f.zip
Merge from branch
(bzr r11950.1.18)
Diffstat (limited to 'src/live_effects')
-rw-r--r--src/live_effects/effect.cpp22
-rw-r--r--src/live_effects/effect.h32
-rw-r--r--src/live_effects/lpe-angle_bisector.cpp12
-rw-r--r--src/live_effects/lpe-bendpath.cpp4
-rw-r--r--src/live_effects/lpe-bendpath.h4
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp16
-rw-r--r--src/live_effects/lpe-copy_rotate.h2
-rw-r--r--src/live_effects/lpe-curvestitch.cpp2
-rw-r--r--src/live_effects/lpe-curvestitch.h2
-rw-r--r--src/live_effects/lpe-envelope.cpp4
-rw-r--r--src/live_effects/lpe-envelope.h4
-rw-r--r--src/live_effects/lpe-extrude.cpp2
-rw-r--r--src/live_effects/lpe-extrude.h2
-rw-r--r--src/live_effects/lpe-interpolate.cpp2
-rw-r--r--src/live_effects/lpe-interpolate.h2
-rw-r--r--src/live_effects/lpe-knot.cpp8
-rw-r--r--src/live_effects/lpe-knot.h2
-rw-r--r--src/live_effects/lpe-lattice.cpp4
-rw-r--r--src/live_effects/lpe-lattice.h4
-rw-r--r--src/live_effects/lpe-line_segment.cpp2
-rw-r--r--src/live_effects/lpe-line_segment.h2
-rw-r--r--src/live_effects/lpe-mirror_symmetry.cpp2
-rw-r--r--src/live_effects/lpe-mirror_symmetry.h2
-rw-r--r--src/live_effects/lpe-offset.cpp2
-rw-r--r--src/live_effects/lpe-offset.h2
-rw-r--r--src/live_effects/lpe-parallel.cpp14
-rw-r--r--src/live_effects/lpe-parallel.h2
-rw-r--r--src/live_effects/lpe-perp_bisector.cpp14
-rw-r--r--src/live_effects/lpe-perp_bisector.h2
-rw-r--r--src/live_effects/lpe-perspective_path.cpp8
-rw-r--r--src/live_effects/lpe-perspective_path.h2
-rw-r--r--src/live_effects/lpe-powerstroke.cpp2
-rw-r--r--src/live_effects/lpe-powerstroke.h2
-rw-r--r--src/live_effects/lpe-rough-hatches.cpp4
-rw-r--r--src/live_effects/lpe-rough-hatches.h4
-rw-r--r--src/live_effects/lpe-skeleton.cpp2
-rw-r--r--src/live_effects/lpe-sketch.cpp2
-rw-r--r--src/live_effects/lpe-sketch.h2
-rw-r--r--src/live_effects/lpe-spiro.h2
-rw-r--r--src/live_effects/lpe-tangent_to_curve.cpp18
-rw-r--r--src/live_effects/lpe-vonkoch.cpp4
-rw-r--r--src/live_effects/lpe-vonkoch.h4
-rw-r--r--src/live_effects/lpegroupbbox.cpp2
-rw-r--r--src/live_effects/lpegroupbbox.h2
-rw-r--r--src/live_effects/parameter/bool.h5
-rw-r--r--src/live_effects/parameter/enum.h5
-rw-r--r--src/live_effects/parameter/originalpath.h2
-rw-r--r--src/live_effects/parameter/parameter.h7
-rw-r--r--src/live_effects/parameter/path.cpp4
-rw-r--r--src/live_effects/parameter/path.h4
-rw-r--r--src/live_effects/parameter/point.cpp4
-rw-r--r--src/live_effects/parameter/point.h2
-rw-r--r--src/live_effects/parameter/powerstrokepointarray.cpp6
-rw-r--r--src/live_effects/parameter/powerstrokepointarray.h6
-rw-r--r--src/live_effects/parameter/random.h3
-rw-r--r--src/live_effects/parameter/text.h2
-rw-r--r--src/live_effects/parameter/unit.cpp2
-rw-r--r--src/live_effects/parameter/unit.h4
-rw-r--r--src/live_effects/parameter/vector.cpp4
-rw-r--r--src/live_effects/parameter/vector.h2
60 files changed, 147 insertions, 149 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index e9ec2076f..9274d2078 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -311,7 +311,7 @@ Effect::~Effect()
}
Glib::ustring
-Effect::getName()
+Effect::getName() const
{
if (lpeobj->effecttype_set && LPETypeConverter.is_valid_id(lpeobj->effecttype) )
return Glib::ustring( _(LPETypeConverter.get_label(lpeobj->effecttype).c_str()) );
@@ -320,7 +320,7 @@ Effect::getName()
}
EffectType
-Effect::effectType() {
+Effect::effectType() const {
return lpeobj->effecttype;
}
@@ -328,7 +328,7 @@ Effect::effectType() {
* Is performed a single time when the effect is freshly applied to a path
*/
void
-Effect::doOnApply (SPLPEItem */*lpeitem*/)
+Effect::doOnApply (SPLPEItem const*/*lpeitem*/)
{
}
@@ -336,7 +336,7 @@ Effect::doOnApply (SPLPEItem */*lpeitem*/)
* Is performed each time before the effect is updated.
*/
void
-Effect::doBeforeEffect (SPLPEItem */*lpeitem*/)
+Effect::doBeforeEffect (SPLPEItem const*/*lpeitem*/)
{
//Do nothing for simple effects
}
@@ -381,7 +381,7 @@ Effect::writeParamsToSVG() {
* your LPE. But don't forget to call the parent method so that is_ready is set to true!
*/
void
-Effect::acceptParamPath (SPPath */*param_path*/) {
+Effect::acceptParamPath (SPPath const*/*param_path*/) {
setReady();
}
@@ -435,7 +435,7 @@ Effect::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in)
}
void
-Effect::readallParameters(Inkscape::XML::Node * repr)
+Effect::readallParameters(Inkscape::XML::Node const* repr)
{
std::vector<Parameter *>::iterator it = param_vector.begin();
while (it != param_vector.end()) {
@@ -502,7 +502,7 @@ Effect::addHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) {
* This is the function called by external code like SPLPEItem.
*/
std::vector<Geom::PathVector>
-Effect::getHelperPaths(SPLPEItem *lpeitem)
+Effect::getHelperPaths(SPLPEItem const* lpeitem)
{
std::vector<Geom::PathVector> hp_vec;
@@ -535,7 +535,7 @@ Effect::getHelperPaths(SPLPEItem *lpeitem)
* This function should be overwritten by derived effects if they want to provide their own helperpaths.
*/
void
-Effect::addCanvasIndicators(SPLPEItem */*lpeitem*/, std::vector<Geom::PathVector> &/*hp_vec*/)
+Effect::addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector<Geom::PathVector> &/*hp_vec*/)
{
}
@@ -654,7 +654,7 @@ Effect::editNextParamOncanvas(SPItem * item, SPDesktop * desktop)
* The nice thing about this is that this function can use knowledge of the original path and set things accordingly for example to the size or origin of the original path!
*/
void
-Effect::resetDefaults(SPItem * /*item*/)
+Effect::resetDefaults(SPItem const* /*item*/)
{
std::vector<Inkscape::LivePathEffect::Parameter *>::iterator p;
for (p = param_vector.begin(); p != param_vector.end(); ++p) {
@@ -674,7 +674,7 @@ Effect::transform_multiply(Geom::Affine const& postmul, bool set)
}
bool
-Effect::providesKnotholder()
+Effect::providesKnotholder() const
{
// does the effect actively provide any knotholder entities of its own?
if (_provides_knotholder_entities) {
@@ -682,7 +682,7 @@ Effect::providesKnotholder()
}
// otherwise: are there any parameters that have knotholderentities?
- for (std::vector<Parameter *>::iterator p = param_vector.begin(); p != param_vector.end(); ++p) {
+ for (std::vector<Parameter *>::const_iterator p = param_vector.begin(); p != param_vector.end(); ++p) {
if ((*p)->providesKnotHolderEntities()) {
return true;
}
diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h
index 008de5ea8..f7a7155b0 100644
--- a/src/live_effects/effect.h
+++ b/src/live_effects/effect.h
@@ -51,16 +51,16 @@ public:
virtual ~Effect();
- EffectType effectType ();
+ EffectType effectType() const;
- virtual void doOnApply (SPLPEItem *lpeitem);
- virtual void doBeforeEffect (SPLPEItem *lpeitem);
+ virtual void doOnApply (SPLPEItem const* lpeitem);
+ virtual void doBeforeEffect (SPLPEItem const* lpeitem);
void writeParamsToSVG();
- virtual void acceptParamPath (SPPath *param_path);
+ virtual void acceptParamPath (SPPath const* param_path);
static int acceptsNumClicks(EffectType type);
- int acceptsNumClicks() { return acceptsNumClicks(effectType()); }
+ int acceptsNumClicks() const { return acceptsNumClicks(effectType()); }
void doAcceptPathPreparations(SPLPEItem *lpeitem);
/*
@@ -68,7 +68,7 @@ public:
* e.g., waiting for a parameter path either before the effect is created or when it needs a
* path as argument. This is set in sp_lpe_item_add_path_effect().
*/
- inline bool isReady() { return is_ready; }
+ inline bool isReady() const { return is_ready; }
inline void setReady(bool ready = true) { is_ready = ready; }
virtual void doEffect (SPCurve * curve);
@@ -78,35 +78,35 @@ public:
/**
* Sets all parameters to their default values and writes them to SVG.
*/
- virtual void resetDefaults(SPItem * item);
+ virtual void resetDefaults(SPItem const* item);
/// /todo: is this method really necessary? it causes UI inconsistensies... (johan)
virtual void transform_multiply(Geom::Affine const& postmul, bool set);
// /TODO: providesKnotholder() is currently used as an indicator of whether a nodepath is
// created for an item or not. When we allow both at the same time, this needs rethinking!
- bool providesKnotholder();
+ bool providesKnotholder() const;
// /TODO: in view of providesOwnFlashPaths() below, this is somewhat redundant
// (but spiro lpe still needs it!)
- virtual LPEPathFlashType pathFlashType() { return DEFAULT; }
+ virtual LPEPathFlashType pathFlashType() const { return DEFAULT; }
void addHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item);
- std::vector<Geom::PathVector> getHelperPaths(SPLPEItem *lpeitem);
+ std::vector<Geom::PathVector> getHelperPaths(SPLPEItem const* lpeitem);
- inline bool providesOwnFlashPaths() {
+ inline bool providesOwnFlashPaths() const {
return provides_own_flash_paths || show_orig_path;
}
- inline bool showOrigPath() { return show_orig_path; }
+ inline bool showOrigPath() const { return show_orig_path; }
- Glib::ustring getName();
+ Glib::ustring getName() const;
Inkscape::XML::Node * getRepr();
SPDocument * getSPDoc();
LivePathEffectObject * getLPEObj() {return lpeobj;};
Parameter * getParameter(const char * key);
- void readallParameters(Inkscape::XML::Node * repr);
+ void readallParameters(Inkscape::XML::Node const* repr);
void setParameter(const gchar * key, const gchar * new_value);
- inline bool isVisible() { return is_visible; }
+ inline bool isVisible() const { return is_visible; }
void editNextParamOncanvas(SPItem * item, SPDesktop * desktop);
@@ -128,7 +128,7 @@ protected:
virtual void addKnotHolderEntities(KnotHolder * /*knotholder*/, SPDesktop * /*desktop*/, SPItem * /*item*/) {};
- virtual void addCanvasIndicators(SPLPEItem *lpeitem, std::vector<Geom::PathVector> &hp_vec);
+ virtual void addCanvasIndicators(SPLPEItem const* lpeitem, std::vector<Geom::PathVector> &hp_vec);
std::vector<Parameter *> param_vector;
bool _provides_knotholder_entities;
diff --git a/src/live_effects/lpe-angle_bisector.cpp b/src/live_effects/lpe-angle_bisector.cpp
index 8aa88f1f0..91f779ef3 100644
--- a/src/live_effects/lpe-angle_bisector.cpp
+++ b/src/live_effects/lpe-angle_bisector.cpp
@@ -28,14 +28,14 @@ class KnotHolderEntityLeftEnd : public LPEKnotHolderEntity {
public:
KnotHolderEntityLeftEnd(LPEAngleBisector* effect) : LPEKnotHolderEntity(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
class KnotHolderEntityRightEnd : public LPEKnotHolderEntity {
public:
KnotHolderEntityRightEnd(LPEAngleBisector* effect) : LPEKnotHolderEntity(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
} // namespace TtC
@@ -125,16 +125,16 @@ KnotHolderEntityRightEnd::knot_set(Geom::Point const &p, Geom::Point const &/*or
}
Geom::Point
-KnotHolderEntityLeftEnd::knot_get()
+KnotHolderEntityLeftEnd::knot_get() const
{
- LPEAngleBisector *lpe = dynamic_cast<LPEAngleBisector *>(_effect);
+ LPEAngleBisector const* lpe = dynamic_cast<LPEAngleBisector const*>(_effect);
return lpe->ptA - lpe->dir * lpe->length_left;
}
Geom::Point
-KnotHolderEntityRightEnd::knot_get()
+KnotHolderEntityRightEnd::knot_get() const
{
- LPEAngleBisector *lpe = dynamic_cast<LPEAngleBisector *>(_effect);
+ LPEAngleBisector const* lpe = dynamic_cast<LPEAngleBisector const*>(_effect);
return lpe->ptA + lpe->dir * lpe->length_right;
}
diff --git a/src/live_effects/lpe-bendpath.cpp b/src/live_effects/lpe-bendpath.cpp
index 3732ae3ef..49660c91b 100644
--- a/src/live_effects/lpe-bendpath.cpp
+++ b/src/live_effects/lpe-bendpath.cpp
@@ -72,7 +72,7 @@ LPEBendPath::~LPEBendPath()
}
void
-LPEBendPath::doBeforeEffect (SPLPEItem *lpeitem)
+LPEBendPath::doBeforeEffect (SPLPEItem const* lpeitem)
{
// get the item bounding box
original_bbox(lpeitem);
@@ -123,7 +123,7 @@ LPEBendPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd
}
void
-LPEBendPath::resetDefaults(SPItem * item)
+LPEBendPath::resetDefaults(SPItem const* item)
{
Effect::resetDefaults(item);
diff --git a/src/live_effects/lpe-bendpath.h b/src/live_effects/lpe-bendpath.h
index 98421df88..3d336e2e7 100644
--- a/src/live_effects/lpe-bendpath.h
+++ b/src/live_effects/lpe-bendpath.h
@@ -33,11 +33,11 @@ public:
LPEBendPath(LivePathEffectObject *lpeobject);
virtual ~LPEBendPath();
- virtual void doBeforeEffect (SPLPEItem *lpeitem);
+ virtual void doBeforeEffect (SPLPEItem const* lpeitem);
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
- virtual void resetDefaults(SPItem * item);
+ virtual void resetDefaults(SPItem const* item);
private:
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp
index 9ac553ed5..c1b72c3c7 100644
--- a/src/live_effects/lpe-copy_rotate.cpp
+++ b/src/live_effects/lpe-copy_rotate.cpp
@@ -34,14 +34,14 @@ class KnotHolderEntityStartingAngle : public LPEKnotHolderEntity {
public:
KnotHolderEntityStartingAngle(LPECopyRotate *effect) : LPEKnotHolderEntity(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
class KnotHolderEntityRotationAngle : public LPEKnotHolderEntity {
public:
KnotHolderEntityRotationAngle(LPECopyRotate *effect) : LPEKnotHolderEntity(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
} // namespace CR
@@ -73,9 +73,9 @@ LPECopyRotate::~LPECopyRotate()
}
void
-LPECopyRotate::doOnApply(SPLPEItem *lpeitem)
+LPECopyRotate::doOnApply(SPLPEItem const* lpeitem)
{
- SPCurve *curve = SP_SHAPE(lpeitem)->_curve;
+ SPCurve const *curve = SP_SHAPE(lpeitem)->_curve;
A = *(curve->first_point());
B = *(curve->last_point());
@@ -188,16 +188,16 @@ KnotHolderEntityRotationAngle::knot_set(Geom::Point const &p, Geom::Point const
}
Geom::Point
-KnotHolderEntityStartingAngle::knot_get()
+KnotHolderEntityStartingAngle::knot_get() const
{
- LPECopyRotate* lpe = dynamic_cast<LPECopyRotate *>(_effect);
+ LPECopyRotate const *lpe = dynamic_cast<LPECopyRotate const*>(_effect);
return lpe->start_pos;
}
Geom::Point
-KnotHolderEntityRotationAngle::knot_get()
+KnotHolderEntityRotationAngle::knot_get() const
{
- LPECopyRotate* lpe = dynamic_cast<LPECopyRotate *>(_effect);
+ LPECopyRotate const *lpe = dynamic_cast<LPECopyRotate const*>(_effect);
return lpe->rot_pos;
}
diff --git a/src/live_effects/lpe-copy_rotate.h b/src/live_effects/lpe-copy_rotate.h
index b14bc4128..1354b980a 100644
--- a/src/live_effects/lpe-copy_rotate.h
+++ b/src/live_effects/lpe-copy_rotate.h
@@ -31,7 +31,7 @@ public:
LPECopyRotate(LivePathEffectObject *lpeobject);
virtual ~LPECopyRotate();
- virtual void doOnApply (SPLPEItem *lpeitem);
+ virtual void doOnApply (SPLPEItem const* lpeitem);
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
diff --git a/src/live_effects/lpe-curvestitch.cpp b/src/live_effects/lpe-curvestitch.cpp
index edf8ab55e..af928fff8 100644
--- a/src/live_effects/lpe-curvestitch.cpp
+++ b/src/live_effects/lpe-curvestitch.cpp
@@ -151,7 +151,7 @@ LPECurveStitch::doEffect_path (std::vector<Geom::Path> const & path_in)
}
void
-LPECurveStitch::resetDefaults(SPItem * item)
+LPECurveStitch::resetDefaults(SPItem const* item)
{
Effect::resetDefaults(item);
diff --git a/src/live_effects/lpe-curvestitch.h b/src/live_effects/lpe-curvestitch.h
index f46f2a5d2..38a11b4af 100644
--- a/src/live_effects/lpe-curvestitch.h
+++ b/src/live_effects/lpe-curvestitch.h
@@ -30,7 +30,7 @@ public:
virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> const & path_in);
- virtual void resetDefaults(SPItem * item);
+ virtual void resetDefaults(SPItem const* item);
virtual void transform_multiply(Geom::Affine const& postmul, bool set);
diff --git a/src/live_effects/lpe-envelope.cpp b/src/live_effects/lpe-envelope.cpp
index 9fd299ee8..4f5623fba 100644
--- a/src/live_effects/lpe-envelope.cpp
+++ b/src/live_effects/lpe-envelope.cpp
@@ -50,7 +50,7 @@ LPEEnvelope::~LPEEnvelope()
}
void
-LPEEnvelope::doBeforeEffect (SPLPEItem *lpeitem)
+LPEEnvelope::doBeforeEffect (SPLPEItem const* lpeitem)
{
// get the item bounding box
original_bbox(lpeitem);
@@ -225,7 +225,7 @@ LPEEnvelope::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd
}
void
-LPEEnvelope::resetDefaults(SPItem * item)
+LPEEnvelope::resetDefaults(SPItem const* item)
{
Effect::resetDefaults(item);
diff --git a/src/live_effects/lpe-envelope.h b/src/live_effects/lpe-envelope.h
index fe1d9561d..b5d6ceb50 100644
--- a/src/live_effects/lpe-envelope.h
+++ b/src/live_effects/lpe-envelope.h
@@ -31,11 +31,11 @@ public:
LPEEnvelope(LivePathEffectObject *lpeobject);
virtual ~LPEEnvelope();
- virtual void doBeforeEffect (SPLPEItem *lpeitem);
+ virtual void doBeforeEffect (SPLPEItem const* lpeitem);
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
- virtual void resetDefaults(SPItem * item);
+ virtual void resetDefaults(SPItem const* item);
private:
PathParam bend_path1;
diff --git a/src/live_effects/lpe-extrude.cpp b/src/live_effects/lpe-extrude.cpp
index 4351f3aa0..7f5a00cf8 100644
--- a/src/live_effects/lpe-extrude.cpp
+++ b/src/live_effects/lpe-extrude.cpp
@@ -170,7 +170,7 @@ LPEExtrude::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2
}
void
-LPEExtrude::resetDefaults(SPItem * item)
+LPEExtrude::resetDefaults(SPItem const* item)
{
Effect::resetDefaults(item);
diff --git a/src/live_effects/lpe-extrude.h b/src/live_effects/lpe-extrude.h
index 0c9f11444..491fe4959 100644
--- a/src/live_effects/lpe-extrude.h
+++ b/src/live_effects/lpe-extrude.h
@@ -26,7 +26,7 @@ public:
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
- virtual void resetDefaults(SPItem * item);
+ virtual void resetDefaults(SPItem const* item);
private:
VectorParam extrude_vector;
diff --git a/src/live_effects/lpe-interpolate.cpp b/src/live_effects/lpe-interpolate.cpp
index 227185f91..e41bc6f0e 100644
--- a/src/live_effects/lpe-interpolate.cpp
+++ b/src/live_effects/lpe-interpolate.cpp
@@ -99,7 +99,7 @@ LPEInterpolate::doEffect_path (Geom::PathVector const & path_in)
}
void
-LPEInterpolate::resetDefaults(SPItem * item)
+LPEInterpolate::resetDefaults(SPItem const* item)
{
Effect::resetDefaults(item);
diff --git a/src/live_effects/lpe-interpolate.h b/src/live_effects/lpe-interpolate.h
index 3091537f3..679001a81 100644
--- a/src/live_effects/lpe-interpolate.h
+++ b/src/live_effects/lpe-interpolate.h
@@ -29,7 +29,7 @@ public:
virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> const & path_in);
- virtual void resetDefaults(SPItem * item);
+ virtual void resetDefaults(SPItem const* item);
private:
PathParam trajectory_path;
ScalarParam number_of_steps;
diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp
index 61e457d35..27652bf0c 100644
--- a/src/live_effects/lpe-knot.cpp
+++ b/src/live_effects/lpe-knot.cpp
@@ -46,7 +46,7 @@ class KnotHolderEntityCrossingSwitcher : public LPEKnotHolderEntity {
public:
KnotHolderEntityCrossingSwitcher(LPEKnot *effect) : LPEKnotHolderEntity(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
virtual void knot_click(guint state);
};
@@ -531,7 +531,7 @@ collectPathsAndWidths (SPLPEItem const *lpeitem, std::vector<Geom::Path> &paths,
void
-LPEKnot::doBeforeEffect (SPLPEItem *lpeitem)
+LPEKnot::doBeforeEffect (SPLPEItem const* lpeitem)
{
using namespace Geom;
original_bbox(lpeitem);
@@ -631,9 +631,9 @@ KnotHolderEntityCrossingSwitcher::knot_set(Geom::Point const &p, Geom::Point con
}
Geom::Point
-KnotHolderEntityCrossingSwitcher::knot_get()
+KnotHolderEntityCrossingSwitcher::knot_get() const
{
- LPEKnot* lpe = dynamic_cast<LPEKnot *>(_effect);
+ LPEKnot const *lpe = dynamic_cast<LPEKnot const*>(_effect);
return lpe->switcher;
}
diff --git a/src/live_effects/lpe-knot.h b/src/live_effects/lpe-knot.h
index 14c61a4e5..a25607981 100644
--- a/src/live_effects/lpe-knot.h
+++ b/src/live_effects/lpe-knot.h
@@ -56,7 +56,7 @@ public:
LPEKnot(LivePathEffectObject *lpeobject);
virtual ~LPEKnot();
- virtual void doBeforeEffect (SPLPEItem *lpeitem);
+ virtual void doBeforeEffect (SPLPEItem const* lpeitem);
virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> const & input_path);
/* the knotholder entity classes must be declared friends */
diff --git a/src/live_effects/lpe-lattice.cpp b/src/live_effects/lpe-lattice.cpp
index 2d04c4d41..8136569e8 100644
--- a/src/live_effects/lpe-lattice.cpp
+++ b/src/live_effects/lpe-lattice.cpp
@@ -173,13 +173,13 @@ LPELattice::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2
}
void
-LPELattice::doBeforeEffect (SPLPEItem *lpeitem)
+LPELattice::doBeforeEffect (SPLPEItem const* lpeitem)
{
original_bbox(lpeitem);
}
void
-LPELattice::resetDefaults(SPItem * item)
+LPELattice::resetDefaults(SPItem const* item)
{
Effect::resetDefaults(item);
diff --git a/src/live_effects/lpe-lattice.h b/src/live_effects/lpe-lattice.h
index f95e33b0b..a44dda3fd 100644
--- a/src/live_effects/lpe-lattice.h
+++ b/src/live_effects/lpe-lattice.h
@@ -31,11 +31,11 @@ public:
LPELattice(LivePathEffectObject *lpeobject);
virtual ~LPELattice();
- virtual void doBeforeEffect (SPLPEItem *lpeitem);
+ virtual void doBeforeEffect (SPLPEItem const* lpeitem);
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
- virtual void resetDefaults(SPItem * item);
+ virtual void resetDefaults(SPItem const* item);
protected:
//virtual void addHelperPathsImpl(SPLPEItem *lpeitem, SPDesktop *desktop);
diff --git a/src/live_effects/lpe-line_segment.cpp b/src/live_effects/lpe-line_segment.cpp
index 6619b85ce..2e7240e25 100644
--- a/src/live_effects/lpe-line_segment.cpp
+++ b/src/live_effects/lpe-line_segment.cpp
@@ -43,7 +43,7 @@ LPELineSegment::~LPELineSegment()
}
void
-LPELineSegment::doBeforeEffect (SPLPEItem *lpeitem)
+LPELineSegment::doBeforeEffect (SPLPEItem const* lpeitem)
{
lpetool_get_limiting_bbox_corners(lpeitem->document, bboxA, bboxB);
}
diff --git a/src/live_effects/lpe-line_segment.h b/src/live_effects/lpe-line_segment.h
index b2bb0994f..1a57688b6 100644
--- a/src/live_effects/lpe-line_segment.h
+++ b/src/live_effects/lpe-line_segment.h
@@ -32,7 +32,7 @@ public:
LPELineSegment(LivePathEffectObject *lpeobject);
virtual ~LPELineSegment();
- virtual void doBeforeEffect (SPLPEItem *lpeitem);
+ virtual void doBeforeEffect (SPLPEItem const* lpeitem);
virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> const & path_in);
diff --git a/src/live_effects/lpe-mirror_symmetry.cpp b/src/live_effects/lpe-mirror_symmetry.cpp
index a56909338..4d4837d8d 100644
--- a/src/live_effects/lpe-mirror_symmetry.cpp
+++ b/src/live_effects/lpe-mirror_symmetry.cpp
@@ -43,7 +43,7 @@ LPEMirrorSymmetry::~LPEMirrorSymmetry()
}
void
-LPEMirrorSymmetry::doOnApply (SPLPEItem *lpeitem)
+LPEMirrorSymmetry::doOnApply (SPLPEItem const* lpeitem)
{
using namespace Geom;
diff --git a/src/live_effects/lpe-mirror_symmetry.h b/src/live_effects/lpe-mirror_symmetry.h
index a37e0d45c..c01d1bf6f 100644
--- a/src/live_effects/lpe-mirror_symmetry.h
+++ b/src/live_effects/lpe-mirror_symmetry.h
@@ -28,7 +28,7 @@ public:
LPEMirrorSymmetry(LivePathEffectObject *lpeobject);
virtual ~LPEMirrorSymmetry();
- virtual void doOnApply (SPLPEItem *lpeitem);
+ virtual void doOnApply (SPLPEItem const* lpeitem);
virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> const & path_in);
diff --git a/src/live_effects/lpe-offset.cpp b/src/live_effects/lpe-offset.cpp
index 26d42a94f..192bd17ca 100644
--- a/src/live_effects/lpe-offset.cpp
+++ b/src/live_effects/lpe-offset.cpp
@@ -40,7 +40,7 @@ LPEOffset::~LPEOffset()
}
void
-LPEOffset::doOnApply(SPLPEItem *lpeitem)
+LPEOffset::doOnApply(SPLPEItem const* lpeitem)
{
offset_pt.param_set_and_write_new_value(*(SP_SHAPE(lpeitem)->_curve->first_point()));
}
diff --git a/src/live_effects/lpe-offset.h b/src/live_effects/lpe-offset.h
index f57d41a14..9966fd45d 100644
--- a/src/live_effects/lpe-offset.h
+++ b/src/live_effects/lpe-offset.h
@@ -26,7 +26,7 @@ public:
LPEOffset(LivePathEffectObject *lpeobject);
virtual ~LPEOffset();
- virtual void doOnApply (SPLPEItem *lpeitem);
+ virtual void doOnApply (SPLPEItem const* lpeitem);
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
diff --git a/src/live_effects/lpe-parallel.cpp b/src/live_effects/lpe-parallel.cpp
index 4d4b0c17d..bb37fd42c 100644
--- a/src/live_effects/lpe-parallel.cpp
+++ b/src/live_effects/lpe-parallel.cpp
@@ -32,14 +32,14 @@ class KnotHolderEntityLeftEnd : public LPEKnotHolderEntity {
public:
KnotHolderEntityLeftEnd(LPEParallel *effect) : LPEKnotHolderEntity(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
class KnotHolderEntityRightEnd : public LPEKnotHolderEntity {
public:
KnotHolderEntityRightEnd(LPEParallel *effect) : LPEKnotHolderEntity(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
} // namespace Pl
@@ -65,7 +65,7 @@ LPEParallel::~LPEParallel()
}
void
-LPEParallel::doOnApply (SPLPEItem *lpeitem)
+LPEParallel::doOnApply (SPLPEItem const* lpeitem)
{
SPCurve const *curve = SP_SHAPE(lpeitem)->_curve;
@@ -143,16 +143,16 @@ KnotHolderEntityRightEnd::knot_set(Geom::Point const &p, Geom::Point const &/*or
}
Geom::Point
-KnotHolderEntityLeftEnd::knot_get()
+KnotHolderEntityLeftEnd::knot_get() const
{
- LPEParallel *lpe = dynamic_cast<LPEParallel *>(_effect);
+ LPEParallel const *lpe = dynamic_cast<LPEParallel const*>(_effect);
return lpe->C;
}
Geom::Point
-KnotHolderEntityRightEnd::knot_get()
+KnotHolderEntityRightEnd::knot_get() const
{
- LPEParallel *lpe = dynamic_cast<LPEParallel *>(_effect);
+ LPEParallel const *lpe = dynamic_cast<LPEParallel const*>(_effect);
return lpe->D;
}
diff --git a/src/live_effects/lpe-parallel.h b/src/live_effects/lpe-parallel.h
index e23361675..ff19d690e 100644
--- a/src/live_effects/lpe-parallel.h
+++ b/src/live_effects/lpe-parallel.h
@@ -32,7 +32,7 @@ public:
LPEParallel(LivePathEffectObject *lpeobject);
virtual ~LPEParallel();
- virtual void doOnApply (SPLPEItem *lpeitem);
+ virtual void doOnApply (SPLPEItem const* lpeitem);
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
diff --git a/src/live_effects/lpe-perp_bisector.cpp b/src/live_effects/lpe-perp_bisector.cpp
index c528ef692..c2a25a187 100644
--- a/src/live_effects/lpe-perp_bisector.cpp
+++ b/src/live_effects/lpe-perp_bisector.cpp
@@ -38,25 +38,25 @@ class KnotHolderEntityLeftEnd : public KnotHolderEntityEnd {
public:
KnotHolderEntityLeftEnd(LPEPerpBisector *effect) : KnotHolderEntityEnd(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
class KnotHolderEntityRightEnd : public KnotHolderEntityEnd {
public:
KnotHolderEntityRightEnd(LPEPerpBisector *effect) : KnotHolderEntityEnd(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
Geom::Point
-KnotHolderEntityLeftEnd::knot_get() {
- LPEPerpBisector *lpe = dynamic_cast<LPEPerpBisector *>(_effect);
+KnotHolderEntityLeftEnd::knot_get() const {
+ LPEPerpBisector const* lpe = dynamic_cast<LPEPerpBisector const*>(_effect);
return Geom::Point(lpe->C);
}
Geom::Point
-KnotHolderEntityRightEnd::knot_get() {
- LPEPerpBisector *lpe = dynamic_cast<LPEPerpBisector *>(_effect);
+KnotHolderEntityRightEnd::knot_get() const {
+ LPEPerpBisector const* lpe = dynamic_cast<LPEPerpBisector const*>(_effect);
return Geom::Point(lpe->D);
}
@@ -111,7 +111,7 @@ LPEPerpBisector::~LPEPerpBisector()
}
void
-LPEPerpBisector::doOnApply (SPLPEItem */*lpeitem*/)
+LPEPerpBisector::doOnApply (SPLPEItem const*/*lpeitem*/)
{
/* make the path a straight line */
/**
diff --git a/src/live_effects/lpe-perp_bisector.h b/src/live_effects/lpe-perp_bisector.h
index f5a918028..4ff9909a4 100644
--- a/src/live_effects/lpe-perp_bisector.h
+++ b/src/live_effects/lpe-perp_bisector.h
@@ -37,7 +37,7 @@ public:
virtual EffectType effectType () { return PERP_BISECTOR; }
- void doOnApply (SPLPEItem *lpeitem);
+ void doOnApply (SPLPEItem const* lpeitem);
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> >
doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp
index aeee77482..c255f8665 100644
--- a/src/live_effects/lpe-perspective_path.cpp
+++ b/src/live_effects/lpe-perspective_path.cpp
@@ -36,7 +36,7 @@ class KnotHolderEntityOffset : public LPEKnotHolderEntity
public:
KnotHolderEntityOffset(LPEPerspectivePath *effect) : LPEKnotHolderEntity(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
} // namespace PP
@@ -71,7 +71,7 @@ LPEPerspectivePath::~LPEPerspectivePath()
}
void
-LPEPerspectivePath::doBeforeEffect (SPLPEItem *lpeitem)
+LPEPerspectivePath::doBeforeEffect (SPLPEItem const* lpeitem)
{
original_bbox(lpeitem, true);
}
@@ -165,9 +165,9 @@ KnotHolderEntityOffset::knot_set(Geom::Point const &p, Geom::Point const &origin
}
Geom::Point
-KnotHolderEntityOffset::knot_get()
+KnotHolderEntityOffset::knot_get() const
{
- LPEPerspectivePath* lpe = dynamic_cast<LPEPerspectivePath *>(_effect);
+ LPEPerspectivePath const *lpe = dynamic_cast<LPEPerspectivePath const*>(_effect);
return lpe->orig + Geom::Point(lpe->offsetx, -lpe->offsety);
}
diff --git a/src/live_effects/lpe-perspective_path.h b/src/live_effects/lpe-perspective_path.h
index 14321f52e..a9ee004f9 100644
--- a/src/live_effects/lpe-perspective_path.h
+++ b/src/live_effects/lpe-perspective_path.h
@@ -34,7 +34,7 @@ public:
LPEPerspectivePath(LivePathEffectObject *lpeobject);
virtual ~LPEPerspectivePath();
- virtual void doBeforeEffect (SPLPEItem *lpeitem);
+ virtual void doBeforeEffect (SPLPEItem const* lpeitem);
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
diff --git a/src/live_effects/lpe-powerstroke.cpp b/src/live_effects/lpe-powerstroke.cpp
index b042f8d41..0533c1ed6 100644
--- a/src/live_effects/lpe-powerstroke.cpp
+++ b/src/live_effects/lpe-powerstroke.cpp
@@ -263,7 +263,7 @@ LPEPowerStroke::~LPEPowerStroke()
void
-LPEPowerStroke::doOnApply(SPLPEItem *lpeitem)
+LPEPowerStroke::doOnApply(SPLPEItem const* lpeitem)
{
if (SP_IS_SHAPE(lpeitem)) {
std::vector<Geom::Point> points;
diff --git a/src/live_effects/lpe-powerstroke.h b/src/live_effects/lpe-powerstroke.h
index e6c915234..7bc736820 100644
--- a/src/live_effects/lpe-powerstroke.h
+++ b/src/live_effects/lpe-powerstroke.h
@@ -27,7 +27,7 @@ public:
virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> const & path_in);
- virtual void doOnApply(SPLPEItem *lpeitem);
+ virtual void doOnApply(SPLPEItem const* lpeitem);
// methods called by path-manipulator upon edits
void adjustForNewPath(std::vector<Geom::Path> const & path_in);
diff --git a/src/live_effects/lpe-rough-hatches.cpp b/src/live_effects/lpe-rough-hatches.cpp
index f52977fcb..96b0bb0ae 100644
--- a/src/live_effects/lpe-rough-hatches.cpp
+++ b/src/live_effects/lpe-rough-hatches.cpp
@@ -539,7 +539,7 @@ LPERoughHatches::smoothSnake(std::vector<std::vector<Point> > const &linearSnake
}
void
-LPERoughHatches::doBeforeEffect (SPLPEItem */*lpeitem*/)
+LPERoughHatches::doBeforeEffect (SPLPEItem const*/*lpeitem*/)
{
using namespace Geom;
top_edge_variation.resetRandomizer();
@@ -555,7 +555,7 @@ LPERoughHatches::doBeforeEffect (SPLPEItem */*lpeitem*/)
void
-LPERoughHatches::resetDefaults(SPItem * item)
+LPERoughHatches::resetDefaults(SPItem const* item)
{
Effect::resetDefaults(item);
diff --git a/src/live_effects/lpe-rough-hatches.h b/src/live_effects/lpe-rough-hatches.h
index 5051b313a..f8454e1ea 100644
--- a/src/live_effects/lpe-rough-hatches.h
+++ b/src/live_effects/lpe-rough-hatches.h
@@ -31,9 +31,9 @@ public:
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> >
doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
- virtual void resetDefaults(SPItem * item);
+ virtual void resetDefaults(SPItem const* item);
- virtual void doBeforeEffect(SPLPEItem * item);
+ virtual void doBeforeEffect(SPLPEItem const* item);
std::vector<double>
generateLevels(Geom::Interval const &domain, double x_org);
diff --git a/src/live_effects/lpe-skeleton.cpp b/src/live_effects/lpe-skeleton.cpp
index 65faef216..c61e9773f 100644
--- a/src/live_effects/lpe-skeleton.cpp
+++ b/src/live_effects/lpe-skeleton.cpp
@@ -95,7 +95,7 @@ class KnotHolderEntityMyHandle : public LPEKnotHolderEntity
public:
// the set() and get() methods must be implemented, click() is optional
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
//virtual void knot_click(guint state);
};
diff --git a/src/live_effects/lpe-sketch.cpp b/src/live_effects/lpe-sketch.cpp
index ccc508144..8ad0e616f 100644
--- a/src/live_effects/lpe-sketch.cpp
+++ b/src/live_effects/lpe-sketch.cpp
@@ -362,7 +362,7 @@ LPESketch::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_
}
void
-LPESketch::doBeforeEffect (SPLPEItem */*lpeitem*/)
+LPESketch::doBeforeEffect (SPLPEItem const*/*lpeitem*/)
{
//init random parameters.
parallel_offset.resetRandomizer();
diff --git a/src/live_effects/lpe-sketch.h b/src/live_effects/lpe-sketch.h
index b95f57682..3bef0cf5e 100644
--- a/src/live_effects/lpe-sketch.h
+++ b/src/live_effects/lpe-sketch.h
@@ -31,7 +31,7 @@ public:
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
- virtual void doBeforeEffect (SPLPEItem *lpeitem);
+ virtual void doBeforeEffect (SPLPEItem const* lpeitem);
private:
// add the parameters for your effect here:
diff --git a/src/live_effects/lpe-spiro.h b/src/live_effects/lpe-spiro.h
index f3cdbda79..edce42280 100644
--- a/src/live_effects/lpe-spiro.h
+++ b/src/live_effects/lpe-spiro.h
@@ -18,7 +18,7 @@ public:
LPESpiro(LivePathEffectObject *lpeobject);
virtual ~LPESpiro();
- virtual LPEPathFlashType pathFlashType() { return SUPPRESS_FLASH; }
+ virtual LPEPathFlashType pathFlashType() const { return SUPPRESS_FLASH; }
virtual void doEffect(SPCurve * curve);
diff --git a/src/live_effects/lpe-tangent_to_curve.cpp b/src/live_effects/lpe-tangent_to_curve.cpp
index b40d404ae..dbebdf7fb 100644
--- a/src/live_effects/lpe-tangent_to_curve.cpp
+++ b/src/live_effects/lpe-tangent_to_curve.cpp
@@ -36,14 +36,14 @@ class KnotHolderEntityAttachPt : public LPEKnotHolderEntity {
public:
KnotHolderEntityAttachPt(LPETangentToCurve *effect) : LPEKnotHolderEntity(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
class KnotHolderEntityLeftEnd : public LPEKnotHolderEntity {
public:
KnotHolderEntityLeftEnd(LPETangentToCurve *effect) : LPEKnotHolderEntity(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
class KnotHolderEntityRightEnd : public LPEKnotHolderEntity
@@ -51,7 +51,7 @@ class KnotHolderEntityRightEnd : public LPEKnotHolderEntity
public:
KnotHolderEntityRightEnd(LPETangentToCurve *effect) : LPEKnotHolderEntity(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
} // namespace TtC
@@ -172,23 +172,23 @@ KnotHolderEntityRightEnd::knot_set(Geom::Point const &p, Geom::Point const &/*or
}
Geom::Point
-KnotHolderEntityAttachPt::knot_get()
+KnotHolderEntityAttachPt::knot_get() const
{
- LPETangentToCurve* lpe = dynamic_cast<LPETangentToCurve *>(_effect);
+ LPETangentToCurve const *lpe = dynamic_cast<LPETangentToCurve const*>(_effect);
return lpe->ptA;
}
Geom::Point
-KnotHolderEntityLeftEnd::knot_get()
+KnotHolderEntityLeftEnd::knot_get() const
{
- LPETangentToCurve *lpe = dynamic_cast<LPETangentToCurve *>(_effect);
+ LPETangentToCurve const *lpe = dynamic_cast<LPETangentToCurve const*>(_effect);
return lpe->C;
}
Geom::Point
-KnotHolderEntityRightEnd::knot_get()
+KnotHolderEntityRightEnd::knot_get() const
{
- LPETangentToCurve *lpe = dynamic_cast<LPETangentToCurve *>(_effect);
+ LPETangentToCurve const *lpe = dynamic_cast<LPETangentToCurve const*>(_effect);
return lpe->D;
}
diff --git a/src/live_effects/lpe-vonkoch.cpp b/src/live_effects/lpe-vonkoch.cpp
index 7e4b5f5fe..f7b2beeba 100644
--- a/src/live_effects/lpe-vonkoch.cpp
+++ b/src/live_effects/lpe-vonkoch.cpp
@@ -241,7 +241,7 @@ LPEVonKoch::doEffect_path (std::vector<Geom::Path> const & path_in)
*/
void
-LPEVonKoch::doBeforeEffect (SPLPEItem *lpeitem)
+LPEVonKoch::doBeforeEffect (SPLPEItem const* lpeitem)
{
using namespace Geom;
original_bbox(lpeitem);
@@ -269,7 +269,7 @@ LPEVonKoch::doBeforeEffect (SPLPEItem *lpeitem)
void
-LPEVonKoch::resetDefaults(SPItem * item)
+LPEVonKoch::resetDefaults(SPItem const* item)
{
Effect::resetDefaults(item);
diff --git a/src/live_effects/lpe-vonkoch.h b/src/live_effects/lpe-vonkoch.h
index 7862cdbb5..2ea7c8169 100644
--- a/src/live_effects/lpe-vonkoch.h
+++ b/src/live_effects/lpe-vonkoch.h
@@ -51,9 +51,9 @@ public:
virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> const & path_in);
- virtual void resetDefaults(SPItem * item);
+ virtual void resetDefaults(SPItem const* item);
- virtual void doBeforeEffect(SPLPEItem * item);
+ virtual void doBeforeEffect(SPLPEItem const* item);
//Usefull??
// protected:
diff --git a/src/live_effects/lpegroupbbox.cpp b/src/live_effects/lpegroupbbox.cpp
index e2378265a..2a1b70a6a 100644
--- a/src/live_effects/lpegroupbbox.cpp
+++ b/src/live_effects/lpegroupbbox.cpp
@@ -22,7 +22,7 @@ namespace LivePathEffect {
* or of the transformed lpeitem (\c absolute = \c true) using sp_item_i2doc_affine.
* @post Updated values of boundingbox_X and boundingbox_Y. These intervals are set to empty intervals when the precondition is not met.
*/
-void GroupBBoxEffect::original_bbox(SPLPEItem *lpeitem, bool absolute)
+void GroupBBoxEffect::original_bbox(SPLPEItem const* lpeitem, bool absolute)
{
// Get item bounding box
Geom::Affine transform;
diff --git a/src/live_effects/lpegroupbbox.h b/src/live_effects/lpegroupbbox.h
index 57577d20f..cc14203d1 100644
--- a/src/live_effects/lpegroupbbox.h
+++ b/src/live_effects/lpegroupbbox.h
@@ -22,7 +22,7 @@ protected:
Geom::Interval boundingbox_Y;
//This sets boundingbox_X and boundingbox_Y
- void original_bbox(SPLPEItem *lpeitem, bool absolute = false);
+ void original_bbox(SPLPEItem const* lpeitem, bool absolute = false);
};
}; //namespace LivePathEffect
diff --git a/src/live_effects/parameter/bool.h b/src/live_effects/parameter/bool.h
index d7aa299aa..fafb1beca 100644
--- a/src/live_effects/parameter/bool.h
+++ b/src/live_effects/parameter/bool.h
@@ -36,10 +36,9 @@ public:
void param_setValue(bool newvalue);
virtual void param_set_default();
- bool get_value() { return value; };
+ bool get_value() const { return value; };
- inline operator bool()
- { return value; };
+ inline operator bool() const { return value; };
private:
BoolParam(const BoolParam&);
diff --git a/src/live_effects/parameter/enum.h b/src/live_effects/parameter/enum.h
index 2a1b07b47..2340663c3 100644
--- a/src/live_effects/parameter/enum.h
+++ b/src/live_effects/parameter/enum.h
@@ -68,8 +68,9 @@ public:
return value;
}
- inline operator E()
- { return value; };
+ inline operator E() const {
+ return value;
+ };
void param_set_default() {
param_set_value(defvalue);
diff --git a/src/live_effects/parameter/originalpath.h b/src/live_effects/parameter/originalpath.h
index 7dd17edb0..b3feec41f 100644
--- a/src/live_effects/parameter/originalpath.h
+++ b/src/live_effects/parameter/originalpath.h
@@ -31,7 +31,7 @@ public:
/** Disable the canvas indicators of parent class by overriding this method */
virtual void param_editOncanvas(SPItem * /*item*/, SPDesktop * /*dt*/) {};
/** Disable the canvas indicators of parent class by overriding this method */
- virtual void addCanvasIndicators(SPLPEItem * /*lpeitem*/, std::vector<Geom::PathVector> & /*hp_vec*/) {};
+ virtual void addCanvasIndicators(SPLPEItem const* /*lpeitem*/, std::vector<Geom::PathVector> & /*hp_vec*/) {};
protected:
virtual void linked_modified_callback(SPObject *linked_obj, guint flags);
diff --git a/src/live_effects/parameter/parameter.h b/src/live_effects/parameter/parameter.h
index 4785d5455..785ada92e 100644
--- a/src/live_effects/parameter/parameter.h
+++ b/src/live_effects/parameter/parameter.h
@@ -59,9 +59,9 @@ public:
virtual Glib::ustring * param_getTooltip() { return &param_tooltip; };
// overload these for your particular parameter to make it provide knotholder handles or canvas helperpaths
- virtual bool providesKnotHolderEntities() { return false; }
+ virtual bool providesKnotHolderEntities() const { return false; }
virtual void addKnotHolderEntities(KnotHolder */*knotholder*/, SPDesktop */*desktop*/, SPItem */*item*/) {};
- virtual void addCanvasIndicators(SPLPEItem */*lpeitem*/, std::vector<Geom::PathVector> &/*hp_vec*/) {};
+ virtual void addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector<Geom::PathVector> &/*hp_vec*/) {};
virtual void param_editOncanvas(SPItem * /*item*/, SPDesktop * /*dt*/) {};
virtual void param_setup_nodepath(Inkscape::NodePath::Path */*np*/) {};
@@ -112,8 +112,7 @@ public:
virtual Gtk::Widget * param_newWidget();
- inline operator gdouble()
- { return value; };
+ inline operator gdouble() const { return value; };
protected:
gdouble value;
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index 1b3d7417d..eca0d7a22 100644
--- a/src/live_effects/parameter/path.cpp
+++ b/src/live_effects/parameter/path.cpp
@@ -77,7 +77,7 @@ PathParam::~PathParam()
}
std::vector<Geom::Path> const &
-PathParam::get_pathvector()
+PathParam::get_pathvector() const
{
return _pathvector;
}
@@ -231,7 +231,7 @@ PathParam::param_setup_nodepath(Inkscape::NodePath::Path *)
}
void
-PathParam::addCanvasIndicators(SPLPEItem */*lpeitem*/, std::vector<Geom::PathVector> &hp_vec)
+PathParam::addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector<Geom::PathVector> &hp_vec)
{
hp_vec.push_back(_pathvector);
}
diff --git a/src/live_effects/parameter/path.h b/src/live_effects/parameter/path.h
index a4f46f11f..112a1ea13 100644
--- a/src/live_effects/parameter/path.h
+++ b/src/live_effects/parameter/path.h
@@ -31,7 +31,7 @@ public:
const gchar * default_value = "M0,0 L1,1");
virtual ~PathParam();
- std::vector<Geom::Path> const & get_pathvector();
+ std::vector<Geom::Path> const & get_pathvector() const;
Geom::Piecewise<Geom::D2<Geom::SBasis> > const & get_pwd2();
virtual Gtk::Widget * param_newWidget();
@@ -46,7 +46,7 @@ public:
virtual void param_editOncanvas(SPItem * item, SPDesktop * dt);
virtual void param_setup_nodepath(Inkscape::NodePath::Path *np);
- virtual void addCanvasIndicators(SPLPEItem *lpeitem, std::vector<Geom::PathVector> &hp_vec);
+ virtual void addCanvasIndicators(SPLPEItem const* lpeitem, std::vector<Geom::PathVector> &hp_vec);
virtual void param_transform_multiply(Geom::Affine const& /*postmul*/, bool /*set*/);
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp
index 2be87e048..53866f278 100644
--- a/src/live_effects/parameter/point.cpp
+++ b/src/live_effects/parameter/point.cpp
@@ -133,7 +133,7 @@ public:
virtual ~PointParamKnotHolderEntity() {}
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
virtual void knot_click(guint state);
private:
@@ -149,7 +149,7 @@ PointParamKnotHolderEntity::knot_set(Geom::Point const &p, Geom::Point const &/*
}
Geom::Point
-PointParamKnotHolderEntity::knot_get()
+PointParamKnotHolderEntity::knot_get() const
{
return *pparam;
}
diff --git a/src/live_effects/parameter/point.h b/src/live_effects/parameter/point.h
index f2397753e..319835bb3 100644
--- a/src/live_effects/parameter/point.h
+++ b/src/live_effects/parameter/point.h
@@ -47,7 +47,7 @@ public:
void set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color);
- virtual bool providesKnotHolderEntities() { return true; }
+ virtual bool providesKnotHolderEntities() const { return true; }
virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item);
private:
diff --git a/src/live_effects/parameter/powerstrokepointarray.cpp b/src/live_effects/parameter/powerstrokepointarray.cpp
index 93161ec0d..fecdfeda8 100644
--- a/src/live_effects/parameter/powerstrokepointarray.cpp
+++ b/src/live_effects/parameter/powerstrokepointarray.cpp
@@ -124,11 +124,11 @@ public:
virtual ~PowerStrokePointArrayParamKnotHolderEntity() {}
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
virtual void knot_click(guint state);
/** Checks whether the index falls within the size of the parameter's vector */
- bool valid_index(unsigned int index) {
+ bool valid_index(unsigned int index) const {
return (_pparam->_vector.size() > index);
};
@@ -164,7 +164,7 @@ PowerStrokePointArrayParamKnotHolderEntity::knot_set(Geom::Point const &p, Geom:
}
Geom::Point
-PowerStrokePointArrayParamKnotHolderEntity::knot_get()
+PowerStrokePointArrayParamKnotHolderEntity::knot_get() const
{
using namespace Geom;
diff --git a/src/live_effects/parameter/powerstrokepointarray.h b/src/live_effects/parameter/powerstrokepointarray.h
index 0e08d78fe..e1fa440f2 100644
--- a/src/live_effects/parameter/powerstrokepointarray.h
+++ b/src/live_effects/parameter/powerstrokepointarray.h
@@ -37,12 +37,12 @@ public:
void set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color);
- virtual bool providesKnotHolderEntities() { return true; }
+ virtual bool providesKnotHolderEntities() const { return true; }
virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item);
void set_pwd2(Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in, Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_normal_in);
- Geom::Piecewise<Geom::D2<Geom::SBasis> > const & get_pwd2() { return last_pwd2; }
- Geom::Piecewise<Geom::D2<Geom::SBasis> > const & get_pwd2_normal() { return last_pwd2_normal; }
+ Geom::Piecewise<Geom::D2<Geom::SBasis> > const & get_pwd2() const { return last_pwd2; }
+ Geom::Piecewise<Geom::D2<Geom::SBasis> > const & get_pwd2_normal() const { return last_pwd2_normal; }
void recalculate_controlpoints_for_new_pwd2(Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
diff --git a/src/live_effects/parameter/random.h b/src/live_effects/parameter/random.h
index b72f6f976..ca4440336 100644
--- a/src/live_effects/parameter/random.h
+++ b/src/live_effects/parameter/random.h
@@ -42,8 +42,7 @@ public:
void resetRandomizer();
operator gdouble();
- inline gdouble get_value()
- { return value; } ;
+ inline gdouble get_value() { return value; } ;
protected:
long startseed;
diff --git a/src/live_effects/parameter/text.h b/src/live_effects/parameter/text.h
index 85833885e..62de70eec 100644
--- a/src/live_effects/parameter/text.h
+++ b/src/live_effects/parameter/text.h
@@ -46,7 +46,7 @@ public:
const double t, const double length, bool use_curvature = false);
void setAnchor(double x_value, double y_value);
- const Glib::ustring get_value() { return defvalue; };
+ const Glib::ustring get_value() const { return defvalue; };
private:
TextParam(const TextParam&);
diff --git a/src/live_effects/parameter/unit.cpp b/src/live_effects/parameter/unit.cpp
index 36b6efacc..7a2ce6f65 100644
--- a/src/live_effects/parameter/unit.cpp
+++ b/src/live_effects/parameter/unit.cpp
@@ -59,7 +59,7 @@ UnitParam::param_set_value(SPUnit const *val)
}
const gchar *
-UnitParam::get_abbreviation()
+UnitParam::get_abbreviation() const
{
return sp_unit_get_abbreviation(unit);
}
diff --git a/src/live_effects/parameter/unit.h b/src/live_effects/parameter/unit.h
index 3d417fcd6..ea7a0112a 100644
--- a/src/live_effects/parameter/unit.h
+++ b/src/live_effects/parameter/unit.h
@@ -30,11 +30,11 @@ public:
virtual gchar * param_getSVGValue() const;
virtual void param_set_default();
void param_set_value(SPUnit const *val);
- const gchar *get_abbreviation();
+ const gchar *get_abbreviation() const;
virtual Gtk::Widget * param_newWidget();
- operator SPUnit const *() { return unit; }
+ operator SPUnit const *() const { return unit; }
private:
SPUnit const *unit;
diff --git a/src/live_effects/parameter/vector.cpp b/src/live_effects/parameter/vector.cpp
index a20c46042..edd6b863f 100644
--- a/src/live_effects/parameter/vector.cpp
+++ b/src/live_effects/parameter/vector.cpp
@@ -154,7 +154,7 @@ public:
param->setOrigin(s);
sp_lpe_item_update_patheffect(SP_LPE_ITEM(item), false, false);
};
- virtual Geom::Point knot_get(){
+ virtual Geom::Point knot_get() const {
return param->origin;
};
virtual void knot_click(guint /*state*/){
@@ -176,7 +176,7 @@ public:
param->setVector(s);
sp_lpe_item_update_patheffect(SP_LPE_ITEM(item), false, false);
};
- virtual Geom::Point knot_get(){
+ virtual Geom::Point knot_get() const {
return param->origin + param->vector;
};
virtual void knot_click(guint /*state*/){
diff --git a/src/live_effects/parameter/vector.h b/src/live_effects/parameter/vector.h
index f82affe16..35ca04437 100644
--- a/src/live_effects/parameter/vector.h
+++ b/src/live_effects/parameter/vector.h
@@ -52,7 +52,7 @@ public:
void set_origin_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color);
void set_oncanvas_color(guint32 color);
- virtual bool providesKnotHolderEntities() { return true; }
+ virtual bool providesKnotHolderEntities() const { return true; }
virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item);
private: