32 const VECTOR2D& aClEnd,
double aAspect )
52 if( cl.
x == 0 && cl.
y == 0 )
59 VECTOR2D pt = aClStart + ( side / 2.0 );
77 m_geomMgr( aGeomMgr ),
Represent a very simple geometry manager for items that have a start and end point.
VECTOR2I GetOrigin() const
GAL * GetGAL() const
Return the #GAL this view is using to draw graphical primitives.
void drawPreviewShape(KIGFX::VIEW *aView) const override
Draw the preview onto the given GAL.
virtual void DrawLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a line.
Represent a set of closed polygons.
CENTRELINE_RECT_ITEM(const TWO_POINT_GEOMETRY_MANAGER &aGeomMgr, double aAspect)
Gets the bounding box of the rectangle.
int NewOutline()
Creates a new hole in a given outline.
VECTOR2< T > Rotate(double aAngle) const
Rotate the vector by a given angle.
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
virtual void DrawPolygon(const std::deque< VECTOR2D > &aPointList)
Draw a polygon.
SHAPE_POLY_SET getOutline() const
< Get the rectangular outline
static SHAPE_POLY_SET getRectangleAlongCentreLine(const VECTOR2D &aClStart, const VECTOR2D &aClEnd, double aAspect)
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
Abstract interface for drawing on a 2D-surface.
const TWO_POINT_GEOMETRY_MANAGER & m_geomMgr
The aspect ratio of the rectangle to draw.
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Add a new vertex to the contour indexed by aOutline and aHole (defaults to the outline of the last po...