Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::LivePathEffect::PointParam Class Referencefinal

#include <point.h>

Inheritance diagram for Inkscape::LivePathEffect::PointParam:
Geom::Point Inkscape::LivePathEffect::Parameter

Public Member Functions

 PointParam (const Glib::ustring &label, const Glib::ustring &tip, const Glib::ustring &key, Inkscape::UI::Widget::Registry *wr, Effect *effect, std::optional< Glib::ustring > handle_tip={}, Geom::Point default_value=Geom::Point(0, 0), bool live_update=true)
 
 ~PointParam () override
 
 PointParam (const PointParam &)=delete
 
PointParamoperator= (const PointParam &)=delete
 
Gtk::Widget * param_newWidget () final
 
bool param_readSVGValue (char const *strvalue) final
 
Glib::ustring param_getSVGValue () const final
 
Glib::ustring param_getDefaultSVGValue () const final
 
char consthandleTip () const
 
void param_setValue (Geom::Point newpoint, bool write=false)
 
void param_set_default () final
 
void param_hide_knot (bool hide)
 
Geom::Point param_get_default () const
 
void param_set_liveupdate (bool live_update)
 
void param_update_default (Geom::Point default_point)
 
void param_update_default (char const *default_point) final
 
void param_transform_multiply (Geom::Affine const &, bool set) final
 
void set_oncanvas_looks (Inkscape::CanvasItemCtrlShape shape, std::uint32_t color)
 
bool providesKnotHolderEntities () const final
 
void addKnotHolderEntities (KnotHolder *knotholder, SPItem *item) final
 
ParamType paramType () const final
 
- Public Member Functions inherited from Geom::Point
Coord operator[] (unsigned i) const
 
Coordoperator[] (unsigned i)
 
constexpr Coord operator[] (Dim2 d) const noexcept
 
constexpr Coordoperator[] (Dim2 d) noexcept
 
constexpr Coord x () const noexcept
 
constexpr Coordx () noexcept
 
constexpr Coord y () const noexcept
 
constexpr Coordy () noexcept
 
template<size_t I>
constexpr Coord get () const
 
template<size_t I>
constexpr Coordget ()
 
Coord length () const
 Compute the distance from origin.
 
constexpr Coord lengthSq () const
 
void normalize ()
 Normalize the vector representing the point.
 
Point normalized () const
 
constexpr Point ccw () const
 Return a point like this point but rotated -90 degrees.
 
constexpr Point cw () const
 Return a point like this point but rotated +90 degrees.
 
constexpr Point operator- () const
 
constexpr Pointoperator+= (Point const &o)
 
constexpr Pointoperator-= (Point const &o)
 
constexpr Pointoperator*= (Coord s)
 
constexpr Pointoperator*= (Point const &o)
 
constexpr Pointoperator*= (IntPoint const &o)
 
constexpr Pointoperator/= (Coord s)
 
constexpr Pointoperator/= (Point const &o)
 
constexpr Pointoperator/= (IntPoint const &o)
 
Pointoperator*= (Affine const &m)
 Transform the point by the specified matrix.
 
Pointoperator*= (Translate const &t)
 
Pointoperator*= (Scale const &s)
 
Pointoperator*= (Rotate const &r)
 
Pointoperator*= (HShear const &s)
 
Pointoperator*= (VShear const &s)
 
Pointoperator*= (Zoom const &z)
 
IntPoint round () const
 Round to nearest integer coordinates.
 
IntPoint floor () const
 Round coordinates downwards.
 
IntPoint ceil () const
 Round coordinates upwards.
 
bool isFinite () const
 Check whether both coordinates are finite.
 
constexpr bool isZero () const
 Check whether both coordinates are zero.
 
bool isNormalized (Coord eps=EPSILON) const
 Check whether the length of the vector is close to 1.
 
constexpr bool operator== (Point const &p) const
 Equality operator.
 
constexpr bool operator< (Point const &p) const
 Lexicographical ordering for points.
 
constexpr Point ()=default
 Construct a point at the origin.
 
constexpr Point (Coord x, Coord y)
 Construct a point from its coordinates.
 
constexpr Point (IntPoint const &p)
 Construct from integer point.
 
- Public Member Functions inherited from Inkscape::LivePathEffect::Parameter
 Parameter (Glib::ustring label, Glib::ustring tip, Glib::ustring key, Inkscape::UI::Widget::Registry *wr, Effect *effect)
 
virtual ~Parameter ()
 
 Parameter (const Parameter &)=delete
 
Parameteroperator= (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 ()
 

Private Member Functions

void on_value_changed ()
 

Private Attributes

Geom::Point defvalue
 
bool liveupdate
 
KnotHolderEntity_knot_entity = nullptr
 
Inkscape::CanvasItemCtrlShape knot_shape = Inkscape::CANVAS_ITEM_CTRL_SHAPE_DIAMOND
 
std::uint32_t knot_color = 0xffffff00
 
std::optional< Glib::ustring > handle_tip
 

Friends

class PointParamKnotHolderEntity
 

Additional Inherited Members

- Public Types inherited from Geom::Point
using D1Value = Coord
 
using D1Reference = Coord &
 
using D1ConstReference = Coord const &
 
- Static Public Member Functions inherited from Geom::Point
static Point polar (Coord angle, Coord radius)
 Construct a point from its polar coordinates.
 
static Point polar (Coord angle)
 Construct an unit vector from its angle.
 
- Public Attributes inherited from Inkscape::LivePathEffect::Parameter
sigc::scoped_connection selection_changed_connection
 
Glib::ustring param_key
 
Glib::ustring param_tooltip
 
Inkscape::UI::Widget::Registryparam_wr
 
Glib::ustring param_label
 
bool oncanvas_editable
 
bool widget_is_visible
 
bool widget_is_enabled
 
- Protected Member Functions inherited from Inkscape::LivePathEffect::Parameter
void param_write_to_repr (const char *svgd)
 
- Protected Attributes inherited from Inkscape::LivePathEffect::Parameter
bool _updating = false
 
Inkscape::Display::TemporaryItemownerlocator = nullptr
 
Effectparam_effect
 

Detailed Description

Definition at line 34 of file point.h.

Constructor & Destructor Documentation

◆ PointParam() [1/2]

Inkscape::LivePathEffect::PointParam::PointParam ( const Glib::ustring &  label,
const Glib::ustring &  tip,
const Glib::ustring &  key,
Inkscape::UI::Widget::Registry wr,
Effect effect,
std::optional< Glib::ustring >  handle_tip = {},
Geom::Point  default_value = Geom::Point(0,0),
bool  live_update = true 
)
Parameters
handle_tiptip for automatically associated on-canvas handle

Definition at line 28 of file point.cpp.

◆ ~PointParam()

Inkscape::LivePathEffect::PointParam::~PointParam ( )
override

Definition at line 39 of file point.cpp.

References _knot_entity, KnotHolderEntity::parent_holder, and KnotHolder::remove().

◆ PointParam() [2/2]

Inkscape::LivePathEffect::PointParam::PointParam ( const PointParam )
delete

Member Function Documentation

◆ addKnotHolderEntities()

void Inkscape::LivePathEffect::PointParam::addKnotHolderEntities ( KnotHolder knotholder,
SPItem item 
)
finalvirtual

◆ handleTip()

char const * Inkscape::LivePathEffect::PointParam::handleTip ( ) const
inline

Definition at line 54 of file point.h.

References handle_tip, and Inkscape::LivePathEffect::Parameter::param_tooltip.

◆ on_value_changed()

void Inkscape::LivePathEffect::PointParam::on_value_changed ( )
private

◆ operator=()

PointParam & Inkscape::LivePathEffect::PointParam::operator= ( const PointParam )
delete

◆ param_get_default()

Geom::Point Inkscape::LivePathEffect::PointParam::param_get_default ( ) const

Definition at line 59 of file point.cpp.

References defvalue.

Referenced by Inkscape::LivePathEffect::LPELattice2::doBeforeEffect().

◆ param_getDefaultSVGValue()

Glib::ustring Inkscape::LivePathEffect::PointParam::param_getDefaultSVGValue ( ) const
finalvirtual

Implements Inkscape::LivePathEffect::Parameter.

Definition at line 137 of file point.cpp.

References defvalue, and Inkscape::SVGOStringStream::str().

◆ param_getSVGValue()

Glib::ustring Inkscape::LivePathEffect::PointParam::param_getSVGValue ( ) const
finalvirtual

◆ param_hide_knot()

void Inkscape::LivePathEffect::PointParam::param_hide_knot ( bool  hide)

◆ param_newWidget()

◆ param_readSVGValue()

bool Inkscape::LivePathEffect::PointParam::param_readSVGValue ( char const strvalue)
finalvirtual

◆ param_set_default()

◆ param_set_liveupdate()

void Inkscape::LivePathEffect::PointParam::param_set_liveupdate ( bool  live_update)

Definition at line 53 of file point.cpp.

References liveupdate.

Referenced by Inkscape::LivePathEffect::LPELattice2::setDefaults().

◆ param_setValue()

◆ param_transform_multiply()

void Inkscape::LivePathEffect::PointParam::param_transform_multiply ( Geom::Affine const postmul,
bool  set 
)
finalvirtual

◆ param_update_default() [1/2]

void Inkscape::LivePathEffect::PointParam::param_update_default ( char const default_point)
finalvirtual

◆ param_update_default() [2/2]

◆ paramType()

ParamType Inkscape::LivePathEffect::PointParam::paramType ( ) const
inlinefinalvirtual

Implements Inkscape::LivePathEffect::Parameter.

Definition at line 73 of file point.h.

References Inkscape::LivePathEffect::POINT.

◆ providesKnotHolderEntities()

bool Inkscape::LivePathEffect::PointParam::providesKnotHolderEntities ( ) const
inlinefinalvirtual

Reimplemented from Inkscape::LivePathEffect::Parameter.

Definition at line 71 of file point.h.

◆ set_oncanvas_looks()

void Inkscape::LivePathEffect::PointParam::set_oncanvas_looks ( Inkscape::CanvasItemCtrlShape  shape,
std::uint32_t  color 
)

Friends And Related Symbol Documentation

◆ PointParamKnotHolderEntity

friend class PointParamKnotHolderEntity
friend

Definition at line 75 of file point.h.

Member Data Documentation

◆ _knot_entity

KnotHolderEntity* Inkscape::LivePathEffect::PointParam::_knot_entity = nullptr
private

Definition at line 82 of file point.h.

Referenced by param_hide_knot(), param_setValue(), and ~PointParam().

◆ defvalue

Geom::Point Inkscape::LivePathEffect::PointParam::defvalue
private

◆ handle_tip

std::optional<Glib::ustring> Inkscape::LivePathEffect::PointParam::handle_tip
private

Definition at line 85 of file point.h.

Referenced by handleTip().

◆ knot_color

std::uint32_t Inkscape::LivePathEffect::PointParam::knot_color = 0xffffff00
private

Definition at line 84 of file point.h.

Referenced by set_oncanvas_looks().

◆ knot_shape

Inkscape::CanvasItemCtrlShape Inkscape::LivePathEffect::PointParam::knot_shape = Inkscape::CANVAS_ITEM_CTRL_SHAPE_DIAMOND
private

Definition at line 83 of file point.h.

Referenced by set_oncanvas_looks().

◆ liveupdate

bool Inkscape::LivePathEffect::PointParam::liveupdate
private

Definition at line 81 of file point.h.

Referenced by param_set_liveupdate(), and param_setValue().


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