49 : m_gal( *aView.GetGAL() ),
50 m_render_settings( *aView.GetPainter()->GetSettings() ),
70 double aFillAngle,
bool aDeEmphasised )
79 for(
int i = 0; i < 360; i += aStepAngle )
99 int aDashFill,
bool aDeEmphasised )
108 int vecLen =
delta.EuclideanNorm();
110 for(
int i = 0; i < vecLen; i += aDashStep )
113 VECTOR2I b = aStart +
delta.Resize( std::min( i + aDashFill, vecLen ) );
A color representation with 4 components: red, green, blue, alpha.
COLOR4D WithAlpha(double aAlpha) const
Return a color with the same color, but the given alpha.
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
virtual void DrawCircle(const VECTOR2D &aCenterPoint, double aRadius)
Draw a circle using world coordinates.
virtual void SetLineWidth(float aLineWidth)
Set the line width.
virtual void SetStrokeColor(const COLOR4D &aColor)
Set the stroke color.
virtual void SetIsStroke(bool aIsStrokeEnabled)
Enable/disable stroked outlines.
virtual void DrawLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a line.
virtual void DrawArc(const VECTOR2D &aCenterPoint, double aRadius, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aAngle)
Draw an arc.
float m_lineWidth
The line width to use for items.
const KIGFX::RENDER_SETTINGS & m_render_settings
The current layer to draw onto.
void DrawCircleDashed(const VECTOR2I &aOrigin, double aRad, double aStepAngle, double aFillAngle, bool aDeEmphasised)
Draw a dashed preview circle on the current layer.
DRAW_CONTEXT(KIGFX::VIEW &aView)
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 DrawLineDashed(const VECTOR2I &aStart, const VECTOR2I &aEn, int aDashStep, int aDashFill, bool aDeEmphasised)
Draw a dashed line on the current layer.
COLOR4D getSpecialAngleColour() const
The GAL to draw into.
void DrawCircle(const VECTOR2I &aOrigin, double aRad, bool aDeEmphasised)
Draw a preview circle on the current layer.
virtual bool IsBackgroundDark() const
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
static COLOR4D deemphasise(const COLOR4D &aColor, bool aDeEmphasised)
static constexpr double ANGLE_EPSILON
static bool angleIsSpecial(EDA_ANGLE aAngle)
@ LAYER_AUX_ITEMS
Auxiliary items (guides, rule, etc)
double PreviewOverlayDeemphAlpha(bool aDeemph=true)
Default alpha of "de-emphasised" features (like previously locked-in lines.