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

#include <lpe-bool.h>

Inheritance diagram for Inkscape::LivePathEffect::LPEBool:
Inkscape::LivePathEffect::Effect

Public Types

enum  bool_op_ex {
  bool_op_ex_union = bool_op_union , bool_op_ex_inters = bool_op_inters , bool_op_ex_diff = bool_op_diff , bool_op_ex_symdiff = bool_op_symdiff ,
  bool_op_ex_cut = bool_op_cut , bool_op_ex_cut_both , bool_op_ex_count
}
 

Public Member Functions

 LPEBool (LivePathEffectObject *lpeobject)
 
 ~LPEBool () override
 
void doEffect (Geom::PathVector &curve) 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 doBeforeEffect (SPLPEItem const *lpeitem) override
 Is performed each time before the effect is updated.
 
void transform_multiply (Geom::Affine const &postmul, bool set) override
 Overridden function to apply transforms for example to powerstroke, jointtype or tapperstroke.
 
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 doOnVisibilityToggled (SPLPEItem const *) override
 
void doOnRemove (SPLPEItem const *) override
 
bool doOnOpen (SPLPEItem const *lpeitem) override
 Is performed on load document or revert If the item is fixed legacy return true.
 
void add_filter ()
 
void fractureit (SPObject *operandit, Geom::PathVector unionpv)
 
void divisionit (SPObject *operand_a, SPObject *operand_b, Geom::PathVector unionpv)
 
Geom::PathVector get_union (SPObject *root, SPObject *object, bool prefear_original=false)
 
Inkscape::XML::NodedupleNode (SPObject *origin, Glib::ustring element_type)
 
void remove_filter (SPObject *object)
 
- 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 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

 LPEBool (const LPEBool &)=delete
 
LPEBooloperator= (const LPEBool &)=delete
 

Private Attributes

OriginalSatelliteParam operand_item
 
EnumParam< bool_op_exbool_operation
 
EnumParam< FillRulefill_type_this
 
EnumParam< FillRulefill_type_operand
 
BoolParam swap_operands
 
BoolParam rmv_inner
 
bool onremove = false
 
SPItemoperand = nullptr
 
SPGroupdivision = nullptr
 
SPGroupdivision_both = nullptr
 
SPGroupdivision_other = nullptr
 
Glib::ustring operand_id = ""
 
Glib::ustring division_id = ""
 
Glib::ustring division_other_id = ""
 
HiddenParam filter
 
Geom::PathVector _hp
 
Geom::Affine prev_affine
 
bool reverse = false
 

Friends

BooleanOp to_bool_op (bool_op_ex val)
 

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::PathVector doEffect_path (Geom::PathVector const &path_in)
 
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 *)
 
- 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 24 of file lpe-bool.h.

Member Enumeration Documentation

◆ bool_op_ex

Enumerator
bool_op_ex_union 
bool_op_ex_inters 
bool_op_ex_diff 
bool_op_ex_symdiff 
bool_op_ex_cut 
bool_op_ex_cut_both 
bool_op_ex_count 

Definition at line 43 of file lpe-bool.h.

Constructor & Destructor Documentation

◆ LPEBool() [1/2]

◆ ~LPEBool()

Inkscape::LivePathEffect::LPEBool::~LPEBool ( )
overridedefault

◆ LPEBool() [2/2]

Inkscape::LivePathEffect::LPEBool::LPEBool ( const LPEBool )
privatedelete

Member Function Documentation

◆ add_filter()

◆ addCanvasIndicators()

void Inkscape::LivePathEffect::LPEBool::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 716 of file lpe-bool.cpp.

References _hp.

◆ divisionit()

◆ doAfterEffect()

void Inkscape::LivePathEffect::LPEBool::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 435 of file lpe-bool.cpp.

References onremove.

◆ doBeforeEffect()

void Inkscape::LivePathEffect::LPEBool::doBeforeEffect ( SPLPEItem const *  lpeitem)
overridevirtual

◆ doEffect()

◆ doOnOpen()

◆ doOnRemove()

◆ doOnVisibilityToggled()

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

◆ dupleNode()

Inkscape::XML::Node * Inkscape::LivePathEffect::LPEBool::dupleNode ( SPObject origin,
Glib::ustring  element_type 
)

◆ fractureit()

◆ get_union()

Geom::PathVector Inkscape::LivePathEffect::LPEBool::get_union ( SPObject root,
SPObject object,
bool  prefear_original = false 
)

◆ operator=()

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

◆ remove_filter()

◆ transform_multiply()

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

Friends And Related Symbol Documentation

◆ to_bool_op

BooleanOp to_bool_op ( bool_op_ex  val)
friend

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

Referenced by doEffect(), and get_union().

Member Data Documentation

◆ _hp

Geom::PathVector Inkscape::LivePathEffect::LPEBool::_hp
private

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

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

◆ bool_operation

EnumParam<bool_op_ex> Inkscape::LivePathEffect::LPEBool::bool_operation
private

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

Referenced by doBeforeEffect(), doEffect(), doOnRemove(), and LPEBool().

◆ division

SPGroup* Inkscape::LivePathEffect::LPEBool::division = nullptr
private

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

Referenced by divisionit(), and doOnRemove().

◆ division_both

SPGroup* Inkscape::LivePathEffect::LPEBool::division_both = nullptr
private

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

Referenced by doOnRemove(), and fractureit().

◆ division_id

Glib::ustring Inkscape::LivePathEffect::LPEBool::division_id = ""
private

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

Referenced by divisionit(), doOnRemove(), and fractureit().

◆ division_other

SPGroup* Inkscape::LivePathEffect::LPEBool::division_other = nullptr
private

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

Referenced by doOnRemove(), and fractureit().

◆ division_other_id

Glib::ustring Inkscape::LivePathEffect::LPEBool::division_other_id = ""
private

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

Referenced by doOnRemove(), and fractureit().

◆ fill_type_operand

EnumParam<FillRule> Inkscape::LivePathEffect::LPEBool::fill_type_operand
private

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

Referenced by divisionit(), doEffect(), fractureit(), and LPEBool().

◆ fill_type_this

EnumParam<FillRule> Inkscape::LivePathEffect::LPEBool::fill_type_this
private

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

Referenced by divisionit(), doEffect(), fractureit(), and LPEBool().

◆ filter

HiddenParam Inkscape::LivePathEffect::LPEBool::filter
private

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

Referenced by add_filter(), LPEBool(), and remove_filter().

◆ onremove

bool Inkscape::LivePathEffect::LPEBool::onremove = false
private

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

Referenced by doAfterEffect(), doBeforeEffect(), doEffect(), and doOnRemove().

◆ operand

SPItem* Inkscape::LivePathEffect::LPEBool::operand = nullptr
private

◆ operand_id

Glib::ustring Inkscape::LivePathEffect::LPEBool::operand_id = ""
private

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

Referenced by doBeforeEffect(), doEffect(), doOnRemove(), LPEBool(), and transform_multiply().

◆ operand_item

OriginalSatelliteParam Inkscape::LivePathEffect::LPEBool::operand_item
private

◆ prev_affine

Geom::Affine Inkscape::LivePathEffect::LPEBool::prev_affine
private

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

Referenced by LPEBool(), and transform_multiply().

◆ reverse

bool Inkscape::LivePathEffect::LPEBool::reverse = false
private

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

Referenced by doOnRemove().

◆ rmv_inner

BoolParam Inkscape::LivePathEffect::LPEBool::rmv_inner
private

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

Referenced by doEffect().

◆ swap_operands

BoolParam Inkscape::LivePathEffect::LPEBool::swap_operands
private

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

Referenced by doEffect(), and LPEBool().


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