33 const VECTOR2D& aClEnd,
double aAspect )
53 if( cl.
x == 0 && cl.
y == 0 )
60 side = side * aAspect;
62 VECTOR2D pt = aClStart + ( side / 2.0 );
80 m_geomMgr( aGeomMgr ),
static SHAPE_POLY_SET getRectangleAlongCentreLine(const VECTOR2D &aClStart, const VECTOR2D &aClEnd, double aAspect)
Abstract interface for drawing on a 2D-surface.
virtual void DrawPolygon(const std::deque< VECTOR2D > &aPointList)
Draw a polygon.
virtual void DrawLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a line.
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
void drawPreviewShape(KIGFX::VIEW *aView) const override
Draw the preview onto the given GAL.
SHAPE_POLY_SET getOutline() const
< Get the rectangular outline
const TWO_POINT_GEOMETRY_MANAGER & m_geomMgr
The aspect ratio of the rectangle to draw.
CENTRELINE_RECT_ITEM(const TWO_POINT_GEOMETRY_MANAGER &aGeomMgr, double aAspect)
Gets the bounding box of the rectangle.
Represent a very simple geometry manager for items that have a start and end point.
VECTOR2I GetOrigin() 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.
Represent a set of closed polygons.
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Appends a vertex at the end of the given outline/hole (default: the last outline)
int NewOutline()
Creates a new empty polygon in the set and returns its index.
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
static constexpr EDA_ANGLE ANGLE_90
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.