9#include <glibmm/i18n.h>
19namespace LivePathEffect {
23 linked_path(_(
"Linked path:"), _(
"Path from which to take the original path data"),
"linkedpath", &wr, this),
24 second_path(_(
"Second path:"), _(
"Second path from which to take the original path data"),
"secondpath", &wr, this),
25 reverse_second(_(
"Reverse Second"), _(
"Reverses the second path order"),
"reversesecond", &wr, this),
26 join(_(
"Join subpaths"), _(
"Join subpaths"),
"join", &wr, this, true),
27 close(_(
"Close"), _(
"Close path"),
"close", &wr, this, true)
59 if (lpeitems.size() == 1) {
77 if (lpeitems.size() == 1) {
98 if (version <
"1.2") {
112 if (lpeitems.size() == 1) {
126 item2->transform *=
i2anc_affine(item2->parent, item2->document->getRoot());
127 item2->transform *= postmul.
inverse();
129 item2->doWriteTransform(item2->transform,
nullptr,
false);
130 item2->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
155 for (
auto & iter : linked_pathv)
160 for (
auto & iter : second_pathv)
165 if ( !result_linked_pathv.
empty() && !result_second_pathv.
empty() && !result_linked_pathv.
front().
closed() ) {
186 curve->set_pathvector(result_linked_pathv);
187 }
else if ( !result_linked_pathv.
empty() ) {
188 curve->set_pathvector(result_linked_pathv);
189 }
else if ( !result_second_pathv.
empty() ) {
190 curve->set_pathvector(result_second_pathv);
201 for (
auto & iter : linked_pathv)
205 if ( !result_pathv.
empty() ) {
209 curve->set_pathvector(result_pathv);
220 for (
auto & iter : second_pathv)
224 if ( !result_pathv.
empty() ) {
229 curve->set_pathvector(result_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 push_back(Path const &path)
Append a path at the end.
bool empty() const
Check whether the vector contains any paths.
bool closed() const
Check whether the path is closed.
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.
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.
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
bool doOnOpen(SPLPEItem const *lpeitem) override
Is performed on load document or revert If the item is fixed legacy return true.
OriginalPathParam linked_path
OriginalPathParam second_path
void doEffect(SPCurve *curve) override
void doOnApply(SPLPEItem const *lpeitem) override
Is performed a single time when the effect is freshly applied to a path.
LPEFillBetweenStrokes(LivePathEffectObject *lpeobject)
void transform_multiply_nested(Geom::Affine const &postmul)
~LPEFillBetweenStrokes() override
void doBeforeEffect(SPLPEItem const *lpeitem) override
Is performed each time before the effect is updated.
SPItem * getObject() const
void setUpdating(bool updating)
void connect_selection_changed()
Geom::PathVector const & get_pathvector() const
void start_listening(SPObject *to)
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.
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.
bool are_near(Affine const &a1, Affine const &a2, Coord eps=EPSILON)
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.