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

#include <lpe-offset.h>

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

Public Member Functions

 LPEOffset (LivePathEffectObject *lpeobject)
 
 ~LPEOffset () override
 
void doBeforeEffect (SPLPEItem const *lpeitem) override
 Is performed each time before the effect is updated.
 
void doAfterEffect (SPLPEItem const *, 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.
 
Geom::PathVector doEffect_path (Geom::PathVector const &path_in) override
 
bool doOnOpen (SPLPEItem const *lpeitem) override
 Is performed on load document or revert If the item is fixed legacy return true.
 
void doOnApply (SPLPEItem const *lpeitem) override
 Is performed a single time when the effect is freshly applied to a path.
 
void transform_multiply (Geom::Affine const &postmul, bool set) override
 Overridden function to apply transforms for example to powerstroke, jointtype or tapperstroke.
 
void addKnotHolderEntities (KnotHolder *knotholder, SPItem *item) override
 
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.
 
void calculateOffset (Geom::PathVector const &path_in)
 
Geom::Path cleanupPathSelfIntersects (Geom::Path path, size_t originpos, double tolerance)
 
Geom::Point get_default_point (Geom::PathVector pathv)
 
double sp_get_offset ()
 
- 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 doOnVisibilityToggled (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 Gtk::Widget * newWidget ()
 This creates a managed widget.
 
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 ()
 

Private Member Functions

void modified (SPObject *, guint flags)
 
 LPEOffset (const LPEOffset &)
 
LPEOffsetoperator= (const LPEOffset &)
 
- 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

UnitParam unit
 
ScalarParam offset
 
EnumParam< unsigned > linejoin_type
 
ScalarParam miter_limit
 
BoolParam attempt_force_join
 
BoolParam update_on_knot_move
 
Geom::Point offset_pt
 
bool sign = true
 
Glib::ustring prev_unit
 
double scale = 1
 
KnotHolder_knotholder
 
Geom::PathVector mix_pathv_all
 
Geom::PathVector helper_path
 
Inkscape::UI::Widget::Scalaroffset_widget
 
FillRule fillrule
 
bool liveknot
 
sigc::connection modified_connection
 
- Private Attributes inherited from Inkscape::LivePathEffect::GroupBBoxEffect
Geom::Interval boundingbox_X
 
Geom::Interval boundingbox_Y
 

Friends

class OfS::KnotHolderEntityOffsetPoint
 

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)
 
- 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 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 ()
 
- 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 36 of file lpe-offset.h.

Constructor & Destructor Documentation

◆ LPEOffset() [1/2]

◆ ~LPEOffset()

Inkscape::LivePathEffect::LPEOffset::~LPEOffset ( )
override

Definition at line 98 of file lpe-offset.cpp.

References _knotholder, KnotHolder::clear(), and modified_connection.

◆ LPEOffset() [2/2]

Inkscape::LivePathEffect::LPEOffset::LPEOffset ( const LPEOffset )
private

Member Function Documentation

◆ addCanvasIndicators()

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

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 214 of file lpe-offset.cpp.

References helper_path.

◆ addKnotHolderEntities()

void Inkscape::LivePathEffect::LPEOffset::addKnotHolderEntities ( KnotHolder knotholder,
SPItem item 
)
overridevirtual

◆ calculateOffset()

void Inkscape::LivePathEffect::LPEOffset::calculateOffset ( Geom::PathVector const &  path_in)

◆ cleanupPathSelfIntersects()

Geom::Path Inkscape::LivePathEffect::LPEOffset::cleanupPathSelfIntersects ( Geom::Path  path,
size_t  originpos,
double  tolerance 
)

◆ doAfterEffect()

void Inkscape::LivePathEffect::LPEOffset::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 241 of file lpe-offset.cpp.

References _knotholder, KnotHolder::entity, Inkscape::LivePathEffect::get_nearest_point(), Geom::infinity(), Inkscape::LivePathEffect::Effect::is_load, liveknot, offset_pt, and Inkscape::LivePathEffect::Effect::sp_lpe_item.

◆ doBeforeEffect()

◆ doEffect_path()

◆ doOnApply()

void Inkscape::LivePathEffect::LPEOffset::doOnApply ( SPLPEItem const *  lpeitem)
overridevirtual

Is performed a single time when the effect is freshly applied to a path.

Reimplemented from Inkscape::LivePathEffect::Effect.

Definition at line 119 of file lpe-offset.cpp.

References Inkscape::LivePathEffect::Effect::lpeversion, and Inkscape::LivePathEffect::HiddenParam::param_setValue().

◆ doOnOpen()

bool Inkscape::LivePathEffect::LPEOffset::doOnOpen ( SPLPEItem const *  lpeitem)
overridevirtual

◆ get_default_point()

Geom::Point Inkscape::LivePathEffect::LPEOffset::get_default_point ( Geom::PathVector  pathv)

◆ modified()

void Inkscape::LivePathEffect::LPEOffset::modified ( SPObject obj,
guint  flags 
)
private

◆ operator=()

LPEOffset & Inkscape::LivePathEffect::LPEOffset::operator= ( const LPEOffset )
private

◆ sp_get_offset()

◆ transform_multiply()

void Inkscape::LivePathEffect::LPEOffset::transform_multiply ( Geom::Affine const &  postmul,
bool  set 
)
overridevirtual

Friends And Related Symbol Documentation

◆ OfS::KnotHolderEntityOffsetPoint

friend class OfS::KnotHolderEntityOffsetPoint
friend

Definition at line 52 of file lpe-offset.h.

Referenced by addKnotHolderEntities().

Member Data Documentation

◆ _knotholder

KnotHolder* Inkscape::LivePathEffect::LPEOffset::_knotholder
private

◆ attempt_force_join

BoolParam Inkscape::LivePathEffect::LPEOffset::attempt_force_join
private

Definition at line 59 of file lpe-offset.h.

Referenced by doEffect_path(), and LPEOffset().

◆ fillrule

FillRule Inkscape::LivePathEffect::LPEOffset::fillrule
private

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

Referenced by doEffect_path(), LPEOffset(), and modified().

◆ helper_path

Geom::PathVector Inkscape::LivePathEffect::LPEOffset::helper_path
private

Definition at line 68 of file lpe-offset.h.

Referenced by addCanvasIndicators(), and doEffect_path().

◆ linejoin_type

EnumParam<unsigned> Inkscape::LivePathEffect::LPEOffset::linejoin_type
private

Definition at line 57 of file lpe-offset.h.

Referenced by doEffect_path(), and LPEOffset().

◆ liveknot

bool Inkscape::LivePathEffect::LPEOffset::liveknot
private

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

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

◆ miter_limit

ScalarParam Inkscape::LivePathEffect::LPEOffset::miter_limit
private

Definition at line 58 of file lpe-offset.h.

Referenced by doEffect_path(), and LPEOffset().

◆ mix_pathv_all

Geom::PathVector Inkscape::LivePathEffect::LPEOffset::mix_pathv_all
private

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

Referenced by doBeforeEffect(), doEffect_path(), and sp_get_offset().

◆ modified_connection

sigc::connection Inkscape::LivePathEffect::LPEOffset::modified_connection
private

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

Referenced by doBeforeEffect(), and ~LPEOffset().

◆ offset

ScalarParam Inkscape::LivePathEffect::LPEOffset::offset
private

Definition at line 56 of file lpe-offset.h.

Referenced by doBeforeEffect(), doEffect_path(), LPEOffset(), and transform_multiply().

◆ offset_pt

Geom::Point Inkscape::LivePathEffect::LPEOffset::offset_pt
private

◆ offset_widget

Inkscape::UI::Widget::Scalar* Inkscape::LivePathEffect::LPEOffset::offset_widget
private

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

◆ prev_unit

Glib::ustring Inkscape::LivePathEffect::LPEOffset::prev_unit
private

Definition at line 64 of file lpe-offset.h.

Referenced by doBeforeEffect(), and LPEOffset().

◆ scale

double Inkscape::LivePathEffect::LPEOffset::scale = 1
private

Definition at line 65 of file lpe-offset.h.

Referenced by doBeforeEffect(), doEffect_path(), and sp_get_offset().

◆ sign

bool Inkscape::LivePathEffect::LPEOffset::sign = true
private

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

Referenced by sp_get_offset().

◆ unit

UnitParam Inkscape::LivePathEffect::LPEOffset::unit
private

Definition at line 55 of file lpe-offset.h.

Referenced by doBeforeEffect(), doEffect_path(), LPEOffset(), and sp_get_offset().

◆ update_on_knot_move

BoolParam Inkscape::LivePathEffect::LPEOffset::update_on_knot_move
private

Definition at line 61 of file lpe-offset.h.

Referenced by LPEOffset().


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