![]() |
KiCad PCB EDA Suite
|
EDIT_CONSTRAINT for a EDIT_LINE, one of the ends is snapped to a spot determined by a transform function passed as parameter (e.g. More...
#include <edit_constraints.h>
Public Types | |
typedef std::function< VECTOR2D(const VECTOR2D &)> | V2D_TRANSFORM_FUN |
< Typedef for a function that determines snapping point. More... | |
Public Member Functions | |
EC_SNAPLINE (EDIT_LINE &aLine, V2D_TRANSFORM_FUN aSnapFun) | |
virtual | ~EC_SNAPLINE () |
Correct coordinates of the constrained edit handle. More... | |
virtual void | Apply (EDIT_LINE &aHandle) override |
Correct coordinates of the constrained edit handle. More... | |
void | Apply () |
Correct coordinates of the constrained edit handle. More... | |
Protected Attributes | |
EDIT_LINE & | m_constrained |
Point that is constrained by rules implemented by Apply(). More... | |
Private Attributes | |
V2D_TRANSFORM_FUN | m_snapFun |
< Function that determines snapping point. More... | |
EDIT_CONSTRAINT for a EDIT_LINE, one of the ends is snapped to a spot determined by a transform function passed as parameter (e.g.
it can be snapped to a grid), instead of having the line center snapped to a point.
Definition at line 231 of file edit_constraints.h.
typedef std::function<VECTOR2D( const VECTOR2D& )> EC_SNAPLINE::V2D_TRANSFORM_FUN |
< Typedef for a function that determines snapping point.
Definition at line 235 of file edit_constraints.h.
EC_SNAPLINE::EC_SNAPLINE | ( | EDIT_LINE & | aLine, |
V2D_TRANSFORM_FUN | aSnapFun | ||
) |
Definition at line 185 of file edit_constraints.cpp.
References move.
|
inlinevirtual |
Correct coordinates of the constrained edit handle.
Definition at line 239 of file edit_constraints.h.
|
inlineinherited |
Correct coordinates of the constrained edit handle.
Definition at line 71 of file edit_constraints.h.
|
overridevirtual |
Correct coordinates of the constrained edit handle.
Implements EDIT_CONSTRAINT< EDIT_LINE >.
Definition at line 190 of file edit_constraints.cpp.
References delta, EDIT_LINE::GetEnd(), EDIT_LINE::GetOrigin(), EDIT_POINT::GetPosition(), m_snapFun, and EDIT_POINT::SetPosition().
|
protectedinherited |
Point that is constrained by rules implemented by Apply().
Definition at line 77 of file edit_constraints.h.
|
private |
< Function that determines snapping point.
Definition at line 247 of file edit_constraints.h.
Referenced by Apply().