Inkscape
Vector Graphics Editor
|
#include <path.h>
Public Member Functions | |
PathParam (const Glib::ustring &label, const Glib::ustring &tip, const Glib::ustring &key, Inkscape::UI::Widget::Registry *wr, Effect *effect, const gchar *default_value="M0,0 L1,1") | |
~PathParam () override | |
Geom::PathVector const & | get_pathvector () const |
void | reload () |
Geom::Affine | get_relative_affine () |
Geom::Piecewise< Geom::D2< Geom::SBasis > > const & | get_pwd2 () |
Gtk::Widget * | param_newWidget () override |
std::vector< SPObject * > | param_get_satellites () override |
bool | param_readSVGValue (const gchar *strvalue) override |
Glib::ustring | param_getSVGValue () const override |
Glib::ustring | param_getDefaultSVGValue () const override |
void | param_set_default () override |
void | param_update_default (const gchar *default_value) override |
void | param_set_and_write_default () |
void | set_new_value (Geom::PathVector const &newpath, bool write_to_svg) |
void | set_new_value (Geom::Piecewise< Geom::D2< Geom::SBasis > > const &newpath, bool write_to_svg) |
void | set_buttons (bool edit_button, bool copy_button, bool paste_button, bool link_button) |
void | param_editOncanvas (SPItem *item, SPDesktop *dt) override |
void | param_setup_nodepath (Inkscape::NodePath::Path *np) override |
void | addCanvasIndicators (SPLPEItem const *lpeitem, std::vector< Geom::PathVector > &hp_vec) override |
void | param_transform_multiply (Geom::Affine const &postmul, bool set) override |
void | setFromOriginalD (bool from_original_d) |
SPItem * | getItem () const |
void | paste_param_path (const char *svgd) |
void | on_paste_button_click () |
void | linkitem (Glib::ustring pathid) |
ParamType | paramType () const override |
![]() | |
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 bool | param_readSVGValue (char const *strvalue)=0 |
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 |
virtual void | param_update_default (char const *default_value)=0 |
Glib::ustring const * | param_getTooltip () const |
virtual bool | providesKnotHolderEntities () const |
virtual void | addKnotHolderEntities (KnotHolder *, SPItem *) |
void | param_higlight (bool highlight) |
void | change_selection (Inkscape::Selection *selection) |
void | update_satellites () |
EffectType | effectType () const |
void | connect_selection_changed () |
Public Attributes | |
sigc::signal< void()> | signal_path_pasted |
sigc::signal< void()> | signal_path_changed |
bool | changed |
![]() | |
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 |
Protected Member Functions | |
void | ensure_pwd2 () |
void | ref_changed (SPObject *old_ref, SPObject *new_ref) |
void | unlink () |
void | start_listening (SPObject *to) |
void | quit_listening () |
void | linked_deleted (SPObject *deleted) |
void | linked_modified (SPObject *linked_obj, guint flags) |
void | linked_transformed (Geom::Affine const *rel_transf, SPItem *moved_item) |
virtual void | linked_modified_callback (SPObject *linked_obj, guint flags) |
void | on_edit_button_click () |
void | on_copy_button_click () |
void | on_link_button_click () |
void | emit_changed () |
![]() | |
void | param_write_to_repr (const char *svgd) |
Protected Attributes | |
Geom::PathVector | _pathvector |
Geom::Piecewise< Geom::D2< Geom::SBasis > > | _pwd2 |
bool | must_recalculate_pwd2 |
gchar * | href |
PathReference | ref |
sigc::connection | ref_changed_connection |
sigc::connection | linked_deleted_connection |
sigc::connection | linked_modified_connection |
sigc::connection | linked_transformed_connection |
gchar * | defvalue |
bool | _from_original_d |
![]() | |
bool | _updating = false |
Inkscape::Display::TemporaryItem * | ownerlocator = nullptr |
Effect * | param_effect |
Private Member Functions | |
PathParam (const PathParam &)=delete | |
PathParam & | operator= (const PathParam &)=delete |
Private Attributes | |
bool | _edit_button |
bool | _copy_button |
bool | _paste_button |
bool | _link_button |
Friends | |
class | LPEFillBetweenStrokes |
class | LPEPatternAlongPath |
class | LPEBendPath |
class | LPECurveStitch |
class | LPEAttachPath |
class | LPEEnvelope |
class | LPEBoundingBox |
class | LPEInterpolate |
class | LPEVonKoch |
Inkscape::LivePathEffect::PathParam::PathParam | ( | const Glib::ustring & | label, |
const Glib::ustring & | tip, | ||
const Glib::ustring & | key, | ||
Inkscape::UI::Widget::Registry * | wr, | ||
Effect * | effect, | ||
const gchar * | default_value = "M0,0 L1,1" |
||
) |
Definition at line 47 of file path.cpp.
References _copy_button, _edit_button, _from_original_d, _link_button, _paste_button, Inkscape::URIReference::changedSignal(), defvalue, Inkscape::LivePathEffect::Parameter::oncanvas_editable, param_readSVGValue(), ref, ref_changed(), and ref_changed_connection.
|
override |
Definition at line 69 of file path.cpp.
References defvalue, quit_listening(), and unlink().
|
privatedelete |
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Parameter.
Definition at line 314 of file path.cpp.
References _pathvector.
|
protected |
Definition at line 402 of file path.cpp.
References changed, and signal_path_changed.
Referenced by linked_modified_callback(), param_readSVGValue(), set_new_value(), and set_new_value().
|
protected |
Definition at line 389 of file path.cpp.
References _pathvector, _pwd2, Geom::Piecewise< T >::clear(), Geom::Piecewise< T >::concat(), and must_recalculate_pwd2.
Referenced by get_pwd2().
Geom::PathVector const & Inkscape::LivePathEffect::PathParam::get_pathvector | ( | ) | const |
Definition at line 99 of file path.cpp.
References _pathvector.
Referenced by Inkscape::UI::PathManipulator::_getGeometry(), Inkscape::UI::PathManipulator::_setGeometry(), Inkscape::LivePathEffect::LPEInterpolate::calculate_trajectory(), Inkscape::LivePathEffect::LPEVonKoch::doBeforeEffect(), Inkscape::LivePathEffect::LPEPatternAlongPath::doBeforeEffect(), Inkscape::LivePathEffect::LPEAttachPath::doEffect(), Inkscape::LivePathEffect::LPEFillBetweenStrokes::doEffect(), Inkscape::LivePathEffect::LPEInterpolate::doEffect_path(), Inkscape::LivePathEffect::LPEVonKoch::doEffect_path(), Inkscape::LivePathEffect::LPEEnvelope::doEffect_pwd2(), and Inkscape::LivePathEffect::LPEPatternAlongPath::doEffect_pwd2().
Geom::Piecewise< Geom::D2< Geom::SBasis > > const & Inkscape::LivePathEffect::PathParam::get_pwd2 | ( | ) |
Definition at line 105 of file path.cpp.
References _pwd2, and ensure_pwd2().
Referenced by Inkscape::LivePathEffect::LPECurveStitch::doEffect_path(), Inkscape::LivePathEffect::LPEBendPath::doEffect_pwd2(), Inkscape::LivePathEffect::LPEEnvelope::doEffect_pwd2(), and Inkscape::LivePathEffect::LPEPatternAlongPath::doEffect_pwd2().
Geom::Affine Inkscape::LivePathEffect::PathParam::get_relative_affine | ( | ) |
Definition at line 86 of file path.cpp.
References Inkscape::LivePathEffect::Effect::getCurrrentLPEItems(), getItem(), SPItem::getRelativeTransform(), Geom::identity(), item, Inkscape::LivePathEffect::Parameter::param_effect, and Inkscape::LivePathEffect::Effect::sp_lpe_item.
Referenced by Inkscape::LivePathEffect::LPEInterpolate::calculate_trajectory(), Inkscape::LivePathEffect::LPECurveStitch::doEffect_path(), Inkscape::LivePathEffect::LPEVonKoch::doEffect_path(), Inkscape::LivePathEffect::LPEBendPath::doEffect_pwd2(), Inkscape::LivePathEffect::LPEEnvelope::doEffect_pwd2(), and Inkscape::LivePathEffect::LPEPatternAlongPath::doEffect_pwd2().
|
inline |
Definition at line 63 of file path.h.
References Inkscape::LivePathEffect::PathReference::getObject(), Inkscape::URIReference::isAttached(), and ref.
Referenced by get_relative_affine(), reload(), and Inkscape::LivePathEffect::LPEBendPath::transform_multiply().
|
protected |
Definition at line 451 of file path.cpp.
References _pathvector, quit_listening(), and set_new_value().
Referenced by start_listening().
|
protected |
Definition at line 458 of file path.cpp.
References linked_modified_callback().
Referenced by start_listening().
|
protectedvirtual |
Definition at line 473 of file path.cpp.
References _from_original_d, _pathvector, Inkscape::LivePathEffect::Parameter::_updating, defvalue, emit_changed(), Geom::PathVector::empty(), Inkscape::LivePathEffect::Effect::getLPEObj(), Inkscape::LivePathEffect::Effect::is_load, Inkscape::LivePathEffect::Effect::isReady(), must_recalculate_pwd2, Inkscape::LivePathEffect::Parameter::ownerlocator, Inkscape::LivePathEffect::Parameter::param_effect, ptr_to_opt(), SPObject::requestModified(), and sp_svg_read_pathv().
Referenced by linked_modified(), linked_transformed(), and param_readSVGValue().
|
protected |
Definition at line 467 of file path.cpp.
References linked_modified_callback().
Referenced by start_listening().
void Inkscape::LivePathEffect::PathParam::linkitem | ( | Glib::ustring | pathid | ) |
Definition at line 574 of file path.cpp.
References href, Inkscape::LivePathEffect::Effect::makeUndoDone(), Inkscape::LivePathEffect::Parameter::param_effect, and Inkscape::LivePathEffect::Parameter::param_write_to_repr().
Referenced by on_link_button_click().
|
protected |
Definition at line 567 of file path.cpp.
References Inkscape::UI::ClipboardManager::copyPathParameter(), and Inkscape::UI::ClipboardManager::get().
Referenced by param_newWidget().
|
protected |
Definition at line 528 of file path.cpp.
References item, and param_editOncanvas().
Referenced by param_newWidget().
|
protected |
Definition at line 595 of file path.cpp.
References Inkscape::UI::ClipboardManager::get(), Inkscape::UI::ClipboardManager::getShapeOrTextObjectId(), and linkitem().
Referenced by Inkscape::LivePathEffect::OriginalPathParam::param_newWidget(), and param_newWidget().
void Inkscape::LivePathEffect::PathParam::on_paste_button_click | ( | ) |
Definition at line 558 of file path.cpp.
References Inkscape::UI::ClipboardManager::get(), Inkscape::UI::ClipboardManager::getPathParameter(), Inkscape::LivePathEffect::Effect::makeUndoDone(), Inkscape::LivePathEffect::Parameter::param_effect, and paste_param_path().
Referenced by param_newWidget().
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Parameter.
Definition at line 274 of file path.cpp.
References _pathvector, Inkscape::UI::ShapeRecord::edit_transform, Geom::PathVector::empty(), SPDesktop::getDocument(), Inkscape::LivePathEffect::Effect::getLPEObj(), Inkscape::LivePathEffect::PathReference::getObject(), SPDesktop::getTool(), href, SPItem::i2dt_affine(), item, Inkscape::UI::ShapeRecord::lpe_key, Inkscape::UI::ShapeRecord::object, Inkscape::LivePathEffect::Parameter::param_effect, Inkscape::LivePathEffect::Parameter::param_key, Inkscape::LivePathEffect::Parameter::param_write_to_repr(), ref, Inkscape::UI::ShapeRecord::role, set_active_tool(), and sp_svg_write_path().
Referenced by on_edit_button_click().
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Parameter.
Definition at line 123 of file path.cpp.
References Inkscape::LivePathEffect::PathReference::getObject(), Inkscape::URIReference::isAttached(), linked_transformed_connection, ref, and Inkscape::LivePathEffect::Parameter::write_to_SVG().
|
overridevirtual |
Implements Inkscape::LivePathEffect::Parameter.
Definition at line 206 of file path.cpp.
References defvalue.
|
overridevirtual |
Implements Inkscape::LivePathEffect::Parameter.
Definition at line 196 of file path.cpp.
References _pathvector, href, and sp_svg_write_path().
Referenced by param_readSVGValue().
|
overridevirtual |
Implements Inkscape::LivePathEffect::Parameter.
Definition at line 221 of file path.cpp.
References _copy_button, _edit_button, _link_button, _paste_button, on_copy_button_click(), on_edit_button_click(), on_link_button_click(), on_paste_button_click(), Inkscape::UI::pack_start(), Inkscape::LivePathEffect::Parameter::param_label, Inkscape::LivePathEffect::Parameter::param_tooltip, and sp_get_icon_image().
|
override |
Definition at line 142 of file path.cpp.
References _pathvector, SPObject::_tmpsuccessor, Inkscape::URIReference::attach(), Geom::PathVector::clear(), defvalue, Inkscape::URIReference::detach(), emit_changed(), SPObject::getId(), Inkscape::LivePathEffect::PathReference::getObject(), SPDocument::getObjectByHref(), Inkscape::LivePathEffect::Effect::getSPDoc(), href, linked_modified_callback(), must_recalculate_pwd2, Inkscape::LivePathEffect::Parameter::param_effect, param_getSVGValue(), Inkscape::LivePathEffect::Parameter::param_write_to_repr(), ref, sp_svg_read_pathv(), and unlink().
Referenced by Inkscape::LivePathEffect::VonKochRefPathParam::param_readSVGValue(), param_set_default(), and PathParam().
void Inkscape::LivePathEffect::PathParam::param_set_and_write_default | ( | ) |
Definition at line 118 of file path.cpp.
References defvalue, and Inkscape::LivePathEffect::Parameter::param_write_to_repr().
Referenced by Inkscape::LivePathEffect::LPECurveStitch::resetDefaults(), Inkscape::LivePathEffect::LPEInterpolate::resetDefaults(), and set_new_value().
|
overridevirtual |
Implements Inkscape::LivePathEffect::Parameter.
Definition at line 112 of file path.cpp.
References defvalue, and param_readSVGValue().
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Parameter.
Reimplemented in Inkscape::LivePathEffect::VonKochPathParam, and Inkscape::LivePathEffect::VonKochRefPathParam.
Definition at line 308 of file path.cpp.
Referenced by Inkscape::LivePathEffect::VonKochPathParam::param_setup_nodepath(), and Inkscape::LivePathEffect::VonKochRefPathParam::param_setup_nodepath().
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Parameter.
Definition at line 323 of file path.cpp.
References _pathvector, href, and set_new_value().
Referenced by Inkscape::LivePathEffect::LPEBendPath::transform_multiply(), Inkscape::LivePathEffect::LPEEnvelope::transform_multiply(), Inkscape::LivePathEffect::LPEInterpolate::transform_multiply(), and Inkscape::LivePathEffect::LPEPatternAlongPath::transform_multiply().
|
override |
|
inlineoverridevirtual |
Implements Inkscape::LivePathEffect::Parameter.
Definition at line 67 of file path.h.
References Inkscape::LivePathEffect::PATH.
void Inkscape::LivePathEffect::PathParam::paste_param_path | ( | const char * | svgd | ) |
Definition at line 537 of file path.cpp.
References SPItem::i2doc_affine(), Geom::Affine::inverse(), item, Inkscape::LivePathEffect::Parameter::param_write_to_repr(), signal_path_pasted, sp_svg_read_pathv(), sp_svg_write_path(), and unlink().
Referenced by on_paste_button_click().
|
protected |
Definition at line 424 of file path.cpp.
References linked_deleted_connection, linked_modified_connection, and linked_transformed_connection.
Referenced by linked_deleted(), ref_changed(), start_listening(), and ~PathParam().
|
protected |
Definition at line 432 of file path.cpp.
References quit_listening(), and start_listening().
Referenced by PathParam().
void Inkscape::LivePathEffect::PathParam::reload | ( | ) |
Definition at line 75 of file path.cpp.
References Inkscape::LivePathEffect::Parameter::connect_selection_changed(), getItem(), item, SPObject::requestDisplayUpdate(), Inkscape::LivePathEffect::Parameter::setUpdating(), and start_listening().
Referenced by Inkscape::LivePathEffect::LPEBendPath::doBeforeEffect(), Inkscape::LivePathEffect::LPEEnvelope::doBeforeEffect(), Inkscape::LivePathEffect::LPEPatternAlongPath::doBeforeEffect(), Inkscape::LivePathEffect::LPECurveStitch::doEffect_path(), Inkscape::LivePathEffect::LPEInterpolate::doEffect_path(), Inkscape::LivePathEffect::LPEVonKoch::doEffect_path(), Inkscape::LivePathEffect::LPEBendPath::doOnOpen(), Inkscape::LivePathEffect::LPECurveStitch::doOnOpen(), Inkscape::LivePathEffect::LPEEnvelope::doOnOpen(), Inkscape::LivePathEffect::LPEInterpolate::doOnOpen(), Inkscape::LivePathEffect::LPEPatternAlongPath::doOnOpen(), and Inkscape::LivePathEffect::LPEVonKoch::doOnOpen().
void Inkscape::LivePathEffect::PathParam::set_buttons | ( | bool | edit_button, |
bool | copy_button, | ||
bool | paste_button, | ||
bool | link_button | ||
) |
Definition at line 212 of file path.cpp.
References _copy_button, _edit_button, _link_button, and _paste_button.
void Inkscape::LivePathEffect::PathParam::set_new_value | ( | Geom::PathVector const & | newpath, |
bool | write_to_svg | ||
) |
Definition at line 370 of file path.cpp.
References _pathvector, emit_changed(), Geom::PathVector::empty(), must_recalculate_pwd2, param_set_and_write_default(), Inkscape::LivePathEffect::Parameter::param_write_to_repr(), sp_svg_write_path(), and unlink().
Referenced by Inkscape::UI::PathManipulator::_setGeometry(), Inkscape::LivePathEffect::LPEVonKoch::doBeforeEffect(), linked_deleted(), param_transform_multiply(), Inkscape::LivePathEffect::LPEBendPath::resetDefaults(), Inkscape::LivePathEffect::LPECurveStitch::resetDefaults(), Inkscape::LivePathEffect::LPEEnvelope::resetDefaults(), Inkscape::LivePathEffect::LPEInterpolate::resetDefaults(), and Inkscape::LivePathEffect::LPEVonKoch::resetDefaults().
void Inkscape::LivePathEffect::PathParam::set_new_value | ( | Geom::Piecewise< Geom::D2< Geom::SBasis > > const & | newpath, |
bool | write_to_svg | ||
) |
Definition at line 335 of file path.cpp.
References _pathvector, _pwd2, emit_changed(), Inkscape::LivePathEffect::Effect::isOnClipboard(), must_recalculate_pwd2, Inkscape::LivePathEffect::Parameter::param_effect, Inkscape::LivePathEffect::Parameter::param_write_to_repr(), Geom::path_from_piecewise(), sp_svg_write_path(), and unlink().
|
inline |
Definition at line 57 of file path.h.
References _from_original_d.
|
protected |
Definition at line 409 of file path.cpp.
References SPObject::connectDelete(), SPObject::connectModified(), linked_deleted(), linked_deleted_connection, linked_modified(), linked_modified_connection, linked_transformed(), linked_transformed_connection, and quit_listening().
Referenced by Inkscape::LivePathEffect::LPEAttachPath::doBeforeEffect(), Inkscape::LivePathEffect::LPEFillBetweenStrokes::doBeforeEffect(), Inkscape::LivePathEffect::LPEAttachPath::doOnOpen(), Inkscape::LivePathEffect::LPEFillBetweenStrokes::doOnOpen(), ref_changed(), and reload().
|
protected |
Definition at line 440 of file path.cpp.
References Inkscape::URIReference::detach(), href, and ref.
Referenced by param_readSVGValue(), paste_param_path(), set_new_value(), set_new_value(), and ~PathParam().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
Definition at line 110 of file path.h.
Referenced by param_newWidget(), PathParam(), and set_buttons().
|
private |
Definition at line 109 of file path.h.
Referenced by param_newWidget(), PathParam(), and set_buttons().
|
protected |
Definition at line 107 of file path.h.
Referenced by linked_modified_callback(), Inkscape::LivePathEffect::OriginalPathParam::OriginalPathParam(), PathParam(), and setFromOriginalD().
|
private |
Definition at line 112 of file path.h.
Referenced by param_newWidget(), PathParam(), and set_buttons().
|
private |
Definition at line 111 of file path.h.
Referenced by param_newWidget(), PathParam(), and set_buttons().
|
protected |
Definition at line 70 of file path.h.
Referenced by addCanvasIndicators(), ensure_pwd2(), get_pathvector(), linked_deleted(), linked_modified_callback(), param_editOncanvas(), param_getSVGValue(), Inkscape::LivePathEffect::VonKochRefPathParam::param_readSVGValue(), param_readSVGValue(), param_transform_multiply(), set_new_value(), and set_new_value().
|
protected |
Definition at line 72 of file path.h.
Referenced by ensure_pwd2(), get_pwd2(), and set_new_value().
bool Inkscape::LivePathEffect::PathParam::changed |
Definition at line 61 of file path.h.
Referenced by Inkscape::LivePathEffect::LPEBendPath::doEffect_pwd2(), and emit_changed().
|
protected |
Definition at line 106 of file path.h.
Referenced by linked_modified_callback(), param_getDefaultSVGValue(), param_readSVGValue(), param_set_and_write_default(), param_set_default(), param_update_default(), PathParam(), and ~PathParam().
|
protected |
Definition at line 76 of file path.h.
Referenced by linkitem(), Inkscape::LivePathEffect::OriginalPathParam::linksToPath(), param_editOncanvas(), param_getSVGValue(), param_readSVGValue(), param_transform_multiply(), and unlink().
|
protected |
Definition at line 88 of file path.h.
Referenced by quit_listening(), and start_listening().
|
protected |
Definition at line 89 of file path.h.
Referenced by quit_listening(), and start_listening().
|
protected |
Definition at line 90 of file path.h.
Referenced by param_get_satellites(), quit_listening(), and start_listening().
|
protected |
Definition at line 73 of file path.h.
Referenced by ensure_pwd2(), linked_modified_callback(), param_readSVGValue(), set_new_value(), and set_new_value().
|
protected |
Definition at line 77 of file path.h.
Referenced by getItem(), Inkscape::LivePathEffect::OriginalPathParam::getObject(), Inkscape::LivePathEffect::OriginalPathParam::on_select_original_button_click(), param_editOncanvas(), param_get_satellites(), param_readSVGValue(), PathParam(), and unlink().
|
protected |
Definition at line 87 of file path.h.
Referenced by PathParam().
sigc::signal<void ()> Inkscape::LivePathEffect::PathParam::signal_path_changed |
Definition at line 60 of file path.h.
Referenced by emit_changed().
sigc::signal<void ()> Inkscape::LivePathEffect::PathParam::signal_path_pasted |
Definition at line 59 of file path.h.
Referenced by paste_param_path().