160 void SetCenter(
const wxPoint& aCenter );
187 void CalcArcAngles(
double& aStartAngle,
double& aEndAngle )
const;
197 void SetArcGeometry(
const wxPoint& aStart,
const wxPoint& aMid,
const wxPoint& aEnd );
208 void SetCachedArcData(
const wxPoint& aStart,
const wxPoint& aMid,
const wxPoint& aEnd,
const wxPoint& aCenter );
280 bool ignoreLineWidth )
const;
288 void move(
const wxPoint& aMoveVector );
289 void rotate(
const wxPoint& aRotCentre,
double aAngle );
290 void flip(
const wxPoint& aCentre,
bool aFlipLeftRight );
291 void scale(
double aScale );
301 bool hitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const;
302 bool hitTest(
const EDA_RECT& aRect,
bool aContained,
int aAccuracy = 0 )
const;
306 void beginEdit(
const wxPoint& aStartPoint );
308 void calcEdit(
const wxPoint& aPosition );
314 void endEdit(
bool aClosed =
true );
338 #endif // EDA_SHAPE_H
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
const std::vector< wxPoint > & GetBezierPoints() const
void SetFilled(bool aFlag)
void SetEnd(const wxPoint &aEnd)
void SetArcGeometry(const wxPoint &aStart, const wxPoint &aMid, const wxPoint &aEnd)
Set the three controlling points for an arc.
wxPoint getCenter() const
const wxPoint & GetStart() const
Return the starting point of the graphic.
void SetPolyShape(const SHAPE_POLY_SET &aShape)
bool hitTest(const wxPoint &aPosition, int aAccuracy=0) const
void TransformShapeWithClearanceToPolygon(SHAPE_POLY_SET &aCornerBuffer, int aClearanceValue, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth) const
Convert the shape to a closed polygon.
void calcEdit(const wxPoint &aPosition)
void computeArcBBox(EDA_RECT &aBBox) const
bool EndsSwapped() const
Have the start and end points been swapped since they were set?
EDA_SHAPE(SHAPE_T aType, int aLineWidth, FILL_T aFill, bool eeWinding)
std::vector< SHAPE * > MakeEffectiveShapes() const
Make a set of SHAPE objects representing the EDA_SHAPE.
void DupPolyPointsList(std::vector< wxPoint > &aBuffer) const
Duplicate the list of corners in a std::vector<wxPoint>
double GetArcAngle() const
void CalcArcAngles(double &aStartAngle, double &aEndAngle) const
Calc arc start and end angles such that aStartAngle < aEndAngle.
virtual wxPoint getParentPosition() const =0
void setEditState(int aState)
void SetArcAngleAndEnd(double aAngle, bool aCheckNegativeAngle=false)
Set the end point from the angle center and start.
void beginEdit(const wxPoint &aStartPoint)
void SetCachedArcData(const wxPoint &aStart, const wxPoint &aMid, const wxPoint &aEnd, const wxPoint &aCenter)
Set the data used for mid point caching.
void ShapeGetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList)
The base class for create windows for drawing purpose.
wxString ShowShape() const
bool IsPolyShapeValid() const
void endEdit(bool aClosed=true)
Finishes editing the shape.
void SetBezierC1(const wxPoint &aPt)
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
void SetStart(const wxPoint &aStart)
const wxPoint & GetBezierC1() const
void rotate(const wxPoint &aRotCentre, double aAngle)
int GetPointCount() const
std::vector< wxPoint > GetRectCorners() const
const wxPoint & GetEnd() const
Return the ending point of the graphic.
double GetLength() const
Return the length of the track using the hypotenuse calculation.
const SHAPE_POLY_SET & GetPolyShape() const
void move(const wxPoint &aMoveVector)
Represent a set of closed polygons.
std::vector< wxPoint > m_bezierPoints
const wxPoint & GetBezierC2() const
const std::vector< wxPoint > buildBezierToSegmentsPointsList(int aMinSegLen) const
void SetWidth(int aWidth)
a few functions useful in geometry calculations.
void SetCenter(const wxPoint &aCenter)
wxString SHAPE_T_asString() const
void setPosition(const wxPoint &aPos)
int Compare(const EDA_SHAPE *aOther) const
SHAPE_POLY_SET & GetPolyShape()
void RebuildBezierToSegmentsPointsList(int aMinSegLen)
Rebuild the m_bezierPoints vertex list that approximate the Bezier curve by a list of segments.
const EDA_RECT getBoundingBox() const
void SetPolyPoints(const std::vector< wxPoint > &aPoints)
virtual double getParentOrientation() const =0
void SwapShape(EDA_SHAPE *aImage)
wxPoint GetArcMid() const
Handle the component boundary box.
void SetShape(SHAPE_T aShape)
void SetBezierC2(const wxPoint &aPt)
wxPoint getPosition() const
void SetFillMode(FILL_T aFill)
void scale(double aScale)
EDA_MSG_PANEL items for displaying messages.
void flip(const wxPoint &aCentre, bool aFlipLeftRight)
bool continueEdit(const wxPoint &aPosition)
FILL_T GetFillType() const