24#ifndef PREVIEW_ITEMS_TWO_POINT_GEOMETRY_MANAGER_H
25#define PREVIEW_ITEMS_TWO_POINT_GEOMETRY_MANAGER_H
64 default:
m_end = aEnd;
break;
Abstract interface for drawing on a 2D-surface.
Represent a very simple geometry manager for items that have a start and end point.
void SetOrigin(const VECTOR2I &aOrigin)
< Set the origin of the ruler (the fixed end)
void SetAngleSnap(LEADER_MODE aSnap)
LEADER_MODE GetAngleSnap() const
VECTOR2I GetOrigin() const
void Reset()
Reset the manager to the initial state.
void SetEnd(const VECTOR2I &aEnd)
Set the current end of the rectangle (the end that moves with the cursor.
a few functions useful in geometry calculations.
VECTOR2< T > GetVectorSnapped45(const VECTOR2< T > &aVec, bool only45=false)
Snap a vector onto the nearest 0, 45 or 90 degree line.
LEADER_MODE
The kind of the leader line.
@ DIRECT
Unconstrained point-to-point.
VECTOR2< T > GetVectorSnapped90(const VECTOR2< T > &aVec)
Snap a vector onto the nearest horizontal or vertical line.
The Cairo implementation of the graphics abstraction layer.
VECTOR2< int32_t > VECTOR2I