KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ELLIPSE_ARC_DRAW_BEHAVIOR Class Reference

Interactive elliptical-arc drawing behaviour: bbox corner 1 -> bbox corner 2 -> start angle -> end angle. More...

#include <ellipse_draw_behavior.h>

Inheritance diagram for ELLIPSE_ARC_DRAW_BEHAVIOR:
MANAGED_DRAW_BEHAVIOR< KIGFX::PREVIEW::ELLIPSE_GEOM_MANAGER, KIGFX::PREVIEW::ELLIPSE_ASSISTANT > SHAPE_DRAW_BEHAVIOR

Public Member Functions

 ELLIPSE_ARC_DRAW_BEHAVIOR (const ELLIPSE_ARC_DRAW_BEHAVIOR &)=delete
 
ELLIPSE_ARC_DRAW_BEHAVIORoperator= (const ELLIPSE_ARC_DRAW_BEHAVIOR &)=delete
 
void ApplyToShape (EDA_SHAPE &aShape) const override
 Transfer the current geometry to an EDA_SHAPE.
 
 MANAGED_DRAW_BEHAVIOR (const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits)
 
bool IsComplete () const override
 True when all points have been locked in.
 
bool HasGeometryChanged () const override
 True if the geometry changed since the last call to ClearGeometryChanged().
 
void ClearGeometryChanged () override
 Reset the geometry-changed flag (call after updating the preview).
 
void Reset () override
 Reset the behaviour to its initial state for chained object creation loops.
 
int GetStep () const override
 Return the current construction step (0-based, shape-specific meaning).
 
void AddPoint (const VECTOR2I &aP) override
 Lock in a point and advance the construction state.
 
void SetCursorPosition (const VECTOR2I &aP) override
 Preview the cursor position without advancing state.
 
void RemoveLastPoint () override
 Undo the last locked-in point.
 
KIGFX::PREVIEW::ELLIPSE_ASSISTANTGetAssistant () override
 Return the visual assistant overlay item.
 
void SetUnits (EDA_UNITS aUnits) override
 Forward a units change to the assistant overlay.
 
virtual void ToggleClockwise ()
 Flip arc direction (applies only when the shape has such a concept of directionality, e.g.
 
virtual void SetAngleSnap (bool aSnap)
 Enable or disable angle snapping (circular arcs only; no-op for others).
 
virtual bool OnProperties (EDA_SHAPE &aShape)
 Called when the user invokes the properties action mid-draw.
 

Protected Attributes

KIGFX::PREVIEW::ELLIPSE_GEOM_MANAGER m_manager
 
KIGFX::PREVIEW::ELLIPSE_ASSISTANT m_assistant
 

Detailed Description

Interactive elliptical-arc drawing behaviour: bbox corner 1 -> bbox corner 2 -> start angle -> end angle.

Definition at line 36 of file ellipse_draw_behavior.h.

Constructor & Destructor Documentation

◆ ELLIPSE_ARC_DRAW_BEHAVIOR()

ELLIPSE_ARC_DRAW_BEHAVIOR::ELLIPSE_ARC_DRAW_BEHAVIOR ( const ELLIPSE_ARC_DRAW_BEHAVIOR & )
delete

Member Function Documentation

◆ AddPoint()

void MANAGED_DRAW_BEHAVIOR< KIGFX::PREVIEW::ELLIPSE_GEOM_MANAGER, KIGFX::PREVIEW::ELLIPSE_ASSISTANT >::AddPoint ( const VECTOR2I & aP)
inlineoverridevirtualinherited

Lock in a point and advance the construction state.

Implements SHAPE_DRAW_BEHAVIOR.

Definition at line 67 of file managed_draw_behavior.h.

◆ ApplyToShape()

◆ ClearGeometryChanged()

void MANAGED_DRAW_BEHAVIOR< KIGFX::PREVIEW::ELLIPSE_GEOM_MANAGER, KIGFX::PREVIEW::ELLIPSE_ASSISTANT >::ClearGeometryChanged ( )
inlineoverridevirtualinherited

Reset the geometry-changed flag (call after updating the preview).

Implements SHAPE_DRAW_BEHAVIOR.

Definition at line 58 of file managed_draw_behavior.h.

◆ GetAssistant()

Return the visual assistant overlay item.

Implements SHAPE_DRAW_BEHAVIOR.

Definition at line 73 of file managed_draw_behavior.h.

◆ GetStep()

int MANAGED_DRAW_BEHAVIOR< KIGFX::PREVIEW::ELLIPSE_GEOM_MANAGER, KIGFX::PREVIEW::ELLIPSE_ASSISTANT >::GetStep ( ) const
inlineoverridevirtualinherited

Return the current construction step (0-based, shape-specific meaning).

Implements SHAPE_DRAW_BEHAVIOR.

Definition at line 61 of file managed_draw_behavior.h.

◆ HasGeometryChanged()

bool MANAGED_DRAW_BEHAVIOR< KIGFX::PREVIEW::ELLIPSE_GEOM_MANAGER, KIGFX::PREVIEW::ELLIPSE_ASSISTANT >::HasGeometryChanged ( ) const
inlineoverridevirtualinherited

True if the geometry changed since the last call to ClearGeometryChanged().

Implements SHAPE_DRAW_BEHAVIOR.

Definition at line 57 of file managed_draw_behavior.h.

◆ IsComplete()

bool MANAGED_DRAW_BEHAVIOR< KIGFX::PREVIEW::ELLIPSE_GEOM_MANAGER, KIGFX::PREVIEW::ELLIPSE_ASSISTANT >::IsComplete ( ) const
inlineoverridevirtualinherited

True when all points have been locked in.

Implements SHAPE_DRAW_BEHAVIOR.

Definition at line 56 of file managed_draw_behavior.h.

◆ MANAGED_DRAW_BEHAVIOR()

MANAGED_DRAW_BEHAVIOR< ManagerT, AssistantT >::MANAGED_DRAW_BEHAVIOR ( const EDA_IU_SCALE & aIuScale,
EDA_UNITS aUnits )
inline

Definition at line 46 of file managed_draw_behavior.h.

◆ OnProperties()

virtual bool SHAPE_DRAW_BEHAVIOR::OnProperties ( EDA_SHAPE & aShape)
inlinevirtualinherited

Called when the user invokes the properties action mid-draw.

Returns
true if the behavior handled the request (the event loop should continue); false if the event should be passed on.

Reimplemented in ARC_DRAW_BEHAVIOR.

Definition at line 91 of file shape_draw_behavior.h.

Referenced by DRAWING_TOOL::drawManagedShape().

◆ operator=()

ELLIPSE_ARC_DRAW_BEHAVIOR & ELLIPSE_ARC_DRAW_BEHAVIOR::operator= ( const ELLIPSE_ARC_DRAW_BEHAVIOR & )
delete

◆ RemoveLastPoint()

void MANAGED_DRAW_BEHAVIOR< KIGFX::PREVIEW::ELLIPSE_GEOM_MANAGER, KIGFX::PREVIEW::ELLIPSE_ASSISTANT >::RemoveLastPoint ( )
inlineoverridevirtualinherited

Undo the last locked-in point.

Implements SHAPE_DRAW_BEHAVIOR.

Definition at line 69 of file managed_draw_behavior.h.

◆ Reset()

Reset the behaviour to its initial state for chained object creation loops.

Implements SHAPE_DRAW_BEHAVIOR.

Definition at line 59 of file managed_draw_behavior.h.

◆ SetAngleSnap()

virtual void SHAPE_DRAW_BEHAVIOR::SetAngleSnap ( bool aSnap)
inlinevirtualinherited

Enable or disable angle snapping (circular arcs only; no-op for others).

Reimplemented in ARC_DRAW_BEHAVIOR.

Definition at line 83 of file shape_draw_behavior.h.

Referenced by DRAWING_TOOL::drawManagedShape().

◆ SetCursorPosition()

void MANAGED_DRAW_BEHAVIOR< KIGFX::PREVIEW::ELLIPSE_GEOM_MANAGER, KIGFX::PREVIEW::ELLIPSE_ASSISTANT >::SetCursorPosition ( const VECTOR2I & aP)
inlineoverridevirtualinherited

Preview the cursor position without advancing state.

Implements SHAPE_DRAW_BEHAVIOR.

Definition at line 68 of file managed_draw_behavior.h.

◆ SetUnits()

Forward a units change to the assistant overlay.

Implements SHAPE_DRAW_BEHAVIOR.

Definition at line 74 of file managed_draw_behavior.h.

◆ ToggleClockwise()

virtual void SHAPE_DRAW_BEHAVIOR::ToggleClockwise ( )
inlinevirtualinherited

Flip arc direction (applies only when the shape has such a concept of directionality, e.g.

circular arcs).

Reimplemented in ARC_DRAW_BEHAVIOR.

Definition at line 80 of file shape_draw_behavior.h.

Referenced by DRAWING_TOOL::drawManagedShape(), and EE_GRAPHIC_TOOL::drawManagedShape().

Member Data Documentation

◆ m_assistant

◆ m_manager


The documentation for this class was generated from the following file: