62 m_markerType( aType ),
65 m_scalingFactor( aScalingFactor )
68 wxPoint start( point_shape->
x, point_shape->
y );
74 start.
x = std::min( start.x, point_shape->
x);
75 start.y = std::min( start.y, point_shape->
y);
76 end.x = std::max( end.x, point_shape->
x);
77 end.y = std::max( end.y, point_shape->
y);
96 bool hit = bbox.
Contains( aHitPosition );
116 aPolygon.
Append( corner * aScale );
131 position_iu +=
m_Pos;
133 return EDA_RECT( position_iu, size_iu );
142 std::vector<wxPoint> shape;
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
wxPoint m_Pos
position of the marker
void SetOrigin(const wxPoint &pos)
virtual KIGFX::COLOR4D getColor() const =0
bool Contains(const wxPoint &aPoint) const
void Append(int aX, int aY, bool aAllowDuplication=false)
Function Append()
EDA_RECT GetBoundingBoxMarker() const
Return the orthogonal, bounding box of this object for display purposes.
void PrintMarker(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset)
Print the shape is the polygon defined in m_Corners (array of wxPoints).
void SetClosed(bool aClosed)
Function SetClosed()
bool HitTestMarker(const wxPoint &aHitPosition, int aAccuracy) const
Test if the given wxPoint is within the bounds of this object.
const unsigned CORNERS_COUNT
void SetEnd(int x, int y)
EDA_RECT m_shapeBoundingBox
const wxPoint GetPosition() const
bool PointInside(const VECTOR2I &aPt, int aAccuracy=0, bool aUseBBoxCache=false) const
Check if point aP lies inside a polygon (any type) defined by the line chain.
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Returns # of elements in an array.
wxDC * GetPrintDC() const
void ShapeToPolygon(SHAPE_LINE_CHAIN &aPolygon, int aScale=-1) const
Return the shape polygon in internal units in a SHAPE_LINE_CHAIN the coordinates are relatives to the...
int MarkerScale() const
The scaling factor to convert polygonal shape coordinates to internal units.
MARKER_BASE(int aScalingFactor, std::shared_ptr< RC_ITEM > aItem, TYPEMARKER aType=MARKER_UNSPEC)
static const VECTOR2I MarkerShapeCorners[]
Handle the component boundary box.
BASE_SCREEN class implementation.
void GRClosedPoly(EDA_RECT *ClipBox, wxDC *DC, int n, const wxPoint *Points, bool Fill, COLOR4D Color, COLOR4D BgColor)
Draw a closed polygon onto the drawing context aDC and optionally fills and/or draws a border around ...
EDA_RECT & Inflate(wxCoord dx, wxCoord dy)
Inflate the rectangle horizontally by dx and vertically by dy.
const wxSize GetSize() const