24#ifndef PREVIEW_ITEMS_ARC_GEOMETRY_MANAGER_H
25#define PREVIEW_ITEMS_ARC_GEOMETRY_MANAGER_H
Manage the construction of a circular arc though sequential setting of critical points: center,...
VECTOR2I GetOrigin() const
< Get the center point of the arc (valid when state > SET_ORIGIN)
void SetAngleSnap(bool aSnap)
ARC_STEPS GetStep() const
Get the current step the manager is on (useful when drawing something depends on the current state)
void SetClockwise(bool aCw)
Reverse the current are direction.
int getMaxStep() const override
The highest step this manager has - used to recognize completion and to clamp the step as it advances...
void ToggleClockwise()
Set angle snapping (for the next point)
EDA_ANGLE GetStartAngle() const
Get the angle of the vector leading to the end point (valid if step >= SET_ANGLE)
bool setStart(const VECTOR2I &aEnd)
Set a point of the second radius line (collinear with arc end)
VECTOR2I GetStartRadiusEnd() const
Get the coordinates of the arc end point.
bool acceptPoint(const VECTOR2I &aPt) override
The arc to be clockwise from start.
VECTOR2I GetEndRadiusEnd() const
Get the radius of the arc (valid if step >= SET_START)
bool setEnd(const VECTOR2I &aCursor)
double GetRadius() const
Get the angle of the vector leading to the start point (valid if step >= SET_START)
EDA_ANGLE GetSubtended() const
bool setOrigin(const VECTOR2I &aOrigin)
< Set the center point of the arc
@ SET_ORIGIN
Waiting to lock in origin point.
@ SET_ANGLE
Waiting to lock in the arc end point.
@ SET_START
Waiting to lock in the arc start point.
A geometry manager that works by accepting a sequence of points and advancing though stages of geomet...
The Cairo implementation of the graphics abstraction layer.