103 m_skipPoint =
VECTOR2I( std::numeric_limits<int>::min(), std::numeric_limits<int>::min() );
144 return ( aP -
pos ).EuclideanNorm();
A base class for most all the KiCad significant classes used in schematics and boards.
std::optional< VECTOR2I > m_auxAxis
VECTOR2I computeNearest(const VECTOR2I &aPoint, const VECTOR2I &aGrid, const VECTOR2I &aOffset) const
virtual GRID_HELPER_GRIDS GetItemGrid(const EDA_ITEM *aItem) const
Gets the coarsest grid that applies to an item.
void SetSkipPoint(const VECTOR2I &aPoint)
void ClearSkipPoint()
We clear the skip point by setting it to an unreachable position, thereby preventing matching.
virtual GRID_HELPER_GRIDS GetSelectionGrid(const SELECTION &aSelection) const
Gets the coarsest grid that applies to a selecion of items.
void SetUseGrid(bool aSnapToGrid)
void SetAuxAxes(bool aEnable, const VECTOR2I &aOrigin=VECTOR2I(0, 0))
VECTOR2D GetVisibleGrid() const
virtual VECTOR2D GetGridSize(GRID_HELPER_GRIDS aGrid) const
Return the size of the specified grid.
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
virtual VECTOR2I Align(const VECTOR2I &aPoint, GRID_HELPER_GRIDS aGrid) const
KIGFX::ORIGIN_VIEWITEM m_viewAxis
void ClearMaskFlag(int aFlag)
void SetSnapLine(bool aSnap)
std::vector< ANCHOR > m_anchors
virtual VECTOR2I AlignGrid(const VECTOR2I &aPoint, GRID_HELPER_GRIDS aGrid) const
ANCHOR(const VECTOR2I &aPos, int aFlags=CORNER|SNAPPABLE, EDA_ITEM *aItem=nullptr)
double Distance(const VECTOR2I &aP) const