89 wxArrayString cursorStrings;
105 cursorStrings.push_back(
107 cursorStrings.push_back(
DimensionLabel( wxString::FromUTF8(
"θ" ),
117 EDA_ANGLE normalizedEnd = ( start + subtended ).Normalize180();
124 cursorStrings.push_back(
DimensionLabel( wxString::FromUTF8(
"θ" ),
149 const double pixel = aView->
ToWorld( 1.0 );
150 const int dashSize =
KiROUND( 12 * pixel );
159 const double length =
delta.EuclideanNorm();
160 const double limit = 400 * pixel;
164 dashSize / 2,
false );
167 wxArrayString cursorStrings;
177 labelAnchor = chordMid;
184 dashedGuide(
KiROUND( chordMid ), marked );
205 dashedGuide( start,
VECTOR2D( start ) + dir * ( std::max( length, 100 * pixel ) / length ) );
229 if( cursorStrings.empty() )
ARC_DRAW_MODE
Construction sequence used when interactively drawing a circular arc.
@ START_END_MID
Start, end, then the arc midpoint dragged along the chord bisector.
@ START_END_CENTER
Start, end, then the center dragged along the chord bisector.
@ CENTER_START_END
Center, then start (sets radius), then sweep to the end.
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
constexpr void SetMaximum()
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
void ResetTextAttributes()
Reset text attributes to default styling.
void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override final
Draw the assistance (with reference to the construction manager.
void drawCenterGuides(int aLayer, KIGFX::VIEW *aView) const
Guides for center, start and end construction.
bool m_drawArc
Draw the arc segment (or just the radius lines).
void drawEndpointGuides(int aLayer, KIGFX::VIEW *aView) const
Guides for the modes that keep the clicked endpoints.
const ARC_GEOM_MANAGER & m_constructMan
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
ARC_ASSISTANT(const ARC_GEOM_MANAGER &aManager, const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits)
const EDA_IU_SCALE & m_iuScale
Manage the construction of a circular arc though sequential setting of critical points.
@ SECOND_POINT
Waiting to lock in the second point.
A KIGFX::PREVIEW::DRAW_CONTEXT is a wrapper around a GAL and some other settings that makes it easy t...
void DrawLineDashed(const VECTOR2I &aStart, const VECTOR2I &aEnd, int aDashStep, int aDashFill, bool aDeEmphasised)
Draw a dashed line on the current layer.
void DrawLine(const VECTOR2I &aStart, const VECTOR2I &aEnd, bool aDeEmphasised)
Draw a simple line on the current layer.
void DrawLineWithAngleHighlight(const VECTOR2I &aStart, const VECTOR2I &aEnd, bool aDeEmphasised)
Draw a straight line on the current layer, with a special highlight when the line angle is a multiple...
void DrawCircle(const VECTOR2I &aOrigin, double aRad, bool aDeEmphasised)
Draw a preview circle on the current layer.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
GAL * GetGAL() const
Return the GAL this view is using to draw graphical primitives.
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
T EuclideanNorm() const
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
@ LAYER_SELECT_OVERLAY
Selected items overlay.
void DrawTextNextToCursor(KIGFX::VIEW *aView, const VECTOR2D &aCursorPos, const VECTOR2D &aTextQuadrant, const wxArrayString &aStrings, bool aDrawingDropShadows)
Draw strings next to the cursor.
wxString DimensionLabel(const wxString &prefix, double aVal, const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, bool aIncludeUnits=true)
Get a formatted string showing a dimension to a sane precision with an optional prefix and unit suffi...
bool valid
False for degenerate input (collinear points, zero chord, etc)
VECTOR2I mid
The point on the arc halfway along the sweep.
@ NOT_USED
the 3d code uses this value
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D