200 if( aCheckNegativeAngle && aAngle <
ANGLE_0 )
303 if( aMirrorAroundXAxis )
332 m_poly.
Mirror( !aMirrorAroundXAxis, aMirrorAroundXAxis, aCentre );
391 constexpr double HIDE = std::numeric_limits<double>::max();
411 return fp->GetReference();
BITMAPS
A list of all bitmap identifiers.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
BOARD_ITEM_CONTAINER * GetParent() const
wxString GetLayerName() const
Return the name of the PCB layer on which the item resides.
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
EDA_ITEM * m_parent
Linked list: Link (parent struct)
EDA_ANGLE GetArcAngle() const
void RebuildBezierToSegmentsPointsList(int aMinSegLen)
Rebuild the m_bezierPoints vertex list that approximate the Bezier curve by a list of segments.
wxString ShowShape() const
wxString SHAPE_T_asString() const
bool IsParentFlipped() const
VECTOR2I GetArcMid0() const
VECTOR2I m_start0
Start point or circle center, relative to footprint origin, orient 0.
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
virtual void SetDrawCoord()
Set draw coordinates (absolute values ) from relative coordinates.
VECTOR2I GetCenter0() const
VECTOR2I m_arcCenter0
Center of arc, relative to footprint origin, orient 0.
void Flip(const VECTOR2I &aCentre, bool aFlipLeftRight) override
Flip entity relative to aCentre.
VECTOR2I m_end0
End point or circle edge, relative to footprint origin, orient 0.
void Mirror(const VECTOR2I &aCentre, bool aMirrorAroundXAxis) override
Mirror horizontally or vertically.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
virtual void SetLocalCoord()
Set relative coordinates from draw coordinates.
wxString GetParentAsString() const
void SetArcAngleAndEnd0(const EDA_ANGLE &aAngle, bool aCheckNegativeAngle=false)
Sets the angle for arcs, and normalizes it within the range 0 - 360 degrees.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
ARC_MID m_arcMidData_0
Originating Arc data, orient 0.
void SetCenter0(const VECTOR2I &aPt)
VECTOR2I m_bezierC2_0
Bezier Control Point 2, relative to footprint origin, orient 0.
double ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
void SetArcGeometry0(const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd)
void Move(const VECTOR2I &aMoveVector) override
Move this object.
VECTOR2I m_bezierC1_0
Bezier Control Point 1, relative to footprint origin, orient 0.
FP_SHAPE(FOOTPRINT *aParent, SHAPE_T aShape=SHAPE_T::SEGMENT, KICAD_T aItemType=PCB_FP_SHAPE_T)
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.
wxString AsString() const
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
virtual void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
PROPERTY_BASE & SetIsHiddenFromLibraryEditors(bool aIsHidden=true)
Provide class metadata.Helper macro to map type hashes to names.
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
static PROPERTY_MANAGER & Instance()
PROPERTY_BASE & AddProperty(PROPERTY_BASE *aProperty, const wxString &aGroup=wxEmptyString)
Register a property.
void AddTypeCast(TYPE_CAST_BASE *aCast)
Register a type converter.
void Mirror(bool aX=true, bool aY=false, const VECTOR2I &aRef={ 0, 0 })
Mirror the line points about y or x (or both)
void Move(const VECTOR2I &aVector) override
static constexpr EDA_ANGLE & ANGLE_0
#define PCB_EDIT_FRAME_NAME
static struct FP_SHAPE_DESC _FP_SHAPE_DESC
@ LAYER_MOD_FR
show footprints on front
@ LAYER_MOD_BK
show footprints on back
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount)
This file contains miscellaneous commonly used macros and functions.
#define UNIMPLEMENTED_FOR(type)
void MIRROR(T &aPoint, const T &aMirrorRef)
Updates aPoint with the mirror of aPoint relative to the aMirrorRef.
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
#define NO_SETTER(owner, type)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
const VECTOR2I CalcArcCenter(const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd)
Determine the center of an arc or circle given three points on its circumference.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.