Inkscape
Vector Graphics Editor
|
#include <lpe-powermask.h>
Public Member Functions | |
LPEPowerMask (LivePathEffectObject *lpeobject) | |
~LPEPowerMask () 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 | doEffect (Geom::PathVector &curve) override |
void | doOnRemove (SPLPEItem const *) override |
void | doOnVisibilityToggled (SPLPEItem const *lpeitem) override |
void | toggleMaskVisibility () |
void | tryForkMask () |
Glib::ustring | getId () |
void | setMask () |
![]() | |
virtual | ~Effect () |
Effect (const Effect &)=delete | |
Effect & | operator= (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 |
SPShape * | getCurrentShape () 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::PathVector > | getCanvasIndicators (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::Node * | getRepr () |
SPDocument * | getSPDoc () |
LivePathEffectObject * | getLPEObj () |
LivePathEffectObject const * | getLPEObj () const |
Parameter * | getParameter (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 Attributes | |
HiddenParam | uri |
BoolParam | invert |
BoolParam | hide_mask |
BoolParam | background |
ColorPickerParam | background_color |
std::optional< Colors::Color > | previous_color |
Geom::Path | mask_box |
Definition at line 19 of file lpe-powermask.h.
Inkscape::LivePathEffect::LPEPowerMask::LPEPowerMask | ( | LivePathEffectObject * | lpeobject | ) |
Definition at line 31 of file lpe-powermask.cpp.
References background, background_color, Inkscape::LivePathEffect::ColorPickerParam::get_value(), hide_mask, invert, previous_color, Inkscape::LivePathEffect::Effect::registerParameter(), and uri.
|
overridedefault |
|
overridevirtual |
Is performed each time before the effect is updated.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 106 of file lpe-powermask.cpp.
References background_color, Geom::Path::clear(), Inkscape::URIReference::detach(), Geom::GenericRect< C >::expandBy(), extract_uri(), Inkscape::LivePathEffect::ColorPickerParam::get_value(), SPObject::getAttribute(), SPItem::getMaskObject(), SPItem::getMaskRef(), Inkscape::LivePathEffect::Effect::getSPDoc(), hide_mask, item, mask_box, Inkscape::LivePathEffect::HiddenParam::param_getSVGValue(), Inkscape::LivePathEffect::HiddenParam::param_setValue(), previous_color, setMask(), Inkscape::LivePathEffect::Effect::sp_lpe_item, Inkscape::URIReference::try_attach(), tryForkMask(), uri, and SPItem::visualBounds().
Referenced by doOnVisibilityToggled().
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 274 of file lpe-powermask.cpp.
|
overridevirtual |
Is performed a single time when the effect is freshly applied to a path.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 53 of file lpe-powermask.cpp.
References LivePathEffectObject::effecttype, getId(), SPItem::getMaskObject(), SPLPEItem::hasPathEffect(), item, Inkscape::LivePathEffect::Effect::lpeobj, Inkscape::LivePathEffect::LPETypeConverter, SPLPEItem::path_effect_list, SPLPEItem::pathEffectsEnabled(), SPObject::setAttribute(), and uri.
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 277 of file lpe-powermask.cpp.
References background, SPObject::deleteObject(), Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), getId(), SPItem::getMaskObject(), SPDocument::getObjectById(), Inkscape::LivePathEffect::Effect::getSPDoc(), invert, Inkscape::LivePathEffect::Effect::keep_paths, Inkscape::LivePathEffect::BoolParam::param_setValue(), and setMask().
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 269 of file lpe-powermask.cpp.
References doBeforeEffect().
Glib::ustring Inkscape::LivePathEffect::LPEPowerMask::getId | ( | ) |
Definition at line 50 of file lpe-powermask.cpp.
References getId(), and Inkscape::LivePathEffect::Effect::getLPEObj().
Referenced by doOnApply(), doOnRemove(), getId(), setMask(), and tryForkMask().
void Inkscape::LivePathEffect::LPEPowerMask::setMask | ( | ) |
Definition at line 149 of file lpe-powermask.cpp.
References Inkscape::XML::Node::appendChild(), SPObject::appendChildRepr(), Inkscape::XML::Node::attribute(), background, background_color, SPObject::childList(), Inkscape::XML::Document::createElement(), css, SPObject::deleteObject(), Inkscape::LivePathEffect::ColorPickerParam::get_value(), SPDocument::getDefs(), getId(), SPItem::getMaskObject(), SPDocument::getObjectById(), SPObject::getRepr(), SPDocument::getReprDoc(), Inkscape::LivePathEffect::Effect::getSPDoc(), invert, Inkscape::LivePathEffect::Effect::is_visible, mask_box, Inkscape::GC::release(), Inkscape::XML::Node::removeChild(), SPObject::requestDisplayUpdate(), Inkscape::XML::Node::setAttribute(), Inkscape::XML::Node::setPosition(), Inkscape::LivePathEffect::Effect::sp_lpe_item, sp_repr_css_attr_add_from_string(), sp_repr_css_attr_new(), sp_repr_css_attr_unref(), sp_repr_css_change(), sp_repr_css_property(), sp_repr_css_set_property(), sp_repr_css_set_property_double(), sp_repr_css_set_property_string(), sp_repr_css_write_string(), and sp_svg_write_path().
Referenced by doBeforeEffect(), and doOnRemove().
void Inkscape::LivePathEffect::LPEPowerMask::toggleMaskVisibility | ( | ) |
void Inkscape::LivePathEffect::LPEPowerMask::tryForkMask | ( | ) |
Definition at line 85 of file lpe-powermask.cpp.
References SPObject::appendChildRepr(), Inkscape::XML::Node::duplicate(), SPDocument::getDefs(), getId(), SPItem::getMaskObject(), SPDocument::getObjectById(), SPObject::getRepr(), SPDocument::getReprDoc(), Inkscape::LivePathEffect::Effect::getSPDoc(), Inkscape::GC::release(), SPObject::setAttribute(), Inkscape::XML::Node::setAttribute(), Inkscape::LivePathEffect::Effect::sp_lpe_item, and uri.
Referenced by doBeforeEffect().
|
private |
Definition at line 37 of file lpe-powermask.h.
Referenced by doOnRemove(), LPEPowerMask(), and setMask().
|
private |
Definition at line 38 of file lpe-powermask.h.
Referenced by doBeforeEffect(), LPEPowerMask(), and setMask().
|
private |
Definition at line 36 of file lpe-powermask.h.
Referenced by doBeforeEffect(), and LPEPowerMask().
|
private |
Definition at line 34 of file lpe-powermask.h.
Referenced by doOnRemove(), LPEPowerMask(), and setMask().
|
private |
Definition at line 40 of file lpe-powermask.h.
Referenced by doBeforeEffect(), and setMask().
|
private |
Definition at line 39 of file lpe-powermask.h.
Referenced by doBeforeEffect(), and LPEPowerMask().
|
private |
Definition at line 33 of file lpe-powermask.h.
Referenced by doBeforeEffect(), doOnApply(), LPEPowerMask(), and tryForkMask().