32 #include <wx/gdicmn.h> 52 EDA_RECT(
const wxPoint& aPos,
const wxSize& aSize ) :
70 void Move(
const wxPoint& aMoveVector );
81 bool Contains(
const wxPoint& aPoint )
const;
189 SetEnd( wxPoint( x, y ) );
235 bool Intersects(
const wxPoint& aPoint1,
const wxPoint& aPoint2 )
const;
246 bool Intersects(
const wxPoint& aPoint1,
const wxPoint& aPoint2,
247 wxPoint* aIntersection1, wxPoint* aIntersection2 )
const;
281 operator wxRect()
const 326 void Merge(
const wxPoint& aPoint );
void Offset(int dx, int dy)
void Move(const wxPoint &aMoveVector)
Move the rectangle by the aMoveVector.
void Merge(const EDA_RECT &aRect)
Modify the position and size of the rectangle in order to contain aRect.
const EDA_RECT GetBoundingBoxRotated(wxPoint aRotCenter, double aAngle) const
Useful to calculate bounding box of rotated items, when rotation if not k*90 degrees.
bool IntersectsCircle(const wxPoint &aCenter, const int aRadius) const
Test for a common area between a circle and this rectangle.
void SetOrigin(const wxPoint &pos)
bool IntersectsCircleEdge(const wxPoint &aCenter, const int aRadius, const int aWidth) const
Test for intersection between this rect and the edge (radius) of a circle.
EDA_RECT Common(const EDA_RECT &aRect) const
Return the area that is common with another rectangle.
void RevertYAxis()
Mirror the rectangle from the X axis (negate Y pos and size).
void SetSize(int w, int h)
bool Contains(const wxPoint &aPoint) const
const wxPoint GetEnd() const
EDA_RECT(const wxPoint &aPos, const wxSize &aSize)
const wxPoint GetOrigin() const
void SetEnd(int x, int y)
const wxPoint GetPosition() const
const wxPoint FarthestPointTo(const wxPoint &aPoint) const
Return the point in this rect that is farthest from the provided point.
double GetArea() const
Return the area of the rectangle.
bool Contains(int x, int y) const
void Normalize()
Ensures that the height ant width are positive.
void SetSize(const wxSize &size)
Handle the component boundary box.
void SetEnd(const wxPoint &pos)
bool Intersects(const EDA_RECT &aRect) const
Test for a common area between rectangles.
const wxPoint GetCenter() const
void SetOrigin(int x, int y)
void Offset(const wxPoint &offset)
EDA_RECT & Inflate(wxCoord dx, wxCoord dy)
Inflate the rectangle horizontally by dx and vertically by dy.
const wxSize GetSize() const
const wxPoint ClosestPointTo(const wxPoint &aPoint) const
Return the point in this rect that is closest to the provided point.