24 #ifndef PREVIEW_ITEMS_TWO_POINT_GEOMETRY_MANAGER_H 25 #define PREVIEW_ITEMS_TWO_POINT_GEOMETRY_MANAGER_H 142 #endif // PREVIEW_ITEMS_TWO_POINT_GEOMETRY_MANAGER_H VECTOR2< T > GetVectorSnapped45(const VECTOR2< T > &aVec, bool only45=false)
Snap a vector onto the nearest 0, 45 or 90 degree line.
The Cairo implementation of the graphics abstraction layer.
Represent a very simple geometry manager for items that have a start and end point.
VECTOR2I GetOrigin() const
void Reset()
Reset the manager to the initial state.
void SetAngleSnap(bool aSnap)
void ClearGeometryChanged()
Clear the geometry changed flag, call after the client code has updated everything as needed.
void SetOrigin(const VECTOR2I &aOrigin)
< Set the origin of the ruler (the fixed end)
bool HasGeometryChanged() const
bool m_angleSnap
Has the geometry changed such that a client should redraw?
a few functions useful in geometry calculations.
void setGeometryChanged()
< Mark the geometry as changed for clients to notice
bool GetAngleSnap() const
void SetEnd(const VECTOR2I &aEnd)
Set the current end of the rectangle (the end that moves with the cursor.