Inkscape
Vector Graphics Editor
|
Class describing the result of an attempt to snap to a line. More...
#include <snapped-line.h>
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 |
![]() | |
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::Point > | getAlignmentTarget () const |
std::optional< Geom::Point > | getAlignmentTarget2 () 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 | |
![]() | |
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 |
Class describing the result of an attempt to snap to a line.
Definition at line 39 of file snapped-line.h.
Inkscape::SnappedLine::SnappedLine | ( | ) |
Definition at line 105 of file snapped-line.cpp.
References Geom::infinity(), Inkscape::SNAPSOURCE_UNDEFINED, and Inkscape::SNAPTARGET_UNDEFINED.
Inkscape::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 | ||
) |
Definition at line 89 of file snapped-line.cpp.
References Inkscape::SnappedPoint::_always_snap, Inkscape::SnappedPoint::_at_intersection, Inkscape::SnappedPoint::_distance, Inkscape::SnappedPoint::_point, Inkscape::SnappedPoint::_second_always_snap, Inkscape::SnappedPoint::_second_distance, Inkscape::SnappedPoint::_second_tolerance, Inkscape::SnappedPoint::_source, Inkscape::SnappedPoint::_source_num, Inkscape::SnappedPoint::_target, Inkscape::SnappedPoint::_tolerance, and Geom::infinity().
|
default |
|
inline |
Definition at line 50 of file snapped-line.h.
References _normal_to_line, _point_on_line, and dot().
|
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().
|
inline |
Definition at line 48 of file snapped-line.h.
References _normal_to_line.
|
inline |
Definition at line 49 of file snapped-line.h.
References _point_on_line.
Inkscape::SnappedPoint Inkscape::SnappedLine::intersect | ( | SnappedLine const & | line | ) | const |
Definition at line 122 of file snapped-line.cpp.
References Inkscape::SnappedPoint::getAlwaysSnap(), getLine(), Inkscape::SnappedPoint::getPoint(), Inkscape::SnappedPoint::getSnapDistance(), Inkscape::SnappedPoint::getSourceNum(), Inkscape::SnappedPoint::getTolerance(), Geom::infinity(), Geom::intersection(), Geom::L2(), Inkscape::SNAPSOURCE_UNDEFINED, and Inkscape::SNAPTARGET_UNDEFINED.
|
private |
Definition at line 54 of file snapped-line.h.
Referenced by getConstTerm(), getLine(), and getNormal().
|
private |
Definition at line 55 of file snapped-line.h.
Referenced by getConstTerm(), getLine(), and getPointOnLine().