Inkscape
Vector Graphics Editor
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
Inkscape::SnapCandidatePoint Class Reference

Class to store data for points which are snap candidates, either as a source or as a target. More...

#include <snap-candidate.h>

Public Member Functions

 SnapCandidatePoint ()=default
 
 SnapCandidatePoint (Geom::Point const &point, Inkscape::SnapSourceType const source, long const source_num, Inkscape::SnapTargetType const target, Geom::OptRect bbox)
 
 SnapCandidatePoint (Geom::Point const &point, Inkscape::SnapSourceType const source, Inkscape::SnapTargetType const target)
 
 SnapCandidatePoint (Geom::Point const &point, Inkscape::SnapSourceType const source)
 
Geom::Point const & getPoint () const
 
Inkscape::SnapSourceType getSourceType () const
 
Inkscape::SnapTargetType getTargetType () const
 
bool isSingleHandle () const
 
long getSourceNum () const
 
void setSourceNum (long num)
 
void setDistance (Geom::Coord dist)
 
Geom::Coord getDistance ()
 
void addOrigin (Geom::Point pt)
 
void addVector (Geom::Point v)
 
std::vector< std::pair< Geom::Point, bool > > const & getOriginsAndVectors () const
 
bool operator< (const SnapCandidatePoint &other) const
 
Geom::OptRect const getTargetBBox () const
 
bool considerForAlignment () const
 
void setPoint (const Geom::Point &pt)
 
void movePoint (const Geom::Point &pt)
 

Private Attributes

Geom::Point _point
 
std::vector< std::pair< Geom::Point, bool > > _origins_and_vectors
 
Inkscape::SnapSourceType _source_type
 
Inkscape::SnapTargetType _target_type
 
long _source_num
 
Geom::OptRect _target_bbox
 
Geom::Coord _dist
 
bool _alignment
 

Detailed Description

Class to store data for points which are snap candidates, either as a source or as a target.

Definition at line 31 of file snap-candidate.h.

Constructor & Destructor Documentation

◆ SnapCandidatePoint() [1/4]

Inkscape::SnapCandidatePoint::SnapCandidatePoint ( )
default

◆ SnapCandidatePoint() [2/4]

Inkscape::SnapCandidatePoint::SnapCandidatePoint ( Geom::Point const &  point,
Inkscape::SnapSourceType const  source,
long const  source_num,
Inkscape::SnapTargetType const  target,
Geom::OptRect  bbox 
)
inline

Definition at line 36 of file snap-candidate.h.

◆ SnapCandidatePoint() [3/4]

Inkscape::SnapCandidatePoint::SnapCandidatePoint ( Geom::Point const &  point,
Inkscape::SnapSourceType const  source,
Inkscape::SnapTargetType const  target 
)
inline

Definition at line 47 of file snap-candidate.h.

References _source_num.

◆ SnapCandidatePoint() [4/4]

Inkscape::SnapCandidatePoint::SnapCandidatePoint ( Geom::Point const &  point,
Inkscape::SnapSourceType const  source 
)
inline

Definition at line 58 of file snap-candidate.h.

Member Function Documentation

◆ addOrigin()

◆ addVector()

void Inkscape::SnapCandidatePoint::addVector ( Geom::Point  v)
inline

Definition at line 81 of file snap-candidate.h.

References _origins_and_vectors.

Referenced by Inkscape::UI::Node::dragged(), and SnapManager::guideFreeSnap().

◆ considerForAlignment()

bool Inkscape::SnapCandidatePoint::considerForAlignment ( ) const
inline

◆ getDistance()

Geom::Coord Inkscape::SnapCandidatePoint::getDistance ( )
inline

Definition at line 78 of file snap-candidate.h.

References _dist.

◆ getOriginsAndVectors()

std::vector< std::pair< Geom::Point, bool > > const & Inkscape::SnapCandidatePoint::getOriginsAndVectors ( ) const
inline

◆ getPoint()

◆ getSourceNum()

◆ getSourceType()

◆ getTargetBBox()

Geom::OptRect const Inkscape::SnapCandidatePoint::getTargetBBox ( ) const
inline

Definition at line 85 of file snap-candidate.h.

References _target_bbox.

◆ getTargetType()

Inkscape::SnapTargetType Inkscape::SnapCandidatePoint::getTargetType ( ) const
inline

Definition at line 71 of file snap-candidate.h.

References _target_type.

◆ isSingleHandle()

bool Inkscape::SnapCandidatePoint::isSingleHandle ( ) const
inline

◆ movePoint()

void Inkscape::SnapCandidatePoint::movePoint ( const Geom::Point pt)
inline

Definition at line 90 of file snap-candidate.h.

References _point.

◆ operator<()

bool Inkscape::SnapCandidatePoint::operator< ( const SnapCandidatePoint other) const
inline

Definition at line 84 of file snap-candidate.h.

References _dist.

◆ setDistance()

void Inkscape::SnapCandidatePoint::setDistance ( Geom::Coord  dist)
inline

Definition at line 77 of file snap-candidate.h.

References _dist.

◆ setPoint()

void Inkscape::SnapCandidatePoint::setPoint ( const Geom::Point pt)
inline

Definition at line 89 of file snap-candidate.h.

References _point.

◆ setSourceNum()

void Inkscape::SnapCandidatePoint::setSourceNum ( long  num)
inline

Definition at line 75 of file snap-candidate.h.

References _source_num, and num.

Member Data Documentation

◆ _alignment

bool Inkscape::SnapCandidatePoint::_alignment
private

Definition at line 122 of file snap-candidate.h.

Referenced by considerForAlignment().

◆ _dist

Geom::Coord Inkscape::SnapCandidatePoint::_dist
private

Definition at line 119 of file snap-candidate.h.

Referenced by getDistance(), operator<(), and setDistance().

◆ _origins_and_vectors

std::vector<std::pair<Geom::Point, bool> > Inkscape::SnapCandidatePoint::_origins_and_vectors
private

Definition at line 101 of file snap-candidate.h.

Referenced by addOrigin(), addVector(), and getOriginsAndVectors().

◆ _point

Geom::Point Inkscape::SnapCandidatePoint::_point
private

Definition at line 94 of file snap-candidate.h.

Referenced by getPoint(), movePoint(), and setPoint().

◆ _source_num

long Inkscape::SnapCandidatePoint::_source_num
private

Definition at line 112 of file snap-candidate.h.

Referenced by getSourceNum(), isSingleHandle(), setSourceNum(), and SnapCandidatePoint().

◆ _source_type

Inkscape::SnapSourceType Inkscape::SnapCandidatePoint::_source_type
private

Definition at line 106 of file snap-candidate.h.

Referenced by getSourceType(), and isSingleHandle().

◆ _target_bbox

Geom::OptRect Inkscape::SnapCandidatePoint::_target_bbox
private

Definition at line 116 of file snap-candidate.h.

Referenced by getTargetBBox().

◆ _target_type

Inkscape::SnapTargetType Inkscape::SnapCandidatePoint::_target_type
private

Definition at line 107 of file snap-candidate.h.

Referenced by getTargetType().


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