24#ifndef PREVIEW_ITEMS_TWO_POINT_GEOMETRY_MANAGER_H
25#define PREVIEW_ITEMS_TWO_POINT_GEOMETRY_MANAGER_H
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)
bool HasGeometryChanged() const
bool GetAngleSnap() const
bool m_angleSnap
Has the geometry changed such that a client should redraw?
void ClearGeometryChanged()
Clear the geometry changed flag, call after the client code has updated everything as needed.
void SetAngleSnap(bool aSnap)
void setGeometryChanged()
< Mark the geometry as changed for clients to notice
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.
The Cairo implementation of the graphics abstraction layer.