|
KiCad PCB EDA Suite
|
Interactive arc drawing behaviour: center -> start -> end angle. More...
#include <arc_draw_behavior.h>
Public Member Functions | |
| ARC_DRAW_BEHAVIOR (const ARC_DRAW_BEHAVIOR &)=delete | |
| ARC_DRAW_BEHAVIOR & | operator= (const ARC_DRAW_BEHAVIOR &)=delete |
| void | SetAngleSnap (bool aSnap) override |
| Enable or disable angle snapping (circular arcs only; no-op for others). | |
| void | ToggleClockwise () override |
| Flip arc direction (applies only when the shape has such a concept of directionality, e.g. | |
| bool | OnProperties (EDA_SHAPE &aShape) override |
| Called when the user invokes the properties action mid-draw. | |
| 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::ARC_ASSISTANT & | GetAssistant () override |
| Return the visual assistant overlay item. | |
| void | SetUnits (EDA_UNITS aUnits) override |
| Forward a units change to the assistant overlay. | |
Protected Attributes | |
| KIGFX::PREVIEW::ARC_GEOM_MANAGER | m_manager |
| KIGFX::PREVIEW::ARC_ASSISTANT | m_assistant |
Interactive arc drawing behaviour: center -> start -> end angle.
Definition at line 35 of file arc_draw_behavior.h.
|
delete |
References ARC_DRAW_BEHAVIOR().
Referenced by ARC_DRAW_BEHAVIOR(), and operator=().
|
inlineoverridevirtualinherited |
Lock in a point and advance the construction state.
Implements SHAPE_DRAW_BEHAVIOR.
Definition at line 67 of file managed_draw_behavior.h.
|
inlineoverridevirtual |
Transfer the current geometry to an EDA_SHAPE.
Implements SHAPE_DRAW_BEHAVIOR.
Definition at line 63 of file arc_draw_behavior.h.
References ANGLE_0, center, MANAGED_DRAW_BEHAVIOR< KIGFX::PREVIEW::ARC_GEOM_MANAGER, KIGFX::PREVIEW::ARC_ASSISTANT >::m_manager, EDA_SHAPE::SetCenter(), EDA_SHAPE::SetEnd(), and EDA_SHAPE::SetStart().
|
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.
|
inlineoverridevirtualinherited |
Return the visual assistant overlay item.
Implements SHAPE_DRAW_BEHAVIOR.
Definition at line 73 of file managed_draw_behavior.h.
|
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.
|
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.
|
inlineoverridevirtualinherited |
True when all points have been locked in.
Implements SHAPE_DRAW_BEHAVIOR.
Definition at line 56 of file managed_draw_behavior.h.
|
inline |
Definition at line 46 of file managed_draw_behavior.h.
|
inlineoverridevirtual |
Called when the user invokes the properties action mid-draw.
Reimplemented from SHAPE_DRAW_BEHAVIOR.
Definition at line 46 of file arc_draw_behavior.h.
References ANGLE_90, MANAGED_DRAW_BEHAVIOR< KIGFX::PREVIEW::ARC_GEOM_MANAGER, KIGFX::PREVIEW::ARC_ASSISTANT >::m_manager, KIGFX::PREVIEW::ARC_GEOM_MANAGER::SET_ANGLE, KIGFX::PREVIEW::ARC_GEOM_MANAGER::SET_START, and EDA_SHAPE::SetArcAngleAndEnd().
|
delete |
References ARC_DRAW_BEHAVIOR().
|
inlineoverridevirtualinherited |
Undo the last locked-in point.
Implements SHAPE_DRAW_BEHAVIOR.
Definition at line 69 of file managed_draw_behavior.h.
|
inlineoverridevirtualinherited |
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.
|
inlineoverridevirtual |
Enable or disable angle snapping (circular arcs only; no-op for others).
Reimplemented from SHAPE_DRAW_BEHAVIOR.
Definition at line 43 of file arc_draw_behavior.h.
References MANAGED_DRAW_BEHAVIOR< KIGFX::PREVIEW::ARC_GEOM_MANAGER, KIGFX::PREVIEW::ARC_ASSISTANT >::m_manager.
|
inlineoverridevirtualinherited |
Preview the cursor position without advancing state.
Implements SHAPE_DRAW_BEHAVIOR.
Definition at line 68 of file managed_draw_behavior.h.
|
inlineoverridevirtualinherited |
Forward a units change to the assistant overlay.
Implements SHAPE_DRAW_BEHAVIOR.
Definition at line 74 of file managed_draw_behavior.h.
|
inlineoverridevirtual |
Flip arc direction (applies only when the shape has such a concept of directionality, e.g.
circular arcs).
Reimplemented from SHAPE_DRAW_BEHAVIOR.
Definition at line 44 of file arc_draw_behavior.h.
References MANAGED_DRAW_BEHAVIOR< KIGFX::PREVIEW::ARC_GEOM_MANAGER, KIGFX::PREVIEW::ARC_ASSISTANT >::m_manager.
|
protectedinherited |
Definition at line 78 of file managed_draw_behavior.h.
|
protectedinherited |
Definition at line 77 of file managed_draw_behavior.h.
Referenced by ARC_DRAW_BEHAVIOR::ApplyToShape(), ARC_DRAW_BEHAVIOR::OnProperties(), ARC_DRAW_BEHAVIOR::SetAngleSnap(), and ARC_DRAW_BEHAVIOR::ToggleClockwise().