73 return tmp_text.
TextHitTest( aPosition, aAccuracy );
138 wxPoint delta( 0, 0 );
234 int rot_angle = aRotateCCW ? -900 : 900;
268 wxASSERT( plotter !=
NULL );
273 wxPoint txtpos = bBox.
Centre();
337 wxPoint txtpos = bBox.
Centre();
366 wxPoint end = rect.
GetEnd();
void MoveTo(const wxPoint &aPosition) override
Move a draw object to aPosition.
#define TEXT_ANGLE_HORIZ
Frequent text rotations, used with {Set,Get}TextAngle(), in 0.1 degrees for now, hoping to migrate to...
void Offset(const wxPoint &aOffset)
wxString MessageTextFromValue(EDA_UNITS aUnits, int aValue, bool aAddUnitLabel, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
void Plot(PLOTTER *aPlotter, const wxPoint &aOffset, bool aFill, const TRANSFORM &aTransform) override
Plot the draw item using the plot object.
Plot settings, and plotting engines (PostScript, Gerber, HPGL and DXF)
EDA_TEXT_VJUSTIFY_T GetVertJustify() const
PNG memory record (file in memory).
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Implementation of conversion functions that require both schematic and board internal units.
Define a symbol library graphical text item.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Display basic info (type, part and convert) about the current item in message panel.
void NormalizeJustification(bool inverse)
void CalcEdit(const wxPoint &aPosition) override
Calculates the attributes of an item at aPosition when it is being edited.
void SetEffects(const EDA_TEXT &aSrc)
Set the text effects from another instance.
void MirrorHorizontal(const wxPoint &aCenter) override
Mirror the draw object along the horizontal (X) axis about aCenter point.
EDA_RECT GetTextBox(int aLine=-1, bool aInvertY=false) const
Useful in multiline texts to calculate the full text or a line area (for zones filling,...
void SetTextPos(const wxPoint &aPoint)
int compare(const LIB_ITEM &aOther, LIB_ITEM::COMPARE_FLAGS aCompareFlags=LIB_ITEM::COMPARE_FLAGS::NORMAL) const override
Provide the draw object specific comparison called by the == and < operators.
const BITMAP_OPAQUE text_xpm[1]
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
double GetTextAngle() const
void SetOrigin(const wxPoint &pos)
void SetTextSize(const wxSize &aNewSize)
void RotatePoint(int *pX, int *pY, double angle)
int GetTextThickness() const
The base class for create windows for drawing purpose.
void RevertYAxis()
Mirror the rectangle from the X axis (negate Y pos and size).
void BeginEdit(const wxPoint aStartPoint) override
Begin drawing a component library draw item at aPosition.
void print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, void *aData, const TRANSFORM &aTransform) override
Print the item to aDC.
The base class for drawable items used by schematic library components.
int GetEffectiveTextPenWidth(int aDefaultWidth=0) const
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultWidth.
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is contained within or on the bounding box of an item.
int GetTextHeight() const
virtual void Text(const wxPoint &aPos, const COLOR4D aColor, const wxString &aText, double aOrient, const wxSize &aSize, enum EDA_TEXT_HJUSTIFY_T aH_justify, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, bool aMultilineAllowed=false, void *aData=NULL)
Draws text with the plotter.
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
const wxPoint GetEnd() const
int m_unit
Unit identification for multiple parts per package.
EDA_TEXT_HJUSTIFY_T GetHorizJustify() const
virtual void SetText(const wxString &aText)
COMPARE_FLAGS
The list of flags used by the compare function.
void Rotate(const wxPoint &aCenter, bool aRotateCCW=true) override
Rotate the object about aCenter point.
const wxPoint GetOrigin() const
void SetEnd(int x, int y)
const wxSize & GetTextSize() const
int m_convert
Shape identification for alternate body styles.
void SetVertJustify(EDA_TEXT_VJUSTIFY_T aType)
Define a library symbol object.
wxString ShortenedShownText() const
Returns a shortened version (max 15 characters) of the shown text.
wxDC * GetPrintDC() const
void MirrorVertical(const wxPoint &aCenter) override
Mirror the draw object along the MirrorVertical (Y) axis about aCenter point.
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Display basic info (type, part and convert) about the current item in message panel.
void GRText(wxDC *aDC, const wxPoint &aPos, COLOR4D aColor, const wxString &aText, double aOrient, const wxSize &aSize, enum EDA_TEXT_HJUSTIFY_T aH_justify, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, void(*aCallback)(int x0, int y0, int xf, int yf, void *aData), void *aCallbackData, PLOTTER *aPlotter)
Function GRText Draw a graphic text (like footprint texts)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Base plotter engine class.
void Offset(const wxPoint &aOffset) override
Set the drawing object by aOffset from the current position.
RENDER_SETTINGS * RenderSettings()
BITMAP_DEF GetMenuImage() const override
Return a pointer to an image to be used in menus.
TRANSFORM DefaultTransform
const EDA_RECT GetBoundingBox() const override
void SetHorizJustify(EDA_TEXT_HJUSTIFY_T aType)
Handle the component boundary box.
virtual bool TextHitTest(const wxPoint &aPoint, int aAccuracy=0) const
Test if aPoint is within the bounds of this object.
A base class for most all the KiCad significant classes used in schematics and boards.
int GetPenWidth() const override
std::vector< MSG_PANEL_ITEM > MSG_PANEL_ITEMS
int GetDefaultPenWidth() const
const wxPoint & GetTextPos() const
#define DEFAULT_TEXT_SIZE
Ratio of the font height to the baseline of the text above the wire.
int GetMinPenWidth() const
virtual void SetTextAngle(double aAngle)
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
EDA_MSG_ITEM is used EDA_MSG_PANEL as the item type for displaying messages.
Message panel definition file.
virtual int compare(const LIB_ITEM &aOther, LIB_ITEM::COMPARE_FLAGS aCompareFlags=LIB_ITEM::COMPARE_FLAGS::NORMAL) const
Provide the draw object specific comparison called by the == and < operators.
virtual const wxString & GetText() const
Return the string associated with the text object.
virtual wxString GetShownText(int aDepth=0) const
Return the string actually shown after processing of the base text.
LIB_TEXT(LIB_PART *aParent)
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
KICAD_T Type() const
Returns the type of object.
A color representation with 4 components: red, green, blue, alpha.
bool GetColorMode() const