Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::SnappedLine Class Reference

Class describing the result of an attempt to snap to a line. More...

#include <snapped-line.h>

Inheritance diagram for Inkscape::SnappedLine:
Inkscape::SnappedPoint

Public Member Functions

 SnappedLine ()
 
 SnappedLine (Geom::Point const &snapped_point, Geom::Coord const &snapped_distance, SnapSourceType const &source, long source_num, SnapTargetType const &target, Geom::Coord const &snapped_tolerance, bool const &always_snap, Geom::Point const &normal_to_line, Geom::Point const &point_on_line)
 
 ~SnappedLine ()
 
Inkscape::SnappedPoint intersect (SnappedLine const &line) const
 
Geom::Point getNormal () const
 
Geom::Point getPointOnLine () const
 
Geom::Coord getConstTerm () const
 
Geom::Line getLine () const
 
- Public Member Functions inherited from Inkscape::SnappedPoint
 SnappedPoint ()
 
 SnappedPoint (Geom::Point const &p)
 
 SnappedPoint (Geom::Point const &p, SnapSourceType const &source, long source_num, SnapTargetType const &target, Geom::Coord const &d, Geom::Coord const &t, bool const &a, bool const &at_intersection, bool const &constrained_snap, bool const &fully_constrained, Geom::Coord const &d2, Geom::Coord const &t2, bool const &a2)
 
 SnappedPoint (Geom::Point const &p, SnapSourceType const &source, long source_num, SnapTargetType const &target, Geom::Coord const &d, Geom::Coord const &t, bool const &a, bool const &constrained_snap, bool const &fully_constrained, Geom::OptRect target_bbox=Geom::OptRect())
 
 SnappedPoint (Geom::Point const &p, Geom::Point const &ap, SnapSourceType const &source, long source_num, SnapTargetType const &target, Geom::Coord const &d, Geom::Coord const &t, bool const &a, bool const &constrained_snap, bool const &fully_constrained, Geom::OptRect target_bbox)
 
 SnappedPoint (Geom::Point const &p, Geom::Point const &ap, Geom::Point const &ap2, SnapSourceType const &source, long source_num, SnapTargetType const &target, Geom::Coord const &d, Geom::Coord const &t, bool const &a, bool const &constrained_snap, bool const &fully_constrained, Geom::OptRect target_bbox)
 
 SnappedPoint (Geom::Point const &p, std::vector< Geom::Rect > const &bboxes, Geom::Rect const &source_bbox, Geom::Coord equal_dist, SnapSourceType const &source, long source_num, SnapTargetType const &target, Geom::Coord const &d, Geom::Coord const &t, bool const &a, bool const &constrained_snap, bool const &fully_constrained)
 
 SnappedPoint (Geom::Point const &p, std::vector< Geom::Rect > const &bboxes, std::vector< Geom::Rect > const &bboxes2, Geom::Rect const &source_bbox, Geom::Coord equal_dist, Geom::Coord equal_dist2, SnapSourceType const &source, long source_num, SnapTargetType const &target, Geom::Coord const &d, Geom::Coord const &t, bool const &a, bool const &constrained_snap, bool const &fully_constrained)
 
 SnappedPoint (SnapCandidatePoint const &p, SnapTargetType const &target, Geom::Coord const &d, Geom::Coord const &t, bool const &a, bool const &constrained_snap, bool const &fully_constrained)
 
 ~SnappedPoint ()
 
Geom::Coord getSnapDistance () const
 
void setSnapDistance (Geom::Coord const d)
 
Geom::Coord getTolerance () const
 
bool getAlwaysSnap () const
 
Geom::Coord getSecondSnapDistance () const
 
void setSecondSnapDistance (Geom::Coord const d)
 
Geom::Coord getSecondTolerance () const
 
bool getSecondAlwaysSnap () const
 
Geom::Coord getPointerDistance () const
 
void setPointerDistance (Geom::Coord const d)
 
std::vector< Geom::Rect > const & getBBoxes () const
 
std::vector< Geom::Rect > const & getBBoxes2 () const
 
void getPointIfSnapped (Geom::Point &p) const
 
Geom::Point getPoint () const
 
void setPoint (Geom::Point const &p)
 
void setAlignmentTarget (std::optional< Geom::Point > const &p)
 
void setAlignmentTarget2 (std::optional< Geom::Point > const &p)
 
Geom::Point getTangent () const
 
std::optional< Geom::PointgetAlignmentTarget () const
 
std::optional< Geom::PointgetAlignmentTarget2 () const
 
Geom::Coord getDistanceToAlignTarget () const
 
bool getAtIntersection () const
 
bool getFullyConstrained () const
 
bool getConstrainedSnap () const
 
bool getSnapped () const
 
void setTarget (SnapTargetType const target)
 
void setAlignmentTargetType (SnapTargetType const target)
 
SnapTargetType getTarget () const
 
SnapTargetType getAlignmentTargetType () const
 
bool getOnPath () const
 
void setTargetBBox (Geom::OptRect const target)
 
Geom::OptRect const getTargetBBox () const
 
Geom::OptRect const getSourceBBox () const
 
Geom::Coord getDistributionDistance () const
 
Geom::Coord getDistributionDistance2 () const
 
void setSource (SnapSourceType const source)
 
SnapSourceType getSource () const
 
long getSourceNum () const
 
bool isOtherSnapBetter (SnappedPoint const &other_one, bool weighted) const
 

Private Attributes

Geom::Point _normal_to_line
 
Geom::Point _point_on_line
 

Additional Inherited Members

- Protected Attributes inherited from Inkscape::SnappedPoint
Geom::Point _point
 
Geom::Point _tangent
 
std::optional< Geom::Point_alignment_target
 
std::optional< Geom::Point_alignment_target2
 
std::vector< Geom::Rect_distribution_bboxes
 
std::vector< Geom::Rect_distribution_bboxes2
 
SnapSourceType _source
 
long _source_num
 
SnapTargetType _target
 
std::optional< SnapTargetType_alignment_target_type
 
bool _at_intersection
 
bool _constrained_snap
 
bool _fully_constrained
 
Geom::Coord _distance
 
Geom::Coord _tolerance
 
bool _always_snap
 
Geom::Coord _second_distance
 
Geom::Coord _second_tolerance
 
Geom::Coord _equal_distance
 
Geom::Coord _equal_distance2
 
bool _second_always_snap
 
Geom::OptRect _target_bbox
 
Geom::OptRect _source_bbox
 
Geom::Coord _pointer_distance
 

Detailed Description

Class describing the result of an attempt to snap to a line.

Definition at line 39 of file snapped-line.h.

Constructor & Destructor Documentation

◆ SnappedLine() [1/2]

Inkscape::SnappedLine::SnappedLine ( )

◆ SnappedLine() [2/2]

◆ ~SnappedLine()

Inkscape::SnappedLine::~SnappedLine ( )
default

Member Function Documentation

◆ getConstTerm()

Geom::Coord Inkscape::SnappedLine::getConstTerm ( ) const
inline

Definition at line 50 of file snapped-line.h.

References _normal_to_line, _point_on_line, and dot().

◆ getLine()

Geom::Line Inkscape::SnappedLine::getLine ( ) const
inline

Definition at line 51 of file snapped-line.h.

References _normal_to_line, _point_on_line, and Geom::rot90().

Referenced by intersect(), and Inkscape::SnappedCurve::intersect().

◆ getNormal()

Geom::Point Inkscape::SnappedLine::getNormal ( ) const
inline

Definition at line 48 of file snapped-line.h.

References _normal_to_line.

◆ getPointOnLine()

Geom::Point Inkscape::SnappedLine::getPointOnLine ( ) const
inline

Definition at line 49 of file snapped-line.h.

References _point_on_line.

◆ intersect()

Member Data Documentation

◆ _normal_to_line

Geom::Point Inkscape::SnappedLine::_normal_to_line
private

Definition at line 54 of file snapped-line.h.

Referenced by getConstTerm(), getLine(), and getNormal().

◆ _point_on_line

Geom::Point Inkscape::SnappedLine::_point_on_line
private

Definition at line 55 of file snapped-line.h.

Referenced by getConstTerm(), getLine(), and getPointOnLine().


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