61 const std::optional<ARC_TANGENT_SEED>& aChainSeed,
SEED_FINDER aFindSeed,
ARC_DRAW_MODE
Construction sequence used when interactively drawing a circular arc.
ARC_DRAW_MODE StartArcDrawMode(const TOOL_EVENT &aEvent, APP_SETTINGS_BASE *aSettings, SHAPE_DRAW_BEHAVIOR &aBehavior)
Pick the mode a Draw Arc action starts in and apply it to aBehavior.
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
APP_SETTINGS_BASE * m_settings
void PlacePoint(const VECTOR2I &aMouse, const VECTOR2I &aPos)
Lock in a point, or seed a tangent arc from the graphic under it when it would be the arc's first poi...
void RemoveLastPoint()
Undo the last point. A seed taken from a click is undone too, one from a chain is kept.
SHAPE_DRAW_BEHAVIOR & m_behavior
ARC_DRAW_MODE Mode() const
bool HandleModeEvent(const TOOL_EVENT &aEvent)
Handle a mode or cycle action; return true if aEvent was one.
std::function< std::optional< ARC_TANGENT_SEED >(const VECTOR2I &aMouse, const VECTOR2I &aPos)> SEED_FINDER
Tangent seed from a graphic under the cursor, given the raw and the snapped cursor positions.
void SetMode(ARC_DRAW_MODE aMode)
Switch mode mid-draw, which drops any seed. Does nothing unless an arc is being drawn.
ARC_MODE_SESSION(SHAPE_DRAW_BEHAVIOR &aBehavior, APP_SETTINGS_BASE *aSettings, bool aDrawingArc, const std::optional< ARC_TANGENT_SEED > &aChainSeed, SEED_FINDER aFindSeed, std::function< void(ARC_DRAW_MODE)> aOnModeChanged)
std::function< void(ARC_DRAW_MODE)> m_onModeChanged
Abstract interface for interactive shape-drawing behaviours.
VECTOR2< int32_t > VECTOR2I