summaryrefslogtreecommitdiffstats
path: root/src/live_effects
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-02-18 18:16:22 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-02-18 21:18:28 +0000
commit212bed15e375396b2ceb7a19841af6c6c67d8a58 (patch)
treedff6b9c12649efcb64821324ab7765f9d66764a7 /src/live_effects
parentFix compiling issues (diff)
downloadinkscape-212bed15e375396b2ceb7a19841af6c6c67d8a58.tar.gz
inkscape-212bed15e375396b2ceb7a19841af6c6c67d8a58.zip
Update issues on CI
Diffstat (limited to 'src/live_effects')
-rw-r--r--src/live_effects/effect-enum.h5
-rw-r--r--src/live_effects/effect.cpp16
-rw-r--r--src/live_effects/lpe-dashed-stroke.cpp32
-rw-r--r--src/live_effects/lpe-dashed-stroke.h2
4 files changed, 27 insertions, 28 deletions
diff --git a/src/live_effects/effect-enum.h b/src/live_effects/effect-enum.h
index 3ac25bd18..887f02343 100644
--- a/src/live_effects/effect-enum.h
+++ b/src/live_effects/effect-enum.h
@@ -72,7 +72,8 @@ enum EffectType {
RECURSIVE_SKELETON,
TANGENT_TO_CURVE,
TEXT_LABEL,
- INVALID_LPE // This must be last (I made it such that it is not needed anymore I think..., Don't trust on it being last. - johan)
+ INVALID_LPE // This must be last (I made it such that it is not needed anymore I think..., Don't trust on it being
+ // last. - johan)
};
template <typename E>
@@ -267,7 +268,7 @@ class EnumEffectDataConverter {
const EnumEffectData<E> *_data;
};
-extern const EnumEffectData<EffectType> LPETypeData[]; /// defined in effect.cpp
+extern const EnumEffectData<EffectType> LPETypeData[]; /// defined in effect.cpp
extern const EnumEffectDataConverter<EffectType> LPETypeConverter; /// defined in effect.cpp
} //namespace LivePathEffect
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index ca166c0c2..63895ed61 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -13,10 +13,10 @@
//#define LPE_ENABLE_TEST_EFFECTS //uncomment for toy effects
// include effects:
-#include "live_effects/lpe-patternalongpath.h"
#include "live_effects/lpe-angle_bisector.h"
#include "live_effects/lpe-attach-path.h"
#include "live_effects/lpe-bendpath.h"
+#include "live_effects/lpe-bool.h"
#include "live_effects/lpe-bounding-box.h"
#include "live_effects/lpe-bspline.h"
#include "live_effects/lpe-circle_3pts.h"
@@ -28,6 +28,7 @@
#include "live_effects/lpe-dashed-stroke.h"
#include "live_effects/lpe-dynastroke.h"
#include "live_effects/lpe-ellipse_5pts.h"
+#include "live_effects/lpe-embrodery-stitch.h"
#include "live_effects/lpe-envelope.h"
#include "live_effects/lpe-extrude.h"
#include "live_effects/lpe-fill-between-many.h"
@@ -38,36 +39,35 @@
#include "live_effects/lpe-interpolate_points.h"
#include "live_effects/lpe-jointype.h"
#include "live_effects/lpe-knot.h"
-#include "live_effects/lpe-lattice2.h"
#include "live_effects/lpe-lattice.h"
+#include "live_effects/lpe-lattice2.h"
#include "live_effects/lpe-line_segment.h"
#include "live_effects/lpe-measure-segments.h"
#include "live_effects/lpe-mirror_symmetry.h"
#include "live_effects/lpe-offset.h"
#include "live_effects/lpe-parallel.h"
#include "live_effects/lpe-path_length.h"
+#include "live_effects/lpe-patternalongpath.h"
#include "live_effects/lpe-perp_bisector.h"
#include "live_effects/lpe-perspective-envelope.h"
#include "live_effects/lpe-powerclip.h"
#include "live_effects/lpe-powermask.h"
#include "live_effects/lpe-powerstroke.h"
+#include "live_effects/lpe-pts2ellipse.h"
#include "live_effects/lpe-recursiveskeleton.h"
-#include "live_effects/lpe-roughen.h"
#include "live_effects/lpe-rough-hatches.h"
+#include "live_effects/lpe-roughen.h"
#include "live_effects/lpe-ruler.h"
#include "live_effects/lpe-show_handles.h"
#include "live_effects/lpe-simplify.h"
#include "live_effects/lpe-sketch.h"
#include "live_effects/lpe-spiro.h"
#include "live_effects/lpe-tangent_to_curve.h"
-#include "live_effects/lpe-transform_2pts.h"
#include "live_effects/lpe-taperstroke.h"
#include "live_effects/lpe-test-doEffect-stack.h"
#include "live_effects/lpe-text_label.h"
+#include "live_effects/lpe-transform_2pts.h"
#include "live_effects/lpe-vonkoch.h"
-#include "live_effects/lpe-embrodery-stitch.h"
-#include "live_effects/lpe-bool.h"
-#include "live_effects/lpe-pts2ellipse.h"
#include "live_effects/lpeobject.h"
@@ -1060,7 +1060,7 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj)
neweffect = static_cast<Effect*> ( new LPEPts2Ellipse(lpeobj) );
break;
case DASHED_STROKE:
- neweffect = static_cast<Effect*> ( new LPEDashedStroke(lpeobj) );
+ neweffect = static_cast<Effect *>(new LPEDashedStroke(lpeobj));
break;
default:
g_warning("LivePathEffect::Effect::New called with invalid patheffect type (%d)", lpenr);
diff --git a/src/live_effects/lpe-dashed-stroke.cpp b/src/live_effects/lpe-dashed-stroke.cpp
index fcc38f9e4..fe6390430 100644
--- a/src/live_effects/lpe-dashed-stroke.cpp
+++ b/src/live_effects/lpe-dashed-stroke.cpp
@@ -3,8 +3,8 @@
* Released under GNU GPL v2+, read the file 'COPYING' for more information.
*/
#include "live_effects/lpe-dashed-stroke.h"
-#include "2geom/pathvector.h"
#include "2geom/path.h"
+#include "2geom/pathvector.h"
#include "helper/geom.h"
// TODO due to internal breakage in glibmm headers, this must be last:
@@ -14,13 +14,15 @@ namespace Inkscape {
namespace LivePathEffect {
LPEDashedStroke::LPEDashedStroke(LivePathEffectObject *lpeobject)
- : Effect(lpeobject),
- numberdashes(_("Number of dashes"), _("Number of dashes"), "numberdashes", &wr, this, 3),
- holefactor(_("Hole factor"), _("Hole factor"), "holefactor", &wr, this, 0.0),
- splitsegments(_("Use segments"), _("Use segments"), "splitsegments", &wr, this, true),
- halfextreme(_("Half start/end"), _("Start and end of each segment has half size"), "halfextreme", &wr, this, true),
- unifysegment(_("Unify dashes"), _("Approximately unify the dashes length using the minimal length segment"), "unifysegment", &wr, this, true),
- message(_("Info Box"), _("Important messages"), "message", &wr, this, _("Add <b>\"Fill Between Many LPE\"</b> to add fill."))
+ : Effect(lpeobject)
+ , numberdashes(_("Number of dashes"), _("Number of dashes"), "numberdashes", &wr, this, 3)
+ , holefactor(_("Hole factor"), _("Hole factor"), "holefactor", &wr, this, 0.0)
+ , splitsegments(_("Use segments"), _("Use segments"), "splitsegments", &wr, this, true)
+ , halfextreme(_("Half start/end"), _("Start and end of each segment has half size"), "halfextreme", &wr, this, true)
+ , unifysegment(_("Unify dashes"), _("Approximately unify the dashes length using the minimal length segment"),
+ "unifysegment", &wr, this, true)
+ , message(_("Info Box"), _("Important messages"), "message", &wr, this,
+ _("Add <b>\"Fill Between Many LPE\"</b> to add fill."))
{
registerParameter(&numberdashes);
registerParameter(&holefactor);
@@ -39,14 +41,11 @@ LPEDashedStroke::LPEDashedStroke(LivePathEffectObject *lpeobject)
LPEDashedStroke::~LPEDashedStroke() = default;
-void
-LPEDashedStroke::doBeforeEffect (SPLPEItem const* lpeitem){
-}
+void LPEDashedStroke::doBeforeEffect(SPLPEItem const *lpeitem) {}
///Calculate the time in curve_in with a real time of A
//TODO: find a better place to it
-double
-LPEDashedStroke::timeAtLength(double const A, Geom::Path const &segment)
+double LPEDashedStroke::timeAtLength(double const A, Geom::Path const &segment)
{
if ( A == 0 || segment[0].isDegenerate()) {
return 0;
@@ -58,8 +57,7 @@ LPEDashedStroke::timeAtLength(double const A, Geom::Path const &segment)
///Calculate the time in curve_in with a real time of A
//TODO: find a better place to it
-double
-LPEDashedStroke::timeAtLength(double const A, Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2)
+double LPEDashedStroke::timeAtLength(double const A, Geom::Piecewise<Geom::D2<Geom::SBasis>> pwd2)
{
if ( A == 0 || pwd2.size() == 0) {
return 0;
@@ -73,8 +71,8 @@ LPEDashedStroke::timeAtLength(double const A, Geom::Piecewise<Geom::D2<Geom::SBa
return t;
}
-Geom::PathVector
-LPEDashedStroke::doEffect_path(Geom::PathVector const & path_in){
+Geom::PathVector LPEDashedStroke::doEffect_path(Geom::PathVector const &path_in)
+{
Geom::PathVector const pv = pathv_to_linear_and_cubic_beziers(path_in);
Geom::PathVector result;
for (const auto & path_it : pv) {
diff --git a/src/live_effects/lpe-dashed-stroke.h b/src/live_effects/lpe-dashed-stroke.h
index 3ee18d2c2..d001eaf21 100644
--- a/src/live_effects/lpe-dashed-stroke.h
+++ b/src/live_effects/lpe-dashed-stroke.h
@@ -15,7 +15,7 @@ namespace Inkscape {
namespace LivePathEffect {
class LPEDashedStroke : public Effect {
-public:
+ public:
LPEDashedStroke(LivePathEffectObject *lpeobject);
~LPEDashedStroke() override;
void doBeforeEffect (SPLPEItem const* lpeitem) override;