20#include <glibmm/i18n.h>
23namespace LivePathEffect {
28 {
FLM_D, N_(
"With all LPEs"),
"d" }
34 , linked_paths(_(
"Linked path:"), _(
"Paths from which to take the original path data"),
"linkedpaths", &wr, this)
36 ,
join(_(
"Join subpaths"), _(
"Join subpaths"),
"join", &wr, this, true)
37 , close(_(
"Close"), _(
"Close path"),
"close", &wr, this, true)
38 , autoreverse(_(
"Autoreverse"), _(
"Autoreverse"),
"autoreverse", &wr, this, true)
68 if (lpeitems.size() == 1) {
80 if (lpeitems.size() == 1) {
92 if (version <
"1.2") {
107 if (lpeitems.size() == 1) {
112 if (iter->ref.isAttached() && ((
item = cast<SPItem>(iter->ref.getObject()) )) &&
113 !iter->_pathvector.empty() && iter->visibled) {
149 if (iter->ref.isAttached() && ((
item = cast<SPItem>(iter->ref.getObject()) )) &&
150 !iter->_pathvector.empty() && iter->visibled) {
151 for (
auto linked_path : iter->_pathvector) {
152 if (iter->reversed) {
153 linked_path = linked_path.reversed();
176 std::vector<unsigned int> done;
179 if (iter->ref.isAttached() && ((
item = cast<SPItem>(iter->ref.getObject()) )) &&
180 !iter->_pathvector.empty() && iter->visibled) {
189 initial_path = initial_path.
reversed();
193 initial_path.
close();
200 unsigned int counter2 = 0;
201 unsigned int added = 0;
205 if (iter2->ref.isAttached() && (( item2 = cast<SPItem>(iter2->ref.getObject()) )) &&
206 !iter2->_pathvector.empty() && iter2->visibled) {
207 if (
item == item2 || std::find(done.begin(), done.end(), counter2) != done.end()) {
233 if (nearest !=
nullptr) {
234 done.push_back(added);
238 linked_path = iter->_pathvector.
front().reversed();
241 linked_path = iter->_pathvector.
front();
257 if (!
getSPDoc()->getRoot()->inkscape.getVersion().isInsideRangeInclusive({0, 1}, {1, 1}) &&
260 linked_path = linked_path.
reversed();
283 if (res_pathv.
empty()) {
284 res_pathv =
curve->get_pathvector();
286 curve->set_pathvector(res_pathv);
3x3 matrix representing an affine transformation.
bool isIdentity(Coord eps=EPSILON) const
Check whether this matrix is an identity matrix.
Affine inverse() const
Compute the inverse matrix.
void setInitial(Point const &v) override
Change the starting point of the curve.
void push_back(Path const &path)
Append a path at the end.
Point finalPoint() const
Get the last point in the last path of the vector.
bool empty() const
Check whether the vector contains any paths.
Sequence of contiguous curves, aka spline.
Point finalPoint() const
Get the last point in the path.
void close(bool closed=true)
Set whether the path is closed.
void append(Curve *curve)
Add a new curve to the end of the path.
Point initialPoint() const
Get the first point in the path.
Curve const & front() const
Access the first curve in the path.
Path reversed() const
Obtain a reversed version of the current path.
void snapEnds(Coord precision=EPSILON)
Reduce the closing segment to a point if it's shorter than precision.
void setInitial(Point const &p)
void appendNew(Args &&... args)
Append a new curve to the path.
Two-dimensional point that doubles as a vector.
void registerParameter(Parameter *param)
bool isOnClipboard()
The lpe is on clipboard.
std::vector< SPLPEItem * > getCurrrentLPEItems() const
void param_setValue(Glib::ustring newvalue, bool write=false)
Glib::ustring param_getSVGValue() const override
~LPEFillBetweenMany() override
void doBeforeEffect(SPLPEItem const *lpeitem) override
Is performed each time before the effect is updated.
void doOnApply(SPLPEItem const *lpeitem) override
Is performed a single time when the effect is freshly applied to a path.
Filllpemethod previous_method
PathArrayParam linked_paths
EnumParam< Filllpemethod > method
bool doOnOpen(SPLPEItem const *lpeitem) override
Is performed on load document or revert If the item is fixed legacy return true.
void transform_multiply_nested(Geom::Affine const &postmul)
void doEffect(SPCurve *curve) override
LPEFillBetweenMany(LivePathEffectObject *lpeobject)
void setUpdating(bool updating)
void connect_selection_changed()
Geom::PathVector _pathvector
void allowOnlyBsplineSpiro(bool allow_only_bspline_spiro)
std::vector< PathAndDirectionAndVisible * > _vector
void setFromOriginalD(bool from_original_d)
The set of selected SPObjects for a given document and layer model.
bool includes(XML::Node *repr, bool anyAncestor=false)
Returns true if the given item is selected.
SPObject * getObject() const
Returns a pointer to the current referrent of the attached URI, or NULL.
bool isAttached() const
Returns true if there is currently an attached URI.
Simplified management of enumerations of svg items with UI labels.
Wrapper around a Geom::PathVector object.
To do: update description of desktop.
Inkscape::Selection * getSelection() const
SPRoot * getRoot()
Returns our SPRoot.
Base class for visual SVG elements.
Geom::Affine getRelativeTransform(SPObject const *obj) const
void doWriteTransform(Geom::Affine const &transform, Geom::Affine const *adv=nullptr, bool compensate=true)
Set a new transform on an object.
bool pathEffectsEnabled() const
void requestDisplayUpdate(unsigned int flags)
Queues an deferred update of this object's display.
static char const *const current
constexpr Coord infinity()
Get a value representing infinity.
double Coord
Floating point type used to store coordinates.
Angle distance(Angle const &a, Angle const &b)
bool are_near(Affine const &a1, Affine const &a2, Coord eps=EPSILON)
static const Util::EnumData< Filllpemethod > FilllpemethodData[]
static const Util::EnumDataConverter< Filllpemethod > FLMConverter(FilllpemethodData, FLM_END)
Helper class to stream background task notifications as a series of messages.
static Glib::ustring join(std::vector< Glib::ustring > const &accels, char const separator)
Geom::Affine i2anc_affine(SPObject const *object, SPObject const *ancestor)
SPRoot: SVG <svg> implementation.
Simplified management of enumerations of svg items with UI labels.