69 bool IsType(
const std::vector<KICAD_T>& aScanTypes )
const override
74 for(
KICAD_T scanType : aScanTypes )
83 void Serialize( google::protobuf::Any& aContainer )
const override;
84 bool Deserialize(
const google::protobuf::Any& aContainer )
override;
86 void Serialize( kiapi::board::types::BoardText& aOutput )
const;
87 bool Deserialize(
const kiapi::board::types::BoardText& aInput );
138 const EDA_ANGLE& aParentRotate )
override;
145 bool TextHitTest(
const BOX2I& aRect,
bool aContains,
int aAccuracy = 0 )
const override;
153 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override
155 return TextHitTest( aRect, aContained, aAccuracy );
163 wxString
GetClass()
const override {
return wxT(
"PCB_TEXT" ); }
179 ERROR_LOC aErrorLoc,
bool aIgnoreLineWidth =
false )
const override;
187 int aMaxError )
const;
223 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
231 void buildBoundingHull( SHAPE_POLY_SET* aBuffer,
const SHAPE_POLY_SET& aRenderedText,
int aClearance )
const;
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
BITMAPS
A list of all bitmap identifiers.
Container for design settings for a BOARD object.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
BOARD_ITEM(BOARD_ITEM *aParent, KICAD_T idtype, PCB_LAYER_ID aLayer=F_Cu)
const KIFONT::METRICS & GetFontMetrics() const
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
virtual bool IsType(const std::vector< KICAD_T > &aScanTypes) const
Check whether the item is one of the listed types.
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
An "orientation", held as an angle constrained to the range [0, 360) degrees.
virtual void SetTextPos(const VECTOR2I &aPoint)
EDA_TEXT(const EDA_IU_SCALE &aIuScale, const wxString &aText=wxEmptyString)
FONT is an abstract base class for both outline and stroke fonts.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
EDA_MSG_PANEL items for displaying messages.
void CopyFrom(const BOARD_ITEM *aOther) override
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.
void StyleFromSettings(const BOARD_DESIGN_SETTINGS &settings, bool aCheckSide) override
double Similarity(const BOARD_ITEM &aBoardItem) const override
Return a measure of how likely the other object is to represent the same object.
EDA_ANGLE GetLibTextAngle() const
Text angle in the parent footprint's lib frame, or absolute when not in a footprint.
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aMaxError, ERROR_LOC aErrorLoc, bool aIgnoreLineWidth=false) const override
Convert the item shape to a closed polygon.
void SetTextThickness(int aWidth) override
The TextThickness is that set by the user.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
const KIFONT::METRICS & getFontMetrics() const override
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
EDA_ANGLE GetTextAngle() const override
void swapData(BOARD_ITEM *aImage) override
bool HitTest(const VECTOR2I &aPosition, int aAccuracy) const override
Test if aPosition is inside or on the boundary of this item.
void KeepUpright()
Called when rotating the parent footprint.
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
double GetCoverageArea(int aTextMargin) const override
Return the board area this item covers, used to rank candidates under the cursor so a click on a smal...
void Offset(const VECTOR2I &aOffset) override
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
bool HitTest(const BOX2I &aRect, bool aContained, int aAccuracy=0) const override
Test if aRect intersects this item.
void SetLibTextAngle(const EDA_ANGLE &aAngle)
const SHAPE_POLY_SET & GetKnockoutCache(const KIFONT::FONT *aFont, const wxString &forResolvedText, int aMaxError) const
void SetLibTextThickness(int aWidth)
void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Mirror this object relative to a given horizontal axis the layer is not changed.
double ViewGetLOD(int aLayer, const KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
static bool ClassOf(const EDA_ITEM *aItem)
void SetTextSize(VECTOR2I aNewSize, bool aEnforceMinTextSize=true) override
EDA_ORIENTATION m_libTextAngle
void SetLibTextSize(const VECTOR2I &aSize)
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
VECTOR2I GetTextPos() const override
VECTOR2I GetPosition() const override
PCB_TEXT(BOARD_ITEM *parent, KICAD_T idtype=PCB_TEXT_T)
std::unique_ptr< PCB_TEXT_KNOCKOUT_CACHE_DATA > m_knockout_cache
void SetPosition(const VECTOR2I &aPos) override
PCB_TEXT(PCB_TEXT &&) noexcept=default
bool operator==(const PCB_TEXT &aOther) const
bool HitTest(const SHAPE_LINE_CHAIN &aPoly, bool aContained) const override
Test if aPoly intersects this item.
int getKnockoutMargin() const
void OnFootprintRescaled(double aRatioX, double aRatioY, double aLinearFactor, const VECTOR2I &aAnchor, const EDA_ANGLE &aParentRotate) override
Apply a parent footprint scale to this item.
void TransformTextToPolySet(SHAPE_POLY_SET &aBuffer, int aClearance, int aMaxError, ERROR_LOC aErrorLoc) const
Convert the text to a polygonSet describing the actual character strokes (one per segment).
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT, DRC_CONSTRAINT_T aUsage=NULL_CONSTRAINT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
virtual wxString GetTextTypeDescription() const
std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
void buildBoundingHull(SHAPE_POLY_SET *aBuffer, const SHAPE_POLY_SET &aRenderedText, int aClearance) const
Build a nominally rectangular bounding box for the rendered text.
bool TextHitTest(const VECTOR2I &aPoint, int aAccuracy=0) const override
Test if aPoint is within the bounds of this object.
wxString GetClass() const override
Return the class name.
void Move(const VECTOR2I &aMoveVector) override
Move this object.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
int GetTextThickness() const override
void OnFootprintTransformed() override
Hook for items inside a footprint to refresh after the FP transform changes (translate,...
static HTML_MESSAGE_BOX * ShowSyntaxHelp(wxWindow *aParentWindow)
Display a syntax help window for text variables and expressions.
EDA_ANGLE GetDrawRotation() const override
void SetTextAngle(const EDA_ANGLE &aAngle) override
wxString GetShownText(RESOLUTION_CONTEXT aContext, int aDepth=0) const override
Return the string actually shown after processing of the base text.
VECTOR2I GetTextSize() const override
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
void SetLibTextPos(const VECTOR2I &aPos)
PCB_TEXT & operator=(const PCB_TEXT &aOther)
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Represent a set of closed polygons.
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
@ DEFAULT
Flashing follows connectivity.
PCB_LAYER_ID
A quick note on layer IDs:
TEXT_ATTRIBUTES text_attrs
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
VECTOR2< int32_t > VECTOR2I