KiCad PCB EDA Suite
|
EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a line (determined by 2 points). More...
#include <edit_constraints.h>
Public Member Functions | |
EC_LINE (EDIT_POINT &aConstrained, const EDIT_POINT &aConstrainer) | |
Correct coordinates of the constrained edit handle. | |
virtual void | Apply (EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override |
Correct coordinates of the constrained edit handle. | |
void | Apply (const GRID_HELPER &aGrid) |
Correct coordinates of the constrained edit handle. | |
Protected Attributes | |
EDIT_POINT & | m_constrained |
Point that is constrained by rules implemented by Apply(). | |
Private Attributes | |
const EDIT_POINT & | m_constrainer |
Point that imposes the constraint. | |
VECTOR2I | m_line |
Vector representing the constraining line. | |
EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a line (determined by 2 points).
Definition at line 166 of file edit_constraints.h.
EC_LINE::EC_LINE | ( | EDIT_POINT & | aConstrained, |
const EDIT_POINT & | aConstrainer | ||
) |
Correct coordinates of the constrained edit handle.
Definition at line 81 of file edit_constraints.cpp.
References EDIT_POINT::GetPosition(), EDIT_CONSTRAINT< EDIT_POINT >::m_constrained, m_constrainer, and m_line.
|
inlineinherited |
Correct coordinates of the constrained edit handle.
Definition at line 82 of file edit_constraints.h.
|
overridevirtual |
Correct coordinates of the constrained edit handle.
Implements EDIT_CONSTRAINT< EDIT_POINT >.
Definition at line 89 of file edit_constraints.cpp.
References GRID_HELPER::AlignGrid(), EDIT_POINT::GetGridConstraint(), EDIT_POINT::GetPosition(), intersect(), SEG::IntersectLines(), m_constrainer, m_line, main(), VECTOR2< T >::Perpendicular(), EDIT_POINT::SetPosition(), SNAP_TO_GRID, VECTOR2< T >::x, and VECTOR2< T >::y.
|
protectedinherited |
Point that is constrained by rules implemented by Apply().
Definition at line 88 of file edit_constraints.h.
|
private |
Point that imposes the constraint.
Definition at line 175 of file edit_constraints.h.
|
private |
Vector representing the constraining line.
Definition at line 176 of file edit_constraints.h.