Inkscape
Vector Graphics Editor
|
#include <lpe-perspective-envelope.h>
Public Member Functions | |
LPEPerspectiveEnvelope (LivePathEffectObject *lpeobject) | |
~LPEPerspectiveEnvelope () override | |
void | doEffect (Geom::PathVector &curve) override |
virtual Geom::Point | projectPoint (Geom::Point p) |
void | transform_multiply (Geom::Affine const &postmul, bool set) override |
Overridden function to apply transforms for example to powerstroke, jointtype or tapperstroke. | |
virtual Geom::Point | projectPoint (Geom::Point p, double m[][3]) |
virtual Geom::Point | pointAtRatio (Geom::Coord ratio, Geom::Point A, Geom::Point B) |
void | resetDefaults (SPItem const *item) override |
Sets all parameters to their default values and writes them to SVG. | |
virtual void | vertical (PointParam ¶mA, PointParam ¶mB, Geom::Line vert) |
virtual void | horizontal (PointParam ¶mA, PointParam ¶mB, Geom::Line horiz) |
void | doBeforeEffect (SPLPEItem const *lpeitem) override |
Is performed each time before the effect is updated. | |
Gtk::Widget * | newWidget () override |
This creates a managed widget. | |
virtual void | setDefaults () |
virtual void | resetGrid () |
![]() | |
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 | 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 |
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) |
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 () |
Protected Member Functions | |
void | addCanvasIndicators (SPLPEItem const *, 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. | |
![]() | |
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) |
Parameter * | getNextOncanvasEditableParam () |
virtual void | addKnotHolderEntities (KnotHolder *, SPItem *) |
Private Member Functions | |
LPEPerspectiveEnvelope (const LPEPerspectiveEnvelope &)=delete | |
LPEPerspectiveEnvelope & | operator= (const LPEPerspectiveEnvelope &)=delete |
![]() | |
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 | |
BoolParam | horizontal_mirror |
BoolParam | vertical_mirror |
BoolParam | overflow_perspective |
EnumParam< unsigned > | deform_type |
PointParam | up_left_point |
PointParam | up_right_point |
PointParam | down_left_point |
PointParam | down_right_point |
std::vector< Geom::Point > | handles |
![]() | |
Geom::Interval | boundingbox_X |
Geom::Interval | boundingbox_Y |
Definition at line 29 of file lpe-perspective-envelope.h.
Inkscape::LivePathEffect::LPEPerspectiveEnvelope::LPEPerspectiveEnvelope | ( | LivePathEffectObject * | lpeobject | ) |
Definition at line 49 of file lpe-perspective-envelope.cpp.
References Inkscape::LivePathEffect::Effect::apply_to_clippath_and_mask, deform_type, down_left_point, down_right_point, horizontal_mirror, overflow_perspective, Inkscape::LivePathEffect::Effect::registerParameter(), up_left_point, up_right_point, and vertical_mirror.
|
overridedefault |
|
privatedelete |
|
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 553 of file lpe-perspective-envelope.cpp.
References c, down_left_point, down_right_point, Geom::Path::start(), up_left_point, and up_right_point.
|
overridevirtual |
Is performed each time before the effect is updated.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 373 of file lpe-perspective-envelope.cpp.
References Geom::are_near(), Inkscape::LivePathEffect::GroupBBoxEffect::boundingbox_X, Inkscape::LivePathEffect::GroupBBoxEffect::boundingbox_Y, Geom::cross(), deform_type, Inkscape::LivePathEffect::DEFORMATION_PERSPECTIVE, down_left_point, down_right_point, handles, horizontal(), horizontal_mirror, Geom::GenericInterval< C >::max(), Geom::GenericInterval< C >::middle(), Geom::GenericInterval< C >::min(), Geom::Line::nearestTime(), Inkscape::LivePathEffect::GroupBBoxEffect::original_bbox(), overflow_perspective, Inkscape::LivePathEffect::PointParam::param_setValue(), Geom::Line::pointAt(), resetGrid(), setDefaults(), Geom::Line::setPoints(), Geom::sgn(), up_left_point, up_right_point, vertical(), and vertical_mirror.
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 104 of file lpe-perspective-envelope.cpp.
References Geom::are_near(), Inkscape::LivePathEffect::GroupBBoxEffect::boundingbox_X, Inkscape::LivePathEffect::GroupBBoxEffect::boundingbox_Y, closepath_current(), deform_type, Inkscape::LivePathEffect::DEFORMATION_PERSPECTIVE, Geom::Curve::finalPoint(), handles, Geom::Curve::initialPoint(), Geom::GenericInterval< C >::max(), Geom::GenericInterval< C >::min(), move_endpoints(), pathv_to_linear_and_cubic_beziers(), projectPoint(), Geom::X, and Geom::Y.
|
virtual |
Definition at line 352 of file lpe-perspective-envelope.cpp.
References Geom::distance(), Geom::Line::nearestTime(), Inkscape::LivePathEffect::PointParam::param_setValue(), Geom::Line::pointAt(), Geom::X, and Geom::Y.
Referenced by doBeforeEffect().
|
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 263 of file lpe-perspective-envelope.cpp.
References Inkscape::UI::expand_padding, Inkscape::UI::expand_widget, Inkscape::UI::get_children(), handles, Inkscape::UI::pack_start(), Inkscape::LivePathEffect::Effect::param_vector, and resetGrid().
|
privatedelete |
|
virtual |
Definition at line 255 of file lpe-perspective-envelope.cpp.
References Geom::X, and Geom::Y.
Referenced by projectPoint().
|
virtual |
Definition at line 223 of file lpe-perspective-envelope.cpp.
References Inkscape::LivePathEffect::GroupBBoxEffect::boundingbox_X, Inkscape::LivePathEffect::GroupBBoxEffect::boundingbox_Y, down_left_point, down_right_point, Geom::GenericInterval< C >::extent(), height, Geom::intersection(), Geom::GenericInterval< C >::max(), Geom::GenericInterval< C >::min(), Geom::Line::pointAt(), pointAtRatio(), Geom::Line::setPoints(), up_left_point, up_right_point, width, Geom::X, and Geom::Y.
Referenced by doEffect().
|
virtual |
Definition at line 245 of file lpe-perspective-envelope.cpp.
|
overridevirtual |
Sets all parameters to their default values and writes them to SVG.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 544 of file lpe-perspective-envelope.cpp.
References item, Inkscape::LivePathEffect::GroupBBoxEffect::original_bbox(), Inkscape::LivePathEffect::Effect::resetDefaults(), resetGrid(), and setDefaults().
|
virtual |
Definition at line 535 of file lpe-perspective-envelope.cpp.
References down_left_point, down_right_point, Inkscape::LivePathEffect::PointParam::param_set_default(), up_left_point, and up_right_point.
Referenced by doBeforeEffect(), newWidget(), and resetDefaults().
|
virtual |
Definition at line 511 of file lpe-perspective-envelope.cpp.
References Geom::are_near(), Inkscape::LivePathEffect::GroupBBoxEffect::boundingbox_X, Inkscape::LivePathEffect::GroupBBoxEffect::boundingbox_Y, down_left_point, down_right_point, Geom::GenericInterval< C >::max(), Geom::GenericInterval< C >::min(), Inkscape::LivePathEffect::PointParam::param_update_default(), up_left_point, and up_right_point.
Referenced by doBeforeEffect(), and resetDefaults().
|
overridevirtual |
Overridden function to apply transforms for example to powerstroke, jointtype or tapperstroke.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 74 of file lpe-perspective-envelope.cpp.
References down_left_point, down_right_point, SPLPEItem::optimizeTransforms(), Inkscape::LivePathEffect::PointParam::param_transform_multiply(), SPLPEItem::pathEffectsEnabled(), Inkscape::LivePathEffect::Effect::sp_lpe_item, up_left_point, and up_right_point.
|
virtual |
Definition at line 331 of file lpe-perspective-envelope.cpp.
References Geom::distance(), Geom::Line::nearestTime(), Inkscape::LivePathEffect::PointParam::param_setValue(), Geom::Line::pointAt(), Geom::X, and Geom::Y.
Referenced by doBeforeEffect().
|
private |
Definition at line 67 of file lpe-perspective-envelope.h.
Referenced by doBeforeEffect(), doEffect(), and LPEPerspectiveEnvelope().
|
private |
Definition at line 70 of file lpe-perspective-envelope.h.
Referenced by addCanvasIndicators(), doBeforeEffect(), LPEPerspectiveEnvelope(), projectPoint(), resetGrid(), setDefaults(), and transform_multiply().
|
private |
Definition at line 71 of file lpe-perspective-envelope.h.
Referenced by addCanvasIndicators(), doBeforeEffect(), LPEPerspectiveEnvelope(), projectPoint(), resetGrid(), setDefaults(), and transform_multiply().
|
private |
Definition at line 72 of file lpe-perspective-envelope.h.
Referenced by doBeforeEffect(), doEffect(), and newWidget().
|
private |
Definition at line 64 of file lpe-perspective-envelope.h.
Referenced by doBeforeEffect(), and LPEPerspectiveEnvelope().
|
private |
Definition at line 66 of file lpe-perspective-envelope.h.
Referenced by doBeforeEffect(), and LPEPerspectiveEnvelope().
|
private |
Definition at line 68 of file lpe-perspective-envelope.h.
Referenced by addCanvasIndicators(), doBeforeEffect(), LPEPerspectiveEnvelope(), projectPoint(), resetGrid(), setDefaults(), and transform_multiply().
|
private |
Definition at line 69 of file lpe-perspective-envelope.h.
Referenced by addCanvasIndicators(), doBeforeEffect(), LPEPerspectiveEnvelope(), projectPoint(), resetGrid(), setDefaults(), and transform_multiply().
|
private |
Definition at line 65 of file lpe-perspective-envelope.h.
Referenced by doBeforeEffect(), and LPEPerspectiveEnvelope().