diff options
| author | Jabiertxof <jabier.arraiza@marker.es> | 2019-02-18 18:16:22 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-02-18 21:18:28 +0000 |
| commit | 212bed15e375396b2ceb7a19841af6c6c67d8a58 (patch) | |
| tree | dff6b9c12649efcb64821324ab7765f9d66764a7 /src/live_effects/lpe-dashed-stroke.cpp | |
| parent | Fix compiling issues (diff) | |
| download | inkscape-212bed15e375396b2ceb7a19841af6c6c67d8a58.tar.gz inkscape-212bed15e375396b2ceb7a19841af6c6c67d8a58.zip | |
Update issues on CI
Diffstat (limited to 'src/live_effects/lpe-dashed-stroke.cpp')
| -rw-r--r-- | src/live_effects/lpe-dashed-stroke.cpp | 32 |
1 files changed, 15 insertions, 17 deletions
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) { |
