68 m_subtractive( false ),
69 m_exclusiveOr( false ),
83 case SELECTION_MODE::INSIDE_RECTANGLE:
84 case SELECTION_MODE::TOUCHING_RECTANGLE:
88 case SELECTION_MODE::INSIDE_LASSO:
89 case SELECTION_MODE::TOUCHING_LASSO:
118 if(
m_mode == SELECTION_MODE::INSIDE_RECTANGLE ||
m_mode == SELECTION_MODE::INSIDE_LASSO )
123 auto drawSelectionShape =
129 case SELECTION_MODE::INSIDE_RECTANGLE:
130 case SELECTION_MODE::TOUCHING_RECTANGLE:
133 case SELECTION_MODE::INSIDE_LASSO:
134 case SELECTION_MODE::TOUCHING_LASSO:
145 drawSelectionShape();
150 drawSelectionShape();
constexpr void SetOrigin(const Vec &pos)
constexpr BOX2< Vec > & Normalize()
Ensure that the height and width are positive.
constexpr void SetEnd(coord_type x, coord_type y)
A color representation with 4 components: red, green, blue, alpha.
Abstract interface for drawing on a 2D-surface.
virtual void DrawPolygon(const std::deque< VECTOR2D > &aPointList)
Draw a polygon.
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
virtual void DrawRectangle(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a rectangle.
virtual void SetFillColor(const COLOR4D &aColor)
Set the fill color.
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 RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
SHAPE_LINE_CHAIN m_shape_poly
void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override final
Draw the parts of the object belonging to layer aLayer.
const BOX2I ViewBBox() const override
Set the origin of the rectangle (the fixed corner)
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
virtual bool IsBackgroundDark() const
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.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
int PointCount() const
Return the number of points (vertices) in this line chain.
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
static const SELECTION_COLORS selectionColorScheme[2]