103 return ( aP -
pos ).EuclideanNorm();
A base class for most all the KiCad significant classes used in schematics and boards.
std::optional< VECTOR2I > m_auxAxis
GRID_HELPER(TOOL_MANAGER *aToolMgr)
VECTOR2I GetVisibleGrid() const
void SetSkipPoint(const VECTOR2I &aPoint)
virtual VECTOR2I Align(const VECTOR2I &aPoint) const
void ClearSkipPoint()
We clear the skip point by setting it to an unreachable position, thereby preventing matching.
void SetUseGrid(bool aSnapToGrid)
void SetAuxAxes(bool aEnable, const VECTOR2I &aOrigin=VECTOR2I(0, 0))
VECTOR2I AlignGrid(const VECTOR2I &aPoint) const
VECTOR2I GetOrigin() const
void addAnchor(const VECTOR2I &aPos, int aFlags, EDA_ITEM *aItem)
bool canUseGrid() const
Check whether it is possible to use the grid – this depends both on local grid helper settings and gl...
KIGFX::ORIGIN_VIEWITEM m_viewSnapPoint
void SetMaskFlag(int aFlag)
KIGFX::ORIGIN_VIEWITEM m_viewSnapLine
KIGFX::ORIGIN_VIEWITEM m_viewAxis
void ClearMaskFlag(int aFlag)
void SetSnapLine(bool aSnap)
std::vector< ANCHOR > m_anchors
bool GetGridSnapping() const
GAL * GetGAL() const
Return the #GAL this view is using to draw graphical primitives.
ANCHOR(const VECTOR2I &aPos, int aFlags=CORNER|SNAPPABLE, EDA_ITEM *aItem=nullptr)
double Distance(const VECTOR2I &aP) const