26 using namespace std::placeholders;
89 KiROUND( ( aPoint.
y - gridOffset.
y ) / grid.
y ) * grid.
y + gridOffset.
y );
105 if( std::abs(
m_auxAxis->x - aPoint.
x ) < std::abs( nearest.
x - aPoint.
x ) )
108 if( std::abs(
m_auxAxis->y - aPoint.
y ) < std::abs( nearest.
y - aPoint.
y ) )
void SetPosition(const wxPoint &aPosition) override
OPT< VECTOR2I > m_auxAxis
KIGFX::ORIGIN_VIEWITEM m_viewAxis
VECTOR2I GetOrigin() const
GAL * GetGAL() const
Return the #GAL this view is using to draw graphical primitives.
GRID_HELPER(TOOL_MANAGER *aToolMgr)
void SetAuxAxes(bool aEnable, const VECTOR2I &aOrigin=VECTOR2I(0, 0))
bool canUseGrid() const
Check whether it is possible to use the grid – this depends both on local grid helper settings and gl...
const VECTOR2D & GetGridSize() const
Return the grid size.
virtual VECTOR2I Align(const VECTOR2I &aPoint) const
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
const VECTOR2D & GetGridOrigin() const
void SetVisible(VIEW_ITEM *aItem, bool aIsVisible=true)
Set the item visibility.
VECTOR2I AlignGrid(const VECTOR2I &aPoint) const