Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::LivePathEffect::LPEMirrorSymmetry Class Reference

#include <lpe-mirror_symmetry.h>

Inheritance diagram for Inkscape::LivePathEffect::LPEMirrorSymmetry:
Inkscape::LivePathEffect::Effect Inkscape::LivePathEffect::GroupBBoxEffect

Public Member Functions

 LPEMirrorSymmetry (LivePathEffectObject *lpeobject)
 
 ~LPEMirrorSymmetry () override
 
void doOnApply (SPLPEItem const *lpeitem) override
 Is performed a single time when the effect is freshly applied to a path.
 
void doBeforeEffect (SPLPEItem const *lpeitem) override
 Is performed each time before the effect is updated.
 
void doAfterEffect (SPLPEItem const *lpeitem, Geom::PathVector *curve) override
 Is performed at the end of the LPE only one time per "lpeitem" in paths/shapes is called in middle of the effect so we add the "curve" param to allow updates in the LPE results at this stage for groups dont need to send "curve" parameter because is applied when the LPE process finish, we can update LPE results without "curve" parameter.
 
bool doOnOpen (SPLPEItem const *) override
 Is performed on load document or revert If the item is fixed legacy return true.
 
Geom::PathVector doEffect_path (Geom::PathVector const &path_in) override
 
void doOnRemove (SPLPEItem const *) override
 
void doOnVisibilityToggled (SPLPEItem const *) override
 
Gtk::Widget * newWidget () override
 This creates a managed widget.
 
void cloneStyle (SPObject *orig, SPObject *dest)
 
void toMirror (Geom::Affine transform)
 
void cloneD (SPObject *orig, SPObject *dest)
 
Inkscape::XML::NodecreatePathBase (SPObject *elemref)
 
void centerVert ()
 
void centerHoriz ()
 
- Public Member Functions inherited from Inkscape::LivePathEffect::Effect
virtual ~Effect ()
 
 Effect (const Effect &)=delete
 
Effectoperator= (const Effect &)=delete
 
EffectType effectType () const
 
void doAfterEffect_impl (SPLPEItem const *lpeitem, Geom::PathVector *curve)
 
void doOnApply_impl (SPLPEItem const *lpeitem)
 
void doBeforeEffect_impl (SPLPEItem const *lpeitem)
 
void doOnOpen_impl ()
 Is performed on document open allow things like fix legacy LPE in a undo insensitive way.
 
void doOnRemove_impl (SPLPEItem const *lpeitem)
 
void transform_multiply_impl (Geom::Affine const &postmul, SPLPEItem *)
 
void doOnBeforeCommit ()
 
void read_from_SVG ()
 
void setCurrentZoom (double cZ)
 
void setSelectedNodePoints (std::vector< Geom::Point > sNP)
 
bool isNodePointSelected (Geom::Point const &nodePoint) const
 
bool isOnClipboard ()
 The lpe is on clipboard.
 
std::vector< SPLPEItem * > getCurrrentLPEItems () const
 
void update_satellites ()
 
virtual void doOnException (SPLPEItem const *lpeitem)
 
virtual void adjustForNewPath ()
 
void writeParamsToSVG ()
 
std::vector< SPObject * > effect_get_satellites (bool force=true)
 
virtual void acceptParamPath (SPPath const *param_path)
 If the effect expects a path parameter (specified by a number of mouse clicks) before it is applied, this is the method that processes the resulting path.
 
int acceptsNumClicks () const
 
SPShapegetCurrentShape () const
 
void setCurrentShape (SPShape *shape)
 
virtual void processObjects (LPEAction lpe_action)
 
void makeUndoDone (Glib::ustring message)
 
bool isReady () const
 
void setReady (bool ready=true)
 
virtual void doEffect (Geom::PathVector &curve)
 
virtual void resetDefaults (SPItem const *item)
 Sets all parameters to their default values and writes them to SVG.
 
bool providesKnotholder () const
 
virtual LPEPathFlashType pathFlashType () const
 
void addHandles (KnotHolder *knotholder, SPItem *item)
 Add all registered LPE knotholder handles to the knotholder.
 
std::vector< Geom::PathVectorgetCanvasIndicators (SPLPEItem const *lpeitem)
 Return a vector of PathVectors which contain all canvas indicators for this effect.
 
void update_helperpath ()
 Call to a method on nodetool to update the helper path from the effect.
 
bool providesOwnFlashPaths () const
 
bool showOrigPath () const
 
Glib::ustring getName () const
 
Inkscape::XML::NodegetRepr ()
 
SPDocumentgetSPDoc ()
 
LivePathEffectObjectgetLPEObj ()
 
LivePathEffectObject const * getLPEObj () const
 
ParametergetParameter (const char *key)
 
void readallParameters (Inkscape::XML::Node const *repr)
 
void setParameter (const gchar *key, const gchar *new_value)
 
bool isVisible () const
 
void editNextParamOncanvas (SPItem *item, SPDesktop *desktop)
 
void setLPEAction (LPEAction lpe_action)
 
void setDefaultParameters ()
 Set this LPE defaults.
 
void resetDefaultParameters ()
 Reset this LPE defaults.
 
bool hasDefaultParameters ()
 Get LPE has defaults.
 
virtual bool getHolderRemove ()
 

Public Attributes

BoolParam split_items
 
- Public Attributes inherited from Inkscape::LivePathEffect::Effect
bool has_exception
 
bool apply_to_clippath_and_mask
 
bool keep_paths
 
bool is_load
 
bool is_applied
 
bool on_remove_all
 
bool refresh_widgets
 
bool finishiddle = false
 
bool satellitestoclipboard = false
 
bool helperLineSatellites = false
 
gint spinbutton_width_chars = 7
 
BoolParam is_visible
 
HiddenParam lpeversion
 
Geom::PathVector pathvector_before_effect
 
Geom::PathVector pathvector_after_effect
 
SPLPEItemsp_lpe_item = nullptr
 
SPShapecurrent_shape
 
std::vector< Parameter * > param_vector
 

Protected Member Functions

void addCanvasIndicators (SPLPEItem const *lpeitem, std::vector< Geom::PathVector > &hp_vec) override
 Add possible canvas indicators (i.e., helperpaths other than the original path) to hp_vec This function should be overwritten by derived effects if they want to provide their own helperpaths.
 
- Protected Member Functions inherited from Inkscape::LivePathEffect::Effect
 Effect (LivePathEffectObject *lpeobject)
 
virtual Geom::Piecewise< Geom::D2< Geom::SBasis > > doEffect_pwd2 (Geom::Piecewise< Geom::D2< Geom::SBasis > > const &pwd2_in)
 
void registerParameter (Parameter *param)
 
ParametergetNextOncanvasEditableParam ()
 
virtual void addKnotHolderEntities (KnotHolder *, SPItem *)
 

Private Member Functions

 LPEMirrorSymmetry (const LPEMirrorSymmetry &)=delete
 
LPEMirrorSymmetryoperator= (const LPEMirrorSymmetry &)=delete
 
- Private Member Functions inherited from Inkscape::LivePathEffect::GroupBBoxEffect
Geom::OptRect clip_mask_bbox (SPLPEItem *item, Geom::Affine transform)
 Updates the boundingbox_X and boundingbox_Y values from the geometric bounding box of lpeitem.
 
void original_bbox (SPLPEItem const *lpeitem, bool absolute=false, bool clip_mask=false, Geom::Affine base_transform=Geom::identity())
 

Private Attributes

SatelliteArrayParam lpesatellites
 
EnumParam< ModeTypemode
 
BoolParam discard_orig_path
 
BoolParam fuse_paths
 
BoolParam oposite_fuse
 
BoolParam split_open
 
BoolParam link_styles
 
PointParam start_point
 
PointParam end_point
 
PointParam center_point
 
Geom::Point previous_center
 
SPObjectcontainer
 
bool reset
 
bool prev_split = false
 
bool prev_discard_orig_path = false
 
bool center_vert
 
bool center_horiz
 
- Private Attributes inherited from Inkscape::LivePathEffect::GroupBBoxEffect
Geom::Interval boundingbox_X
 
Geom::Interval boundingbox_Y
 

Additional Inherited Members

- Static Public Member Functions inherited from Inkscape::LivePathEffect::Effect
static EffectNew (EffectType lpenr, LivePathEffectObject *lpeobj)
 
static void createAndApply (const char *name, SPDocument *doc, SPItem *item)
 
static void createAndApply (EffectType type, SPDocument *doc, SPItem *item)
 
static int acceptsNumClicks (EffectType type)
 
- Protected Attributes inherited from Inkscape::LivePathEffect::Effect
bool _adjust_path = false
 
bool _provides_knotholder_entities
 
bool _provides_path_adjustment = false
 
LPEAction _lpe_action = LPE_NONE
 
int oncanvasedit_it
 
bool show_orig_path
 
bool concatenate_before_pwd2
 
double current_zoom
 
std::vector< Geom::PointselectedNodesPoints
 
Inkscape::UI::Widget::Registry wr
 

Detailed Description

Definition at line 42 of file lpe-mirror_symmetry.h.

Constructor & Destructor Documentation

◆ LPEMirrorSymmetry() [1/2]

◆ ~LPEMirrorSymmetry()

Inkscape::LivePathEffect::LPEMirrorSymmetry::~LPEMirrorSymmetry ( )
overridedefault

◆ LPEMirrorSymmetry() [2/2]

Inkscape::LivePathEffect::LPEMirrorSymmetry::LPEMirrorSymmetry ( const LPEMirrorSymmetry )
privatedelete

Member Function Documentation

◆ addCanvasIndicators()

void Inkscape::LivePathEffect::LPEMirrorSymmetry::addCanvasIndicators ( SPLPEItem const *  lpeitem,
std::vector< Geom::PathVector > &  hp_vec 
)
overrideprotectedvirtual

Add possible canvas indicators (i.e., helperpaths other than the original path) to hp_vec This function should be overwritten by derived effects if they want to provide their own helperpaths.

Reimplemented from Inkscape::LivePathEffect::Effect.

Definition at line 680 of file lpe-mirror_symmetry.cpp.

References Geom::Path::appendNew(), end_point, Geom::PathVector::push_back(), Geom::Path::start(), and start_point.

◆ centerHoriz()

void Inkscape::LivePathEffect::LPEMirrorSymmetry::centerHoriz ( )

◆ centerVert()

void Inkscape::LivePathEffect::LPEMirrorSymmetry::centerVert ( )

◆ cloneD()

◆ cloneStyle()

void Inkscape::LivePathEffect::LPEMirrorSymmetry::cloneStyle ( SPObject orig,
SPObject dest 
)

Definition at line 324 of file lpe-mirror_symmetry.cpp.

References D, FONT, key, MARKER, orig, SPObject::setAttribute(), and UNSET.

Referenced by cloneD().

◆ createPathBase()

◆ doAfterEffect()

void Inkscape::LivePathEffect::LPEMirrorSymmetry::doAfterEffect ( SPLPEItem const *  lpeitem,
Geom::PathVector curve 
)
overridevirtual

Is performed at the end of the LPE only one time per "lpeitem" in paths/shapes is called in middle of the effect so we add the "curve" param to allow updates in the LPE results at this stage for groups dont need to send "curve" parameter because is applied when the LPE process finish, we can update LPE results without "curve" parameter.

Parameters
lpeitemthe element that has this LPE
curvethe curve to pass when in mode path or shape

Reimplemented from Inkscape::LivePathEffect::Effect.

Definition at line 120 of file lpe-mirror_symmetry.cpp.

References Inkscape::LivePathEffect::SatelliteArrayParam::clear(), container, Inkscape::LivePathEffect::ArrayParam< StorageType >::data(), discard_orig_path, end_point, Inkscape::LivePathEffect::Effect::getSPDoc(), Inkscape::LivePathEffect::Effect::is_load, lpesatellites, SPObject::parent, prev_discard_orig_path, prev_split, Geom::reflection(), Inkscape::LivePathEffect::Effect::sp_lpe_item, split_items, start_point, toMirror(), SPItem::transform, and Geom::Line::vector().

◆ doBeforeEffect()

◆ doEffect_path()

◆ doOnApply()

◆ doOnOpen()

◆ doOnRemove()

void Inkscape::LivePathEffect::LPEMirrorSymmetry::doOnRemove ( SPLPEItem const *  )
overridevirtual

◆ doOnVisibilityToggled()

void Inkscape::LivePathEffect::LPEMirrorSymmetry::doOnVisibilityToggled ( SPLPEItem const *  )
overridevirtual

◆ newWidget()

Gtk::Widget * Inkscape::LivePathEffect::LPEMirrorSymmetry::newWidget ( )
overridevirtual

◆ operator=()

LPEMirrorSymmetry & Inkscape::LivePathEffect::LPEMirrorSymmetry::operator= ( const LPEMirrorSymmetry )
privatedelete

◆ toMirror()

Member Data Documentation

◆ center_horiz

bool Inkscape::LivePathEffect::LPEMirrorSymmetry::center_horiz
private

Definition at line 82 of file lpe-mirror_symmetry.h.

Referenced by centerHoriz(), doBeforeEffect(), and LPEMirrorSymmetry().

◆ center_point

PointParam Inkscape::LivePathEffect::LPEMirrorSymmetry::center_point
private

Definition at line 75 of file lpe-mirror_symmetry.h.

Referenced by doBeforeEffect(), doEffect_path(), doOnApply(), and LPEMirrorSymmetry().

◆ center_vert

bool Inkscape::LivePathEffect::LPEMirrorSymmetry::center_vert
private

Definition at line 81 of file lpe-mirror_symmetry.h.

Referenced by centerVert(), doBeforeEffect(), and LPEMirrorSymmetry().

◆ container

SPObject* Inkscape::LivePathEffect::LPEMirrorSymmetry::container
private

Definition at line 77 of file lpe-mirror_symmetry.h.

Referenced by createPathBase(), doAfterEffect(), doOnOpen(), and toMirror().

◆ discard_orig_path

BoolParam Inkscape::LivePathEffect::LPEMirrorSymmetry::discard_orig_path
private

◆ end_point

PointParam Inkscape::LivePathEffect::LPEMirrorSymmetry::end_point
private

◆ fuse_paths

BoolParam Inkscape::LivePathEffect::LPEMirrorSymmetry::fuse_paths
private

Definition at line 69 of file lpe-mirror_symmetry.h.

Referenced by doEffect_path(), and LPEMirrorSymmetry().

◆ link_styles

BoolParam Inkscape::LivePathEffect::LPEMirrorSymmetry::link_styles
private

Definition at line 72 of file lpe-mirror_symmetry.h.

Referenced by doBeforeEffect(), LPEMirrorSymmetry(), and toMirror().

◆ lpesatellites

SatelliteArrayParam Inkscape::LivePathEffect::LPEMirrorSymmetry::lpesatellites
private

◆ mode

EnumParam<ModeType> Inkscape::LivePathEffect::LPEMirrorSymmetry::mode
private

Definition at line 67 of file lpe-mirror_symmetry.h.

Referenced by doBeforeEffect(), and LPEMirrorSymmetry().

◆ oposite_fuse

BoolParam Inkscape::LivePathEffect::LPEMirrorSymmetry::oposite_fuse
private

Definition at line 70 of file lpe-mirror_symmetry.h.

Referenced by doEffect_path(), and LPEMirrorSymmetry().

◆ prev_discard_orig_path

bool Inkscape::LivePathEffect::LPEMirrorSymmetry::prev_discard_orig_path = false
private

Definition at line 80 of file lpe-mirror_symmetry.h.

Referenced by doAfterEffect().

◆ prev_split

bool Inkscape::LivePathEffect::LPEMirrorSymmetry::prev_split = false
private

Definition at line 79 of file lpe-mirror_symmetry.h.

Referenced by doAfterEffect().

◆ previous_center

Geom::Point Inkscape::LivePathEffect::LPEMirrorSymmetry::previous_center
private

Definition at line 76 of file lpe-mirror_symmetry.h.

Referenced by doBeforeEffect(), doOnApply(), and LPEMirrorSymmetry().

◆ reset

bool Inkscape::LivePathEffect::LPEMirrorSymmetry::reset
private

Definition at line 78 of file lpe-mirror_symmetry.h.

Referenced by cloneD(), doBeforeEffect(), LPEMirrorSymmetry(), and toMirror().

◆ split_items

BoolParam Inkscape::LivePathEffect::LPEMirrorSymmetry::split_items

◆ split_open

BoolParam Inkscape::LivePathEffect::LPEMirrorSymmetry::split_open
private

Definition at line 71 of file lpe-mirror_symmetry.h.

Referenced by doEffect_path(), and LPEMirrorSymmetry().

◆ start_point

PointParam Inkscape::LivePathEffect::LPEMirrorSymmetry::start_point
private

The documentation for this class was generated from the following files: