88 void Serialize( google::protobuf::Any &aContainer )
const override;
89 bool Deserialize(
const google::protobuf::Any &aContainer )
override;
339 void SetRectangle(
const long long int& aHeight,
const long long int& aWidth );
364 ERROR_LOC aErrorLoc,
bool ignoreLineWidth =
false )
const;
380 m_fill = aFlag ? FILL_T::FILLED_SHAPE : FILL_T::NO_FILL;
386 void scale(
double aScale );
393 bool hitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const;
405 void endEdit(
bool aClosed =
true );
417 std::vector<SHAPE*>
makeEffectiveShapes(
bool aEdgeOnly,
bool aLineChainOnly =
false )
const;
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
Generic cubic Bezier representation.
The base class for create windows for drawing purpose.
EDA_ANGLE GetArcAngle() const
const VECTOR2I & GetBezierC2() const
void SetBezierC2(const VECTOR2I &aPt)
void SetCenter(const VECTOR2I &aCenter)
VECTOR2I getCenter() const
void SetLength(const double &aLength)
virtual VECTOR2I GetTopLeft() const
void rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle)
const std::vector< VECTOR2I > buildBezierToSegmentsPointsList(int aMaxError) const
FILL_T GetFillMode() const
long long int m_rectangleHeight
virtual int GetEffectiveWidth() const
COLOR4D GetLineColor() const
int GetRectangleWidth() const
void SetLineStyle(const LINE_STYLE aStyle)
void calcEdit(const VECTOR2I &aPosition)
virtual std::vector< SHAPE * > MakeEffectiveShapes(bool aEdgeOnly=false) const
Make a set of SHAPE objects representing the EDA_SHAPE.
SHAPE_POLY_SET & GetPolyShape()
void CalcArcAngles(EDA_ANGLE &aStartAngle, EDA_ANGLE &aEndAngle) const
Calc arc start and end angles such that aStartAngle < aEndAngle.
void ShapeGetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList)
void SetFilled(bool aFlag)
bool operator==(const EDA_SHAPE &aOther) const
void SetPolyShape(const SHAPE_POLY_SET &aShape)
virtual VECTOR2I GetBotRight() const
virtual void SetBottom(int val)
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
void SetRectangleHeight(const int &aHeight)
virtual void SetTop(int val)
virtual bool IsFilledForHitTesting() const
bool continueEdit(const VECTOR2I &aPosition)
wxString ShowShape() const
void SetFillColor(const COLOR4D &aColor)
std::vector< SHAPE * > makeEffectiveShapes(bool aEdgeOnly, bool aLineChainOnly=false) const
Make a set of SHAPE objects representing the EDA_SHAPE.
bool hitTest(const VECTOR2I &aPosition, int aAccuracy=0) const
void SetCachedArcData(const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd, const VECTOR2I &aCenter)
Set the data used for mid point caching.
void RebuildBezierToSegmentsPointsList(int aMaxError)
Rebuild the m_bezierPoints vertex list that approximate the Bezier curve by a list of segments.
void flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection)
void beginEdit(const VECTOR2I &aStartPoint)
int GetPointCount() const
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
void SetStart(const VECTOR2I &aStart)
void DupPolyPointsList(std::vector< VECTOR2I > &aBuffer) const
Duplicate the list of corners in a std::vector<VECTOR2I>
LINE_STYLE GetLineStyle() const
void endEdit(bool aClosed=true)
Finishes editing the shape.
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
void SetLineColor(const COLOR4D &aColor)
COLOR4D GetFillColor() const
void SetRectangle(const long long int &aHeight, const long long int &aWidth)
void SetShape(SHAPE_T aShape)
void SwapShape(EDA_SHAPE *aImage)
std::vector< VECTOR2I > GetRectCorners() const
void SetSegmentAngle(const EDA_ANGLE &aAngle)
std::vector< VECTOR2I > m_bezierPoints
void setPosition(const VECTOR2I &aPos)
virtual void setFilled(bool aFlag)
const std::vector< VECTOR2I > & GetBezierPoints() const
virtual bool IsProxyItem() const
void computeArcBBox(BOX2I &aBBox) const
void SetEnd(const VECTOR2I &aEnd)
bool EndsSwapped() const
Have the start and end points been swapped since they were set?
void SetRectangleWidth(const int &aWidth)
const SHAPE_POLY_SET & GetPolyShape() const
void SetBezierC1(const VECTOR2I &aPt)
void SetArcGeometry(const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd)
Set the three controlling points for an arc.
virtual void SetLeft(int val)
wxString SHAPE_T_asString() const
double Similarity(const EDA_SHAPE &aOther) const
const VECTOR2I & GetBezierC1() const
const BOX2I getBoundingBox() const
void SetArcAngleAndEnd(const EDA_ANGLE &aAngle, bool aCheckNegativeAngle=false)
Set the end point from the angle center and start.
int GetRectangleHeight() const
virtual int GetWidth() const
VECTOR2I getPosition() const
bool IsClockwiseArc() const
void setEditState(int aState)
void SetPolyPoints(const std::vector< VECTOR2I > &aPoints)
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const
Convert the shape to a closed polygon.
wxString getFriendlyName() const
void SetWidth(int aWidth)
EDA_ANGLE GetSegmentAngle() const
virtual void SetRight(int val)
void SetFillMode(FILL_T aFill)
virtual void SetIsProxyItem(bool aIsProxy=true)
long long int m_rectangleWidth
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
bool IsPolyShapeValid() const
int Compare(const EDA_SHAPE *aOther) const
VECTOR2I GetArcMid() const
A color representation with 4 components: red, green, blue, alpha.
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
EDA_MSG_PANEL items for displaying messages.
Interface for objects that can be serialized to Protobuf messages.
Represent a set of closed polygons.
void Fracture(POLYGON_MODE aFastMode)
Convert a set of polygons with holes to a single outline with "slits"/"fractures" connecting the oute...
int HoleCount(int aOutline) const
Returns the number of holes in a given outline.
int OutlineCount() const
Return the number of outlines in the set.
An abstract shape on 2D plane.
Simple container to manage line stroke parameters.
void SetWidth(int aWidth)
void SetColor(const KIGFX::COLOR4D &aColor)
KIGFX::COLOR4D GetColor() const
@ ARC
use RECTANGLE instead of RECT to avoid collision in a Windows header
@ FILLED_WITH_BG_BODYCOLOR
#define DECLARE_ENUM_TO_WXANY(type)
LINE_STYLE
Dashed line types.
VECTOR2< int32_t > VECTOR2I