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

#include <lpe-copy_rotate.h>

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

Public Member Functions

 LPECopyRotate (LivePathEffectObject *lpeobject)
 
 ~LPECopyRotate () override
 
void doOnApply (SPLPEItem const *lpeitem) override
 Is performed a single time when the effect is freshly applied to a path.
 
Geom::PathVector doEffect_path (Geom::PathVector const &path_in) override
 
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.
 
void split (Geom::PathVector &path_in, Geom::Path const &divider)
 
void resetDefaults (SPItem const *item) override
 Sets all parameters to their default values and writes them to SVG.
 
void doOnRemove (SPLPEItem const *) override
 
bool doOnOpen (SPLPEItem const *) override
 Is performed on load document or revert If the item is fixed legacy return true.
 
void doOnVisibilityToggled (SPLPEItem const *) override
 
Gtk::Widget * newWidget () override
 This creates a managed widget.
 
void cloneStyle (SPObject *orig, SPObject *dest)
 
Geom::PathVector doEffect_path_post (Geom::PathVector const &path_in, FillRule fillrule)
 
void toItem (Geom::Affine transform, size_t i, bool reset, bool &write)
 
void cloneD (SPObject *orig, SPObject *dest)
 
Inkscape::XML::NodecreatePathBase (SPObject *elemref)
 
- 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)
 
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

 LPECopyRotate (const LPECopyRotate &)=delete
 
LPECopyRotateoperator= (const LPECopyRotate &)=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< RotateMethodmethod
 
PointParam origin
 
PointParam starting_point
 
ScalarParam starting_angle
 
ScalarParam rotation_angle
 
ScalarParam num_copies
 
ScalarParam gap
 
BoolParam copies_to_360
 
BoolParam mirror_copies
 
BoolParam link_styles
 
Geom::Point A
 
Geom::Point B
 
Geom::Point dir
 
Geom::Point half_dir
 
Geom::Point start_pos
 
Geom::Point previous_origin
 
Geom::Point previous_start_point
 
double dist_angle_handle
 
double size_divider
 
Geom::Path divider
 
double previous_num_copies
 
bool reset
 
bool previous_split = false
 
SPObjectcontainer
 
- 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 38 of file lpe-copy_rotate.h.

Constructor & Destructor Documentation

◆ LPECopyRotate() [1/2]

◆ ~LPECopyRotate()

Inkscape::LivePathEffect::LPECopyRotate::~LPECopyRotate ( )
overridedefault

◆ LPECopyRotate() [2/2]

Inkscape::LivePathEffect::LPECopyRotate::LPECopyRotate ( const LPECopyRotate )
privatedelete

Member Function Documentation

◆ addCanvasIndicators()

void Inkscape::LivePathEffect::LPECopyRotate::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 703 of file lpe-copy_rotate.cpp.

References Geom::Path::appendNew(), dir, Geom::distance(), origin, Geom::PathVector::push_back(), rotation_angle, Geom::Path::start(), start_pos, starting_angle, and starting_point.

◆ cloneD()

◆ cloneStyle()

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

Definition at line 225 of file lpe-copy_rotate.cpp.

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

Referenced by cloneD().

◆ createPathBase()

◆ doAfterEffect()

void Inkscape::LivePathEffect::LPECopyRotate::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 145 of file lpe-copy_rotate.cpp.

References Inkscape::LivePathEffect::SatelliteArrayParam::clear(), container, Inkscape::LivePathEffect::ArrayParam< StorageType >::data(), Inkscape::LivePathEffect::Effect::getSPDoc(), half_dir, Geom::identity(), Geom::Rotate::inverse(), Inkscape::LivePathEffect::SatelliteArrayParam::is_connected(), Inkscape::LivePathEffect::Effect::is_load, link_styles, lpesatellites, method, mirror_copies, num_copies, origin, SPObject::parent, previous_num_copies, previous_split, reset, Inkscape::LivePathEffect::RM_NORMAL, rotation_angle, Inkscape::LivePathEffect::Effect::sp_lpe_item, sp_lpe_item_update_patheffect(), split_items, Inkscape::LivePathEffect::SatelliteArrayParam::start_listening(), starting_angle, toItem(), SPItem::transform, Inkscape::LivePathEffect::Parameter::update_satellites(), and Inkscape::LivePathEffect::Parameter::write_to_SVG().

◆ doBeforeEffect()

◆ doEffect_path()

◆ doEffect_path_post()

◆ doOnApply()

◆ doOnOpen()

◆ doOnRemove()

void Inkscape::LivePathEffect::LPECopyRotate::doOnRemove ( SPLPEItem const *  lpeitem)
overridevirtual

◆ doOnVisibilityToggled()

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

◆ newWidget()

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

This creates a managed widget.

Deletion should be done by the eventual parent, or otherwise the caller.

Reimplemented from Inkscape::LivePathEffect::Effect.

Definition at line 391 of file lpe-copy_rotate.cpp.

References Inkscape::UI::pack_start(), Inkscape::LivePathEffect::Parameter::param_getTooltip(), Inkscape::LivePathEffect::Parameter::param_newWidget(), and Inkscape::LivePathEffect::Effect::param_vector.

◆ operator=()

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

◆ resetDefaults()

void Inkscape::LivePathEffect::LPECopyRotate::resetDefaults ( SPItem const *  item)
overridevirtual

Sets all parameters to their default values and writes them to SVG.

Reimplemented from Inkscape::LivePathEffect::Effect.

Definition at line 717 of file lpe-copy_rotate.cpp.

References item, Inkscape::LivePathEffect::GroupBBoxEffect::original_bbox(), and Inkscape::LivePathEffect::Effect::resetDefaults().

◆ split()

◆ toItem()

Member Data Documentation

◆ A

Geom::Point Inkscape::LivePathEffect::LPECopyRotate::A
private

Definition at line 74 of file lpe-copy_rotate.h.

Referenced by doBeforeEffect(), and doOnApply().

◆ B

Geom::Point Inkscape::LivePathEffect::LPECopyRotate::B
private

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

Referenced by doBeforeEffect(), and doOnApply().

◆ container

SPObject* Inkscape::LivePathEffect::LPECopyRotate::container
private

Definition at line 87 of file lpe-copy_rotate.h.

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

◆ copies_to_360

BoolParam Inkscape::LivePathEffect::LPECopyRotate::copies_to_360
private

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

Referenced by doBeforeEffect(), and LPECopyRotate().

◆ dir

Geom::Point Inkscape::LivePathEffect::LPECopyRotate::dir
private

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

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

◆ dist_angle_handle

double Inkscape::LivePathEffect::LPECopyRotate::dist_angle_handle
private

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

Referenced by doBeforeEffect(), and doOnApply().

◆ divider

Geom::Path Inkscape::LivePathEffect::LPECopyRotate::divider
private

Definition at line 83 of file lpe-copy_rotate.h.

Referenced by doEffect_path(), and split().

◆ gap

ScalarParam Inkscape::LivePathEffect::LPECopyRotate::gap
private

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

Referenced by doEffect_path(), doEffect_path_post(), and LPECopyRotate().

◆ half_dir

Geom::Point Inkscape::LivePathEffect::LPECopyRotate::half_dir
private

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

Referenced by doAfterEffect(), doEffect_path(), and doEffect_path_post().

◆ link_styles

BoolParam Inkscape::LivePathEffect::LPECopyRotate::link_styles
private

Definition at line 73 of file lpe-copy_rotate.h.

Referenced by doAfterEffect(), doBeforeEffect(), LPECopyRotate(), and toItem().

◆ lpesatellites

SatelliteArrayParam Inkscape::LivePathEffect::LPECopyRotate::lpesatellites
private

Definition at line 63 of file lpe-copy_rotate.h.

Referenced by doAfterEffect(), doBeforeEffect(), doOnOpen(), LPECopyRotate(), and toItem().

◆ method

EnumParam<RotateMethod> Inkscape::LivePathEffect::LPECopyRotate::method
private

◆ mirror_copies

BoolParam Inkscape::LivePathEffect::LPECopyRotate::mirror_copies
private

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

Referenced by doAfterEffect(), doBeforeEffect(), doEffect_path_post(), and LPECopyRotate().

◆ num_copies

ScalarParam Inkscape::LivePathEffect::LPECopyRotate::num_copies
private

◆ origin

PointParam Inkscape::LivePathEffect::LPECopyRotate::origin
private

◆ previous_num_copies

double Inkscape::LivePathEffect::LPECopyRotate::previous_num_copies
private

Definition at line 84 of file lpe-copy_rotate.h.

Referenced by doAfterEffect(), and LPECopyRotate().

◆ previous_origin

Geom::Point Inkscape::LivePathEffect::LPECopyRotate::previous_origin
private

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

Referenced by doBeforeEffect(), and LPECopyRotate().

◆ previous_split

bool Inkscape::LivePathEffect::LPECopyRotate::previous_split = false
private

Definition at line 86 of file lpe-copy_rotate.h.

Referenced by doAfterEffect().

◆ previous_start_point

Geom::Point Inkscape::LivePathEffect::LPECopyRotate::previous_start_point
private

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

Referenced by doBeforeEffect(), and LPECopyRotate().

◆ reset

bool Inkscape::LivePathEffect::LPECopyRotate::reset
private

Definition at line 85 of file lpe-copy_rotate.h.

Referenced by cloneD(), doAfterEffect(), doBeforeEffect(), LPECopyRotate(), and toItem().

◆ rotation_angle

ScalarParam Inkscape::LivePathEffect::LPECopyRotate::rotation_angle
private

◆ size_divider

double Inkscape::LivePathEffect::LPECopyRotate::size_divider
private

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

Referenced by doEffect_path().

◆ split_items

BoolParam Inkscape::LivePathEffect::LPECopyRotate::split_items

◆ start_pos

Geom::Point Inkscape::LivePathEffect::LPECopyRotate::start_pos
private

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

Referenced by addCanvasIndicators(), and doBeforeEffect().

◆ starting_angle

ScalarParam Inkscape::LivePathEffect::LPECopyRotate::starting_angle
private

◆ starting_point

PointParam Inkscape::LivePathEffect::LPECopyRotate::starting_point
private

Definition at line 66 of file lpe-copy_rotate.h.

Referenced by addCanvasIndicators(), doBeforeEffect(), and LPECopyRotate().


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