37 return std::fabs( std::remainder( aRadians, M_PI_4 ) ) <
ANGLE_EPSILON;
48 : m_gal( *aView.GetGAL() ),
49 m_render_settings( *aView.GetPainter()->GetSettings() ),
Auxiliary items (guides, rule, etc)
DRAW_CONTEXT(KIGFX::VIEW &aView)
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
COLOR4D WithAlpha(double aAlpha) const
Return a color with the same color, but the given alpha.
virtual void DrawLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a line.
virtual bool IsBackgroundDark() const
virtual void SetLineWidth(float aLineWidth)
Set the line width.
COLOR4D getSpecialAngleColour() const
The GAL to draw into.
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 DrawLine(const VECTOR2I &aStart, const VECTOR2I &aEnd, bool aDeEmphasised)
Draw a simple line on the current layer.
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
static constexpr double ANGLE_EPSILON
const KIGFX::RENDER_SETTINGS & m_render_settings
The current layer to draw onto.
void DrawCircle(const VECTOR2I &aOrigin, double aRad, bool aDeEmphasised)
Draw a preview circle on the current layer.
double Angle() const
Compute the angle of the vector.
double PreviewOverlayDeemphAlpha(bool aDeemph=true)
Default alpha of "de-emphasised" features (like previously locked-in lines.
static COLOR4D deemphasise(const COLOR4D &aColor, bool aDeEmphasised)
virtual void SetStrokeColor(const COLOR4D &aColor)
Set the stroke color.
virtual void DrawCircle(const VECTOR2D &aCenterPoint, double aRadius)
Draw a circle using world coordinates.
static bool angleIsSpecial(double aRadians)
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
virtual void SetIsStroke(bool aIsStrokeEnabled)
Enable/disable stroked outlines.
float m_lineWidth
The line width to use for items.
A color representation with 4 components: red, green, blue, alpha.