Inkscape
Vector Graphics Editor
|
#include <powerstrokepointarray.h>
Public Member Functions | |
PowerStrokePointArrayParam (const Glib::ustring &label, const Glib::ustring &tip, const Glib::ustring &key, Inkscape::UI::Widget::Registry *wr, Effect *effect) | |
~PowerStrokePointArrayParam () override | |
PowerStrokePointArrayParam (const PowerStrokePointArrayParam &)=delete | |
PowerStrokePointArrayParam & | operator= (const PowerStrokePointArrayParam &)=delete |
Gtk::Widget * | param_newWidget () override |
void | param_transform_multiply (Geom::Affine const &postmul, bool) override |
void | set_oncanvas_looks (CanvasItemCtrlShape shape, uint32_t color) |
float | median_width () |
Geom::Point | knot_get (size_t index) |
Geom::Point | knot_reposition (size_t index, Geom::PathVector pathv) |
bool | providesKnotHolderEntities () const override |
void | addKnotHolderEntities (KnotHolder *knotholder, SPItem *item) override |
void | param_update_default (const gchar *default_value) override |
void | set_pwd2 (Geom::Piecewise< Geom::D2< Geom::SBasis > > const &pwd2_in, Geom::Piecewise< Geom::D2< Geom::SBasis > > const &pwd2_normal_in) |
Geom::Piecewise< Geom::D2< Geom::SBasis > > const & | get_pwd2 () const |
Geom::Piecewise< Geom::D2< Geom::SBasis > > const & | get_pwd2_normal () const |
void | recalculate_controlpoints (Geom::PathVector pv) |
call this method to recalculate the controlpoints such that they stay at the same location relative to the new path. | |
std::vector< Geom::Point > | reverse_controlpoints (bool write) |
call this method to recalculate the controlpoints when path is reversed. | |
void | set_scale_width (double scale_width) |
ParamType | paramType () const override |
![]() | |
ArrayParam (const Glib::ustring &label, const Glib::ustring &tip, const Glib::ustring &key, Inkscape::UI::Widget::Registry *wr, Effect *effect, std::size_t n=0) | |
ArrayParam (const ArrayParam &) | |
ArrayParam & | operator= (const ArrayParam &) |
std::vector< Geom::Point > const & | data () const |
bool | param_readSVGValue (char const *const strvalue) override |
void | param_update_default (char const *default_value) override |
Glib::ustring | param_getSVGValue () const override |
Glib::ustring | param_getDefaultSVGValue () const override |
void | param_setValue (std::vector< Geom::Point > const &new_vector) |
void | param_set_default () override |
void | param_set_and_write_new_value (std::vector< Geom::Point > const &new_vector) |
bool | valid_index (int index) const |
![]() | |
Parameter (Glib::ustring label, Glib::ustring tip, Glib::ustring key, Inkscape::UI::Widget::Registry *wr, Effect *effect) | |
virtual | ~Parameter () |
Parameter (const Parameter &)=delete | |
Parameter & | operator= (const Parameter &)=delete |
virtual void | param_widget_is_visible (bool is_visible) |
virtual void | param_widget_is_enabled (bool is_enabled) |
void | write_to_SVG () |
void | read_from_SVG () |
void | setUpdating (bool updating) |
bool | getUpdating () const |
Glib::ustring const * | param_getTooltip () const |
virtual void | addCanvasIndicators (SPLPEItem const *, std::vector< Geom::PathVector > &) |
virtual void | param_editOncanvas (SPItem *, SPDesktop *) |
virtual void | param_setup_nodepath (Inkscape::NodePath::Path *) |
virtual std::vector< SPObject * > | param_get_satellites () |
void | param_higlight (bool highlight) |
void | change_selection (Inkscape::Selection *selection) |
void | update_satellites () |
EffectType | effectType () const |
void | connect_selection_changed () |
Public Attributes | |
double | _scale_width |
bool | unplaced = false |
size_t | current_path = Glib::ustring::npos |
![]() | |
sigc::scoped_connection | selection_changed_connection |
Glib::ustring | param_key |
Glib::ustring | param_tooltip |
Inkscape::UI::Widget::Registry * | param_wr |
Glib::ustring | param_label |
bool | oncanvas_editable |
bool | widget_is_visible |
bool | widget_is_enabled |
Friends | |
class | PowerStrokePointArrayParamKnotHolderEntity |
Additional Inherited Members | |
![]() | |
void | writesvg (SVGOStringStream &str, std::vector< Geom::Point > const &vector) const |
void | writesvgData (SVGOStringStream &str, float const &vector_data) const |
void | writesvgData (SVGOStringStream &str, double const &vector_data) const |
void | writesvgData (SVGOStringStream &str, Glib::ustring const &vector_data) const |
void | writesvgData (SVGOStringStream &str, Geom::Point const &vector_data) const |
void | writesvgData (SVGOStringStream &str, std::shared_ptr< SatelliteReference > const &vector_data) const |
void | writesvgData (SVGOStringStream &str, std::vector< NodeSatellite > const &vector_data) const |
Geom::Point | readsvg (char const *str) |
double | readsvg (char const *const str) |
float | readsvg (char const *const str) |
Glib::ustring | readsvg (char const *const str) |
Geom::Point | readsvg (char const *const str) |
std::shared_ptr< SatelliteReference > | readsvg (char const *const str) |
std::vector< NodeSatellite > | readsvg (char const *const str) |
![]() | |
void | param_write_to_repr (const char *svgd) |
![]() | |
std::vector< Geom::Point > | _vector |
std::size_t | _default_size |
![]() | |
bool | _updating = false |
Inkscape::Display::TemporaryItem * | ownerlocator = nullptr |
Effect * | param_effect |
Definition at line 24 of file powerstrokepointarray.h.
Inkscape::LivePathEffect::PowerStrokePointArrayParam::PowerStrokePointArrayParam | ( | const Glib::ustring & | label, |
const Glib::ustring & | tip, | ||
const Glib::ustring & | key, | ||
Inkscape::UI::Widget::Registry * | wr, | ||
Effect * | effect | ||
) |
Definition at line 32 of file powerstrokepointarray.cpp.
|
overridedefault |
|
delete |
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Parameter.
Definition at line 356 of file powerstrokepointarray.cpp.
References Inkscape::LivePathEffect::ArrayParam< Geom::Point >::_vector, KnotHolder::add(), Inkscape::CANVAS_ITEM_CTRL_TYPE_LPE, KnotHolderEntity::create(), item, knot_color, and PowerStrokePointArrayParamKnotHolderEntity.
|
inline |
Definition at line 51 of file powerstrokepointarray.h.
References last_pwd2.
Referenced by knot_get(), and Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_set().
|
inline |
Definition at line 52 of file powerstrokepointarray.h.
References last_pwd2_normal.
Referenced by knot_get(), and Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_set().
Geom::Point Inkscape::LivePathEffect::PowerStrokePointArrayParam::knot_get | ( | size_t | index | ) |
Definition at line 83 of file powerstrokepointarray.cpp.
References _scale_width, Inkscape::LivePathEffect::ArrayParam< Geom::Point >::_vector, get_pwd2(), get_pwd2_normal(), index, Geom::infinity(), Geom::path_from_piecewise(), Geom::Piecewise< T >::valueAt(), Geom::X, and Geom::Y.
Referenced by Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_get(), and knot_reposition().
Geom::Point Inkscape::LivePathEffect::PowerStrokePointArrayParam::knot_reposition | ( | size_t | index, |
Geom::PathVector | pathv | ||
) |
Definition at line 113 of file powerstrokepointarray.cpp.
References Inkscape::LivePathEffect::ArrayParam< Geom::Point >::_vector, index, knot_get(), Geom::PathVector::nearestTime(), Inkscape::LivePathEffect::sp_calculate_origin(), and Geom::X.
Referenced by recalculate_controlpoints().
float Inkscape::LivePathEffect::PowerStrokePointArrayParam::median_width | ( | ) |
Definition at line 147 of file powerstrokepointarray.cpp.
References Inkscape::LivePathEffect::ArrayParam< Geom::Point >::_vector, and Inkscape::size.
Referenced by Inkscape::LivePathEffect::LPEPowerStroke::doOnRemove().
|
delete |
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::ArrayParam< Geom::Point >.
Definition at line 44 of file powerstrokepointarray.cpp.
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Parameter.
Definition at line 49 of file powerstrokepointarray.cpp.
References Inkscape::LivePathEffect::ArrayParam< Geom::Point >::_vector, Geom::Affine::descrim(), Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), Inkscape::LivePathEffect::ArrayParam< Geom::Point >::param_set_and_write_new_value(), result, Geom::X, and Geom::Y.
Referenced by Inkscape::LivePathEffect::LPEPowerStroke::transform_multiply().
|
inlineoverride |
Definition at line 48 of file powerstrokepointarray.h.
|
inlineoverridevirtual |
Reimplemented from Inkscape::LivePathEffect::ArrayParam< Geom::Point >.
Definition at line 58 of file powerstrokepointarray.h.
References Inkscape::LivePathEffect::POWERSTROKE_POINT_ARRAY.
|
inlineoverridevirtual |
Reimplemented from Inkscape::LivePathEffect::Parameter.
Definition at line 46 of file powerstrokepointarray.h.
void Inkscape::LivePathEffect::PowerStrokePointArrayParam::recalculate_controlpoints | ( | Geom::PathVector | pv | ) |
call this method to recalculate the controlpoints such that they stay at the same location relative to the new path.
Useful after adding/deleting nodes to the path.
Definition at line 69 of file powerstrokepointarray.cpp.
References Inkscape::LivePathEffect::ArrayParam< Geom::Point >::_vector, index, knot_reposition(), last_pwd2, Inkscape::LivePathEffect::Parameter::param_effect, Geom::path_from_piecewise(), and Inkscape::LivePathEffect::Parameter::write_to_SVG().
Referenced by Inkscape::LivePathEffect::LPEPowerStroke::doEffect_path().
std::vector< Geom::Point > Inkscape::LivePathEffect::PowerStrokePointArrayParam::reverse_controlpoints | ( | bool | write | ) |
call this method to recalculate the controlpoints when path is reversed.
Definition at line 124 of file powerstrokepointarray.cpp.
References Inkscape::LivePathEffect::ArrayParam< Geom::Point >::_vector, Geom::Piecewise< T >::empty(), last_pwd2, Geom::nearest_time(), Geom::reverse(), Geom::Piecewise< T >::valueAt(), Inkscape::LivePathEffect::Parameter::write_to_SVG(), Geom::X, and Geom::Y.
void Inkscape::LivePathEffect::PowerStrokePointArrayParam::set_oncanvas_looks | ( | CanvasItemCtrlShape | shape, |
uint32_t | color | ||
) |
Definition at line 169 of file powerstrokepointarray.cpp.
References knot_color, and knot_shape.
void Inkscape::LivePathEffect::PowerStrokePointArrayParam::set_pwd2 | ( | Geom::Piecewise< Geom::D2< Geom::SBasis > > const & | pwd2_in, |
Geom::Piecewise< Geom::D2< Geom::SBasis > > const & | pwd2_normal_in | ||
) |
Definition at line 163 of file powerstrokepointarray.cpp.
References last_pwd2, and last_pwd2_normal.
Referenced by Inkscape::LivePathEffect::LPEPowerStroke::doEffect_path().
|
inline |
Definition at line 56 of file powerstrokepointarray.h.
References _scale_width.
Referenced by Inkscape::LivePathEffect::LPEPowerStroke::doBeforeEffect(), and Inkscape::LivePathEffect::LPEPowerStroke::doOnApply().
|
friend |
Definition at line 59 of file powerstrokepointarray.h.
Referenced by addKnotHolderEntities().
double Inkscape::LivePathEffect::PowerStrokePointArrayParam::_scale_width |
Definition at line 57 of file powerstrokepointarray.h.
Referenced by knot_get(), Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_set(), and set_scale_width().
size_t Inkscape::LivePathEffect::PowerStrokePointArrayParam::current_path = Glib::ustring::npos |
Definition at line 61 of file powerstrokepointarray.h.
Referenced by Inkscape::LivePathEffect::LPEPowerStroke::doEffect_path(), Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_set(), and Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_ungrabbed().
|
private |
Definition at line 64 of file powerstrokepointarray.h.
Referenced by addKnotHolderEntities(), Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_click(), and set_oncanvas_looks().
|
private |
Definition at line 63 of file powerstrokepointarray.h.
Referenced by set_oncanvas_looks().
|
private |
Definition at line 66 of file powerstrokepointarray.h.
Referenced by get_pwd2(), recalculate_controlpoints(), reverse_controlpoints(), and set_pwd2().
|
private |
Definition at line 67 of file powerstrokepointarray.h.
Referenced by get_pwd2_normal(), and set_pwd2().
bool Inkscape::LivePathEffect::PowerStrokePointArrayParam::unplaced = false |
Definition at line 60 of file powerstrokepointarray.h.
Referenced by Inkscape::LivePathEffect::LPEPowerStroke::doEffect_path(), Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_set(), and Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_ungrabbed().