KiCad PCB EDA Suite
|
A mix-in class (via multiple inheritance) that handles texts such as labels, parts, components, or footprints. More...
#include <eda_text.h>
Public Member Functions | |
EDA_TEXT (const EDA_IU_SCALE &aIuScale, const wxString &aText=wxEmptyString) | |
EDA_TEXT (const EDA_TEXT &aText) | |
virtual | ~EDA_TEXT () |
EDA_TEXT & | operator= (const EDA_TEXT &aItem) |
virtual const wxString & | GetText () const |
Return the string associated with the text object. More... | |
virtual wxString | GetShownText (bool aAllowExtraText, int aDepth=0) const |
Return the string actually shown after processing of the base text. More... | |
bool | HasTextVars () const |
Indicates the ShownText has text var references which need to be processed. More... | |
virtual void | SetText (const wxString &aText) |
void | SetTextThickness (int aWidth) |
The TextThickness is that set by the user. More... | |
int | GetTextThickness () const |
int | GetEffectiveTextPenWidth (int aDefaultPenWidth=0) const |
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultPenWidth. More... | |
virtual void | SetTextAngle (const EDA_ANGLE &aAngle) |
const EDA_ANGLE & | GetTextAngle () const |
void | SetTextAngleDegrees (double aOrientation) |
double | GetTextAngleDegrees () const |
void | SetItalic (bool aItalic) |
bool | IsItalic () const |
void | SetBold (bool aBold) |
void | SetBoldFlag (bool aBold) |
bool | IsBold () const |
virtual void | SetVisible (bool aVisible) |
virtual bool | IsVisible () const |
void | SetMirrored (bool isMirrored) |
bool | IsMirrored () const |
void | SetMultilineAllowed (bool aAllow) |
bool | IsMultilineAllowed () const |
void | SetHorizJustify (GR_TEXT_H_ALIGN_T aType) |
GR_TEXT_H_ALIGN_T | GetHorizJustify () const |
void | SetVertJustify (GR_TEXT_V_ALIGN_T aType) |
GR_TEXT_V_ALIGN_T | GetVertJustify () const |
void | SetKeepUpright (bool aKeepUpright) |
bool | IsKeepUpright () const |
void | FlipHJustify () |
void | SetAttributes (const EDA_TEXT &aSrc, bool aSetPosition=true) |
Set the text attributes from another instance. More... | |
void | SwapAttributes (EDA_TEXT &aTradingPartner) |
Swap the text attributes of the two involved instances. More... | |
void | SwapText (EDA_TEXT &aTradingPartner) |
void | CopyText (const EDA_TEXT &aSrc) |
void | SetAttributes (const TEXT_ATTRIBUTES &aTextAttrs) |
const TEXT_ATTRIBUTES & | GetAttributes () const |
bool | Replace (const EDA_SEARCH_DATA &aSearchData) |
Helper function used in search and replace dialog. More... | |
bool | IsDefaultFormatting () const |
void | SetFont (KIFONT::FONT *aFont) |
KIFONT::FONT * | GetFont () const |
wxString | GetFontName () const |
void | SetFontIndex (int aIdx) |
int | GetFontIndex () const |
void | SetLineSpacing (double aLineSpacing) |
double | GetLineSpacing () const |
void | SetTextSize (VECTOR2I aNewSize, bool aEnforceMinTextSize=true) |
VECTOR2I | GetTextSize () const |
void | SetTextWidth (int aWidth) |
int | GetTextWidth () const |
void | SetTextHeight (int aHeight) |
int | GetTextHeight () const |
void | SetTextColor (const COLOR4D &aColor) |
COLOR4D | GetTextColor () const |
void | SetTextPos (const VECTOR2I &aPoint) |
const VECTOR2I & | GetTextPos () const |
void | SetTextX (int aX) |
void | SetTextY (int aY) |
void | Offset (const VECTOR2I &aOffset) |
void | Empty () |
void | Print (const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset, const COLOR4D &aColor, OUTLINE_MODE aDisplay_mode=FILLED) |
Print this text object to the device context aDC. More... | |
std::shared_ptr< SHAPE_COMPOUND > | GetEffectiveTextShape (bool aTriangulate=true, const BOX2I &aBBox=BOX2I(), const EDA_ANGLE &aAngle=ANGLE_0) const |
build a list of segments (SHAPE_SEGMENT) to describe a text shape. More... | |
virtual bool | TextHitTest (const VECTOR2I &aPoint, int aAccuracy=0) const |
Test if aPoint is within the bounds of this object. More... | |
virtual bool | TextHitTest (const BOX2I &aRect, bool aContains, int aAccuracy=0) const |
Test if object bounding box is contained within or intersects aRect. More... | |
BOX2I | GetTextBox (int aLine=-1, bool aInvertY=false) const |
Useful in multiline texts to calculate the full text or a line area (for zones filling, locate functions....) More... | |
int | GetInterline () const |
Return the distance between two lines of text. More... | |
wxString | GetTextStyleName () const |
void | GetLinePositions (std::vector< VECTOR2I > &aPositions, int aLineCount) const |
Populate aPositions with the position of each line of a multiline text, according to the vertical justification and the rotation of the whole text. More... | |
double | Levenshtein (const EDA_TEXT &aOther) const |
Return the levenstein distance between two texts. More... | |
double | Similarity (const EDA_TEXT &aOther) const |
virtual void | Format (OUTPUTFORMATTER *aFormatter, int aNestLevel, int aControlBits) const |
Output the object to aFormatter in s-expression form. More... | |
virtual EDA_ANGLE | GetDrawRotation () const |
virtual VECTOR2I | GetDrawPos () const |
virtual void | ClearRenderCache () |
virtual void | ClearBoundingBoxCache () |
std::vector< std::unique_ptr< KIFONT::GLYPH > > * | GetRenderCache (const KIFONT::FONT *aFont, const wxString &forResolvedText, const VECTOR2I &aOffset={ 0, 0 }) const |
void | SetupRenderCache (const wxString &aResolvedText, const EDA_ANGLE &aAngle) |
void | AddRenderCacheGlyph (const SHAPE_POLY_SET &aPoly) |
int | Compare (const EDA_TEXT *aOther) const |
bool | operator== (const EDA_TEXT &aRhs) const |
bool | operator< (const EDA_TEXT &aRhs) const |
bool | operator> (const EDA_TEXT &aRhs) const |
virtual bool | HasHyperlink () const |
wxString | GetHyperlink () const |
void | SetHyperlink (wxString aLink) |
void | RemoveHyperlink () |
Static Public Member Functions | |
static GR_TEXT_H_ALIGN_T | MapHorizJustify (int aHorizJustify) |
static GR_TEXT_V_ALIGN_T | MapVertJustify (int aVertJustify) |
static bool | ValidateHyperlink (const wxString &aURL) |
Check if aURL is a valid hyperlink. More... | |
static bool | IsGotoPageHref (const wxString &aHref, wxString *aDestination=nullptr) |
Check if aHref is a valid internal hyperlink. More... | |
static wxString | GotoPageHref (const wxString &aDestination) |
Generate a href to a page in the current schematic. More... | |
Protected Member Functions | |
virtual KIFONT::FONT * | getDrawFont () const |
virtual const KIFONT::METRICS & | getFontMetrics () const |
virtual void | cacheShownText () |
void | printOneLineOfText (const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset, const COLOR4D &aColor, OUTLINE_MODE aFillMode, const wxString &aText, const VECTOR2I &aPos) |
Print each line of this EDA_TEXT. More... | |
Protected Attributes | |
wxString | m_hyperlink |
A hyperlink URL. More... | |
Private Attributes | |
wxString | m_text |
wxString | m_shown_text |
bool | m_shown_text_has_text_var_refs |
std::reference_wrapper< const EDA_IU_SCALE > | m_IuScale |
wxString | m_render_cache_text |
const KIFONT::FONT * | m_render_cache_font |
EDA_ANGLE | m_render_cache_angle |
VECTOR2I | m_render_cache_offset |
std::vector< std::unique_ptr< KIFONT::GLYPH > > | m_render_cache |
bool | m_bounding_box_cache_valid |
VECTOR2I | m_bounding_box_cache_pos |
int | m_bounding_box_cache_line |
bool | m_bounding_box_cache_inverted |
BOX2I | m_bounding_box_cache |
TEXT_ATTRIBUTES | m_attributes |
VECTOR2I | m_pos |
A mix-in class (via multiple inheritance) that handles texts such as labels, parts, components, or footprints.
Because it's a mix-in class, care is used to provide function names (accessors) that to not collide with function names likely to be seen in the combined derived classes.
Definition at line 79 of file eda_text.h.
EDA_TEXT::EDA_TEXT | ( | const EDA_IU_SCALE & | aIuScale, |
const wxString & | aText = wxEmptyString |
||
) |
Definition at line 91 of file eda_text.cpp.
References DEFAULT_SIZE_TEXT, m_IuScale, m_shown_text, m_shown_text_has_text_var_refs, m_text, EDA_UNIT_UTILS::Mils2IU(), SetTextSize(), and UnescapeString().
EDA_TEXT::EDA_TEXT | ( | const EDA_TEXT & | aText | ) |
Definition at line 115 of file eda_text.cpp.
References m_attributes, m_bounding_box_cache, m_bounding_box_cache_inverted, m_bounding_box_cache_line, m_bounding_box_cache_valid, m_pos, m_render_cache, m_render_cache_angle, m_render_cache_font, m_render_cache_offset, m_render_cache_text, m_shown_text, m_shown_text_has_text_var_refs, and m_text.
|
virtual |
Definition at line 147 of file eda_text.cpp.
void EDA_TEXT::AddRenderCacheGlyph | ( | const SHAPE_POLY_SET & | aPoly | ) |
Definition at line 555 of file eda_text.cpp.
References m_render_cache.
|
protectedvirtual |
Reimplemented in SCH_LABEL_BASE.
Definition at line 464 of file eda_text.cpp.
References ClearRenderCache(), m_bounding_box_cache_valid, m_shown_text, m_shown_text_has_text_var_refs, m_text, and UnescapeString().
Referenced by SCH_LABEL_BASE::cacheShownText(), CopyText(), Replace(), SetText(), and SwapText().
|
virtual |
Definition at line 505 of file eda_text.cpp.
References m_bounding_box_cache_valid.
Referenced by SCH_FIELD::ClearCaches(), EESCHEMA_HELPERS::LoadSchematic(), SCH_EDIT_FRAME::RecomputeIntersheetRefs(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow().
|
virtual |
Reimplemented in SCH_FIELD, and PCB_DIMENSION_BASE.
Definition at line 499 of file eda_text.cpp.
References m_render_cache.
Referenced by cacheShownText(), SCH_FIELD::ClearRenderCache(), PCB_DIMENSION_BASE::ClearRenderCache(), Empty(), SCH_TABLE::Normalize(), PCB_TABLE::Normalize(), Replace(), SetAttributes(), SetBoldFlag(), SetFont(), SetHorizJustify(), SetItalic(), SetKeepUpright(), SetLineSpacing(), SetMirrored(), SetMultilineAllowed(), SetTextAngle(), SetTextHeight(), SetTextSize(), SetTextThickness(), SetTextWidth(), SetVertJustify(), SetVisible(), SwapAttributes(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), and EE_POINT_EDITOR::updateParentItem().
int EDA_TEXT::Compare | ( | const EDA_TEXT * | aOther | ) | const |
Definition at line 1064 of file eda_text.cpp.
References TEXT_ATTRIBUTES::Compare(), GetFontName(), m_attributes, m_pos, m_text, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by operator<(), operator==(), and operator>().
void EDA_TEXT::CopyText | ( | const EDA_TEXT & | aSrc | ) |
Definition at line 190 of file eda_text.cpp.
References cacheShownText(), and m_text.
Referenced by LIB_FIELD::Copy().
void EDA_TEXT::Empty | ( | ) |
Definition at line 456 of file eda_text.cpp.
References ClearRenderCache(), m_bounding_box_cache_valid, and m_text.
Referenced by SCH_IO_KICAD_LEGACY_LIB_CACHE::LoadPart().
|
inline |
Definition at line 169 of file eda_text.h.
References GetHorizJustify(), GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, and SetHorizJustify().
Referenced by SCH_TEXT::MirrorHorizontally(), SCH_TEXT::MirrorSpinStyle(), SCH_TEXT::MirrorVertically(), and SCH_TEXT::Rotate90().
|
virtual |
Output the object to aFormatter in s-expression form.
aFormatter | The OUTPUTFORMATTER object to write to. |
aNestLevel | The indentation next level. |
aControlBits | The control bit definition for object specific formatting. |
IO_ERROR | on write error. |
Definition at line 913 of file eda_text.cpp.
References CTL_OMIT_HIDE, FormatDouble2Str(), EDA_UNIT_UTILS::FormatInternalUnits(), GetFont(), GetHorizJustify(), GetHyperlink(), GetLineSpacing(), GetTextColor(), GetTextHeight(), GetTextThickness(), GetTextWidth(), GetVertJustify(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, HasHyperlink(), IsBold(), IsItalic(), IsMirrored(), IsVisible(), KiROUND(), m_IuScale, OUTPUTFORMATTER::Print(), and OUTPUTFORMATTER::Quotew().
Referenced by SCH_IO_KICAD_SEXPR_LIB_CACHE::saveField(), and SCH_IO_KICAD_SEXPR::saveField().
|
inline |
Definition at line 192 of file eda_text.h.
References m_attributes.
Referenced by BOARD_ADAPTER::addText(), PCB_IO_IPC2581::addText(), KIGFX::DS_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), DS_DRAW_ITEM_TEXT::GetApproxBBox(), GetEffectiveTextShape(), GetRenderCache(), std::hash< EDA_TEXT >::operator()(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), LIB_FIELD::Plot(), LIB_TEXT::Plot(), BRDITEMS_PLOTTER::PlotText(), PCB_TEXT::TransformTextToPolySet(), and PCB_TEXTBOX::TransformTextToPolySet().
|
protectedvirtual |
Reimplemented in LIB_FIELD, LIB_TEXT, LIB_TEXTBOX, SCH_FIELD, SCH_TEXT, and SCH_TEXTBOX.
Definition at line 482 of file eda_text.cpp.
References GetFont(), KIFONT::FONT::GetFont(), IsBold(), and IsItalic().
Referenced by GetEffectiveTextShape(), GetInterline(), PCB_TEXTBOX::GetShownText(), GetTextBox(), PCB_TEXT::TransformTextToPolySet(), and PCB_TEXTBOX::TransformTextToPolySet().
|
inlinevirtual |
Reimplemented in LIB_TEXTBOX, SCH_TEXTBOX, and PCB_TEXTBOX.
Definition at line 339 of file eda_text.h.
References GetTextPos().
Referenced by BOARD_ADAPTER::addText(), PCB_TEXT::buildBoundingHull(), KIGFX::SCH_PAINTER::draw(), GetEffectiveTextShape(), GetLinePositions(), GetRenderCache(), GetTextBox(), Print(), and TextHitTest().
|
inlinevirtual |
Reimplemented in SCH_FIELD, and PCB_TEXT.
Definition at line 338 of file eda_text.h.
References GetTextAngle().
Referenced by BOARD_ADAPTER::addText(), PCB_IO_IPC2581::addText(), KIGFX::SCH_PAINTER::draw(), PCB_IO_KICAD_SEXPR::formatRenderCache(), PCB_TEXTBOX::GetAnchorAndOppositeCorner(), PCB_TEXTBOX::GetBotRight(), PCB_TEXTBOX::GetDrawPos(), GetEffectiveTextShape(), GetLinePositions(), GetRenderCache(), PCB_TEXTBOX::GetTopLeft(), SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotText(), SCH_TEXT::Print(), printOneLineOfText(), PCB_TEXTBOX::SetBottom(), PCB_TEXTBOX::SetLeft(), PCB_TEXTBOX::SetRight(), PCB_TEXTBOX::SetTop(), and TextHitTest().
int EDA_TEXT::GetEffectiveTextPenWidth | ( | int | aDefaultPenWidth = 0 | ) | const |
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultPenWidth.
Definition at line 324 of file eda_text.cpp.
References Clamp_Text_PenSize(), GetPenSizeForBold(), GetPenSizeForNormal(), GetTextSize(), GetTextThickness(), GetTextWidth(), and IsBold().
Referenced by BOARD_ADAPTER::addText(), PCB_IO_IPC2581::addText(), KIGFX::DS_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), SCH_LABEL_BASE::GetBodyBoundingBox(), SCH_LABEL::GetBodyBoundingBox(), SCH_HIERLABEL::GetBodyBoundingBox(), GetEffectiveTextShape(), LIB_FIELD::GetPenWidth(), LIB_TEXT::GetPenWidth(), SCH_FIELD::GetPenWidth(), SCH_DIRECTIVE_LABEL::GetPenWidth(), SCH_TEXT::GetPenWidth(), GetTextBox(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), LIB_TEXT::Plot(), LIB_TEXTBOX::Plot(), BRDITEMS_PLOTTER::PlotText(), SCH_FIELD::Print(), LIB_TEXT::print(), LIB_TEXTBOX::print(), printOneLineOfText(), PCB_TEXT::TransformTextToPolySet(), PCB_TEXTBOX::TransformTextToPolySet(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_RADIAL::updateGeometry(), PCB_DIM_LEADER::updateGeometry(), PCB_DIM_ALIGNED::updateText(), and PCB_DIM_ORTHOGONAL::updateText().
std::shared_ptr< SHAPE_COMPOUND > EDA_TEXT::GetEffectiveTextShape | ( | bool | aTriangulate = true , |
const BOX2I & | aBBox = BOX2I() , |
||
const EDA_ANGLE & | aAngle = ANGLE_0 |
||
) | const |
build a list of segments (SHAPE_SEGMENT) to describe a text shape.
aTriangulate | true to build also the triangulation of each shape |
aUseTextRotation | true to use the actual text draw rotation. false to build a list of shape for a not rotated text ("native" shapes). |
Definition at line 985 of file eda_text.cpp.
References SHAPE_SIMPLE::Append(), KIFONT::FONT::Draw(), KIGFX::GAL::DrawGlyphs(), GetAttributes(), BOX2< Vec >::GetCenter(), getDrawFont(), GetDrawPos(), GetDrawRotation(), GetEffectiveTextPenWidth(), getFontMetrics(), GetRenderCache(), GetShownText(), BOX2< Vec >::GetWidth(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_V_ALIGN_CENTER, KIFONT::FONT::IsOutline(), TEXT_ATTRIBUTES::m_Angle, TEXT_ATTRIBUTES::m_Halign, and TEXT_ATTRIBUTES::m_Valign.
Referenced by PCB_DIMENSION_BASE::GetEffectiveShape(), PCB_TEXT::GetEffectiveShape(), PCB_TEXTBOX::GetEffectiveShape(), EE_SELECTION_TOOL::GuessSelectionCandidates(), and PCB_SELECTION_TOOL::hitTestDistance().
|
inline |
Definition at line 208 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Font.
Referenced by BOARD_ADAPTER::addText(), PCB_IO_IPC2581::addText(), SCH_EDIT_TOOL::ChangeTextType(), DIALOG_LIB_FIELD_PROPERTIES::DIALOG_LIB_FIELD_PROPERTIES(), DIALOG_SCH_FIELD_PROPERTIES::DIALOG_SCH_FIELD_PROPERTIES(), KIGFX::DS_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), PCB_IO_KICAD_SEXPR::format(), Format(), PCB_IO_KICAD_SEXPR::formatRenderCache(), getDrawFont(), LIB_FIELD::getDrawFont(), LIB_TEXT::getDrawFont(), LIB_TEXTBOX::getDrawFont(), SCH_FIELD::getDrawFont(), SCH_TEXT::getDrawFont(), SCH_TEXTBOX::getDrawFont(), KIGFX::SCH_PAINTER::getFont(), GetFontIndex(), GetFontName(), LIB_FIELD::GetMsgPanelInfo(), LIB_TEXT::GetMsgPanelInfo(), LIB_TEXTBOX::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), SCH_LABEL_BASE::GetMsgPanelInfo(), SCH_TABLECELL::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_TABLECELL::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), SCH_FIELD::GetRenderCache(), LIB_TEXTBOX::GetShownText(), SCH_TEXTBOX::GetShownText(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), LIB_FIELD::Plot(), LIB_TEXT::Plot(), LIB_TEXTBOX::Plot(), BRDITEMS_PLOTTER::PlotText(), SCH_FIELD::Print(), LIB_FIELD::print(), LIB_TEXT::print(), LIB_TEXTBOX::print(), SCH_TEXT::Print(), printOneLineOfText(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow().
int EDA_TEXT::GetFontIndex | ( | ) | const |
Definition at line 854 of file eda_text.cpp.
References Fontconfig(), GetFont(), KIFONT::FONT::GetName(), KICAD_FONT_NAME, and Pgm().
Referenced by EDA_TEXT_DESC::EDA_TEXT_DESC().
|
protectedvirtual |
Reimplemented in SCH_FIELD, SCH_TEXT, SCH_TEXTBOX, DS_DRAW_ITEM_TEXT, PCB_TEXT, and PCB_TEXTBOX.
Definition at line 493 of file eda_text.cpp.
References KIFONT::METRICS::Default().
Referenced by GetEffectiveTextShape(), GetInterline(), GetRenderCache(), GetTextBox(), and printOneLineOfText().
wxString EDA_TEXT::GetFontName | ( | ) | const |
Definition at line 845 of file eda_text.cpp.
References GetFont(), and KIFONT::FONT::GetName().
Referenced by Compare(), and IsDefaultFormatting().
|
inline |
Definition at line 161 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Halign.
Referenced by SCH_EDIT_TOOL::ChangeTextType(), LIB_TEXTBOX::compare(), SCH_DRAWING_TOOLS::createNewText(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SCH_DRAWING_TOOLS::DrawShape(), EDA_TEXT_DESC::EDA_TEXT_DESC(), AUTOPLACER::fieldHPlacement(), FlipHJustify(), Format(), LIB_TEXTBOX::GetDrawPos(), SCH_TEXTBOX::GetDrawPos(), PCB_TEXTBOX::GetDrawPos(), LIB_FIELD::GetEffectiveHorizJustify(), SCH_FIELD::GetEffectiveHorizJustify(), LIB_FIELD::GetMsgPanelInfo(), LIB_TEXT::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_LABEL_BASE::GetSpinStyle(), GetTextBox(), hash_fp_item(), IsDefaultFormatting(), SCH_FIELD::IsHorizJustifyFlipped(), PCB_TEXT::KeepUpright(), SCH_IO_EAGLE::loadFieldAttributes(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), SCH_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), PCB_TEXT::Mirror(), LIB_TEXT::MirrorHorizontal(), LIB_TEXTBOX::MirrorHorizontally(), SCH_TEXTBOX::MirrorHorizontally(), LIB_TEXT::MirrorVertical(), LIB_TEXTBOX::MirrorVertically(), SCH_TEXTBOX::MirrorVertically(), LIB_TEXT::NormalizeJustification(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_FIELD::Plot(), positioningChanged(), LIB_FIELD::print(), printOneLineOfText(), processTextItem(), LIB_TEXT::Rotate(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 359 of file eda_text.h.
References m_hyperlink.
Referenced by SCH_EDIT_TOOL::ChangeTextType(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), and DIALOG_TEXT_PROPERTIES::TransferDataToWindow().
int EDA_TEXT::GetInterline | ( | ) | const |
Return the distance between two lines of text.
Calculates the distance (pitch) between two lines of text. This distance includes the interline distance plus room for characters like j, {, and [. It also used for single line text, to calculate the text bounding box.
Definition at line 561 of file eda_text.cpp.
References getDrawFont(), getFontMetrics(), GetInterline(), GetTextHeight(), and KiROUND().
Referenced by CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), GetInterline(), and GetLinePositions().
void EDA_TEXT::GetLinePositions | ( | std::vector< VECTOR2I > & | aPositions, |
int | aLineCount | ||
) | const |
Populate aPositions with the position of each line of a multiline text, according to the vertical justification and the rotation of the whole text.
aPositions | is the list to populate by the VECTOR2I positions. |
aLineCount | is the number of lines (not recalculated here for efficiency reasons. |
Definition at line 755 of file eda_text.cpp.
References GetDrawPos(), GetDrawRotation(), GetInterline(), GetVertJustify(), GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_INDETERMINATE, GR_TEXT_V_ALIGN_TOP, RotatePoint(), and VECTOR2< T >::y.
Referenced by SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), BRDITEMS_PLOTTER::PlotText(), and Print().
|
inline |
Definition at line 216 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_LineSpacing.
Referenced by Format().
std::vector< std::unique_ptr< KIFONT::GLYPH > > * EDA_TEXT::GetRenderCache | ( | const KIFONT::FONT * | aFont, |
const wxString & | forResolvedText, | ||
const VECTOR2I & | aOffset = { 0, 0 } |
||
) | const |
Definition at line 512 of file eda_text.cpp.
References GetAttributes(), GetDrawPos(), GetDrawRotation(), getFontMetrics(), KIFONT::OUTLINE_FONT::GetLinesAsGlyphs(), KIFONT::FONT::IsOutline(), TEXT_ATTRIBUTES::m_Angle, m_render_cache, m_render_cache_angle, m_render_cache_font, m_render_cache_offset, and m_render_cache_text.
Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), PCB_IO_KICAD_SEXPR::formatRenderCache(), and GetEffectiveTextShape().
|
inlinevirtual |
Return the string actually shown after processing of the base text.
aAllowExtraText | is true to allow adding more text than the initial expanded text, for intance a title, a prefix for texts in display functions. False to disable any added text (for instance when writing the shown text in netlists). |
aDepth | is used to prevent infinite recursions and loops when expanding text variables. |
Reimplemented in LIB_FIELD, LIB_TEXTBOX, SCH_FIELD, SCH_LABEL_BASE, SCH_TEXT, SCH_TEXTBOX, PCB_TEXT, and PCB_TEXTBOX.
Definition at line 106 of file eda_text.h.
References m_shown_text.
Referenced by BOARD_ADAPTER::addText(), SCH_LABEL_BASE::cacheShownText(), KIGFX::DS_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), PCB_IO_KICAD_SEXPR::formatRenderCache(), PCB_IO_IPC2581::generateLayerSetNet(), DS_DRAW_ITEM_TEXT::GetApproxBBox(), GetEffectiveTextShape(), LIB_FIELD::GetShownText(), LIB_TEXTBOX::GetShownText(), PCB_TEXT::GetShownText(), PCB_TEXTBOX::GetShownText(), SCH_FIELD::GetShownText(), SCH_TEXT::GetShownText(), SCH_TEXTBOX::GetShownText(), SCH_LABEL_BASE::GetShownText(), GetTextBox(), BRDITEMS_PLOTTER::PlotText(), Print(), LIB_TEXT::print(), SCH_LABEL_BASE::SCH_LABEL_BASE(), and DRC_TEST_PROVIDER_MISC::testTextVars().
|
inlinevirtual |
Return the string associated with the text object.
Definition at line 95 of file eda_text.h.
References m_text.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), SCH_IO_EAGLE::addImplicitConnections(), SCH_SHEET_PATH::AddNewSymbolInstances(), NETLIST_EXPORTER_XML::addSymbolFields(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextCodeIfExists(), SCH_EDIT_FRAME::AutoRotateItem(), EE_SELECTION_TOOL::autostartEvent(), BOOST_AUTO_TEST_CASE(), CONNECTION_GRAPH::buildConnectionGraph(), SCH_EDIT_TOOL::ChangeTextType(), CheckLibSymbol(), LEGACY_POWER_SYMBOLS_TEST_FIXTURE::CheckSymbols(), SCH_SHEET::CleanupSheet(), LIB_FIELD::compare(), LIB_TEXT::compare(), LIB_TEXTBOX::compare(), SCH_BUS_WIRE_ENTRY::ConnectionPropagatesTo(), SCH_DRAWING_TOOLS::createNewText(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), DIALOG_LIB_FIELD_PROPERTIES::DIALOG_LIB_FIELD_PROPERTIES(), DIALOG_SCH_FIELD_PROPERTIES::DIALOG_SCH_FIELD_PROPERTIES(), EE_INSPECTION_TOOL::DiffSymbol(), KIGFX::SCH_PAINTER::draw(), EDA_TEXT_DESC::EDA_TEXT_DESC(), CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), LIB_SYMBOL::Flatten(), PCB_IO_KICAD_SEXPR::format(), FormatProbeItem(), CONNECTION_GRAPH::generateBusAliasMembers(), PCB_IO_IPC2581::generateComponents(), LIB_SYMBOL::GetDescription(), getFieldFunc(), LIB_SYMBOL::GetFootprint(), SCH_SYMBOL::GetFootprintFieldText(), LIB_FIELD::GetFullText(), SCH_LABEL_BASE::GetIntersheetRefs(), LIB_FIELD::GetItemDescription(), LIB_TEXT::GetItemDescription(), SCH_FIELD::GetItemDescription(), SCH_SHEET_PIN::GetItemDescription(), SCH_TEXT::GetItemDescription(), DS_DRAW_ITEM_TEXT::GetItemDescription(), PCB_DIMENSION_BASE::GetItemDescription(), PCB_FIELD::GetItemDescription(), PCB_TEXT::GetItemDescription(), PCB_TEXTBOX::GetItemDescription(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet(), getMatchingTextItem(), LIB_FIELD::GetMsgPanelInfo(), LIB_TEXT::GetMsgPanelInfo(), LIB_TEXTBOX::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), SCH_LABEL_BASE::GetMsgPanelInfo(), SCH_PIN::GetMsgPanelInfo(), SCH_TABLECELL::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_DIM_LEADER::GetMsgPanelInfo(), PCB_TABLECELL::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), GetNetNavigatorItemText(), LIB_SYMBOL::GetPrefix(), SCH_SYMBOL::GetRef(), FOOTPRINT::GetReference(), LIB_SYMBOL::GetSearchTerms(), SCH_LABEL_BASE::GetShownText(), SCH_TEXT::GetShownText(), SCH_TEXTBOX::GetShownText(), FOOTPRINT::GetValue(), FP_TEXT_GRID_TABLE::GetValue(), SCH_SYMBOL::GetValueFieldText(), SCH_LABEL_BASE::HasConnectivityChanges(), SCH_SHEET_PIN::HasConnectivityChanges(), hash_fp_item(), SCH_SHEET::HasUndefinedPins(), LIB_FIELD::HitTest(), SCH_LABEL_BASE::IncrementLabel(), SCH_FIELD::IsEmpty(), DIALOG_CHANGE_SYMBOLS::isMatch(), Levenshtein(), CADSTAR_SCH_ARCHIVE_LOADER::Load(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromLibrary(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), SCH_IO_EAGLE::loadSchematic(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances(), SCH_IO_EAGLE::loadSegments(), SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic(), LIB_TEXTBOX::Matches(), SCH_FIELD::Matches(), SCH_LABEL_BASE::Matches(), SCH_SHEET_PIN::Matches(), SCH_TEXT::Matches(), SCH_TEXTBOX::Matches(), PCB_TEXT::Matches(), PCB_TEXTBOX::Matches(), DIALOG_SHEET_PIN_PROPERTIES::onComboBox(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), std::hash< EDA_TEXT >::operator()(), SCH_FIELD::operator<(), SCH_TEXT::operator<(), SCH_TEXTBOX::operator<(), operator<<(), LIB_FIELD::operator=(), SCH_FIELD::operator==(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_ALTIUM::ParseLibFile(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_IO_KICAD_SEXPR_PARSER::parseSchematicSymbol(), SCH_EDITOR_CONTROL::Paste(), LIB_FIELD::Plot(), LIB_TEXT::Plot(), PlotInteractiveLayer(), DIALOG_RESCUE_EACH::PopulateInstanceList(), LIB_FIELD::print(), DIALOG_CHANGE_SYMBOLS::processSymbols(), processTextItem(), SCH_EDIT_FRAME::PutDataInPreviousState(), NETLIST_EXPORTER_SPICE_MODEL::readPorts(), SCHEMATIC::RecomputeIntersheetRefs(), SYMBOL_EDITOR_CONTROL::RenameSymbol(), SCH_FIELD::Replace(), SCH_GLOBALLABEL::ResolveTextVar(), SCH_COMMIT::Revert(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_SEXPR::saveField(), CLIPBOARD_IO::SaveSelection(), SCH_IO_KICAD_LEGACY::saveSheet(), SCH_IO_KICAD_LEGACY_LIB_CACHE::SaveSymbol(), SCH_IO_KICAD_LEGACY::saveSymbol(), SCH_IO_KICAD_SEXPR::saveSymbol(), SYMBOL_EDIT_FRAME::saveSymbolCopyAs(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveText(), SCH_IO_KICAD_LEGACY::saveText(), SCH_IO_KICAD_SEXPR::saveText(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveTextBox(), SCH_IO_KICAD_SEXPR::saveTextBox(), SCH_EDIT_FRAME::SendSelectItemsToPcb(), SCH_IO_LTSPICE_PARSER::setTextJustification(), SYMBOL_EDIT_FRAME::setupUIConditions(), SYMBOL_VIEWER_FRAME::setupUIConditions(), EE_INSPECTION_TOOL::ShowDatasheet(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), SCH_FIELD::Similarity(), SCH_SHEET::SymbolCount(), DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataFromWindow(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PROPERTIES::TransferDataToWindow(), DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow(), DIALOG_TABLE_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_SCH_FIELD_PROPERTIES::UpdateField(), PANEL_SYNC_SHEET_PINS::UpdateForms(), PCB_DIM_LEADER::updateGeometry(), SCH_EDITOR_CONTROL::updatePastedSymbol(), SCH_SYMBOL::UpdatePrefix(), SYMBOL_EDIT_FRAME::UpdateSymbolMsgPanelInfo(), DIALOG_LIB_SYMBOL_PROPERTIES::Validate(), DIALOG_SHEET_PROPERTIES::Validate(), and PCB_TEXT::ViewGetLOD().
|
inline |
Definition at line 131 of file eda_text.h.
References TEXT_ATTRIBUTES::m_Angle, and m_attributes.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), SCH_EDIT_TOOL::ChangeTextType(), LIB_TEXTBOX::compare(), SCH_DRAWING_TOOLS::createNewText(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), KIGFX::SCH_PAINTER::draw(), SCH_DRAWING_TOOLS::DrawShape(), CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), PCB_TEXT::Flip(), PCB_TEXTBOX::Flip(), PCB_IO_KICAD_SEXPR::format(), SCH_LABEL::GetBodyBoundingBox(), LIB_FIELD::GetBoundingBox(), LIB_TEXT::GetBoundingBox(), SCH_FIELD::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), PCB_TEXT::GetBoundingBox(), LIB_TEXTBOX::GetDrawPos(), SCH_TEXTBOX::GetDrawPos(), GetDrawRotation(), SCH_FIELD::GetDrawRotation(), PCB_TEXT::GetDrawRotation(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), LIB_TEXTBOX::GetShownText(), PCB_TEXTBOX::GetShownText(), SCH_TEXTBOX::GetShownText(), SCH_LABEL_BASE::GetSpinStyle(), FP_TEXT_GRID_TABLE::GetValue(), EE_SELECTION_TOOL::GuessSelectionCandidates(), hash_fp_item(), LIB_FIELD::HitTest(), LIB_TEXT::HitTest(), SCH_EDIT_TOOL::JustifyText(), PCB_TEXT::KeepUpright(), SCH_IO_EAGLE::loadFieldAttributes(), PCB_TEXT::Mirror(), PCB_TEXTBOX::Mirror(), PCB_DIMENSION_BASE::Mirror(), LIB_TEXT::MirrorHorizontal(), LIB_TEXTBOX::MirrorHorizontally(), SCH_TEXT::MirrorHorizontally(), SCH_TEXTBOX::MirrorHorizontally(), SCH_TEXT::MirrorSpinStyle(), LIB_TEXT::MirrorVertical(), LIB_TEXTBOX::MirrorVertically(), SCH_TEXT::MirrorVertically(), SCH_TEXTBOX::MirrorVertically(), LIB_TEXT::NormalizeJustification(), KI_TEST::kitest_cmp_drawings::operator()(), PCB_IO_EAGLE::orientFPText(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_TEXT_effects(), SCH_FIELD::Plot(), LIB_FIELD::Plot(), LIB_TEXT::Plot(), positioningChanged(), SCH_FIELD::Print(), LIB_FIELD::print(), LIB_TEXT::print(), processTextItem(), SCH_EDIT_TOOL::Rotate(), SCH_TEXTBOX::Rotate(), LIB_TEXTBOX::Rotate(), LIB_FIELD::Rotate(), LIB_TEXT::Rotate(), PCB_DIMENSION_BASE::Rotate(), PCB_TEXT::Rotate(), PCB_TEXTBOX::Rotate(), SCH_TEXT::Rotate90(), SCH_TEXTBOX::Rotate90(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_SEXPR::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveText(), SCH_IO_KICAD_SEXPR::saveText(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveTextBox(), SCH_IO_KICAD_SEXPR::saveTextBox(), PCB_TEXTBOX::SetTextAngle(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow(), EASYEDA_PARSER_BASE::TransformTextToBaseline(), DIALOG_SCH_FIELD_PROPERTIES::UpdateField(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_RADIAL::updateGeometry(), and PCB_DIM_LEADER::updateGeometry().
|
inline |
Definition at line 138 of file eda_text.h.
References EDA_ANGLE::AsDegrees(), TEXT_ATTRIBUTES::m_Angle, and m_attributes.
Referenced by EDA_TEXT_DESC::EDA_TEXT_DESC().
BOX2I EDA_TEXT::GetTextBox | ( | int | aLine = -1 , |
bool | aInvertY = false |
||
) | const |
Useful in multiline texts to calculate the full text or a line area (for zones filling, locate functions....)
aLine | The line of text to consider. Pass -1 for all lines. |
aInvertY | Invert the Y axis when calculating bounding box. |
Definition at line 567 of file eda_text.cpp.
References getDrawFont(), GetDrawPos(), GetEffectiveTextPenWidth(), getFontMetrics(), BOX2< Vec >::GetHeight(), GetHorizJustify(), KIFONT::FONT::GetInterline(), GetShownText(), GetTextSize(), GetVertJustify(), BOX2< Vec >::GetWidth(), BOX2< Vec >::GetX(), BOX2< Vec >::GetY(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_INDETERMINATE, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_INDETERMINATE, GR_TEXT_V_ALIGN_TOP, IsBold(), IsItalic(), IsMirrored(), IsMultilineAllowed(), KIFONT::FONT::IsStroke(), ITALIC_TILT, KiROUND(), m_bounding_box_cache, m_bounding_box_cache_inverted, m_bounding_box_cache_line, m_bounding_box_cache_pos, m_bounding_box_cache_valid, BOX2< Vec >::Normalize(), BOX2< Vec >::Offset(), BOX2< Vec >::SetOrigin(), BOX2< Vec >::SetSize(), BOX2< Vec >::SetX(), BOX2< Vec >::SetY(), KIFONT::FONT::StringBoundaryLimits(), text, wxStringSplit(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SCH_GLOBALLABEL::CreateGraphicShape(), KIGFX::SCH_PAINTER::draw(), SCH_LABEL::GetBodyBoundingBox(), SCH_HIERLABEL::GetBodyBoundingBox(), LIB_FIELD::GetBoundingBox(), LIB_TEXT::GetBoundingBox(), SCH_FIELD::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), DS_DRAW_ITEM_TEXT::GetBoundingBox(), PCB_DIMENSION_BASE::GetBoundingBox(), PCB_TEXT::GetBoundingBox(), ALTIUM_PCB::HelperParseDimensions6Radial(), LIB_TEXT::HitTest(), LIB_TEXT::NormalizeJustification(), SCH_TEXT::Plot(), SCH_TEXT::Print(), TextHitTest(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_RADIAL::updateGeometry(), and PCB_DIM_LEADER::updateGeometry().
|
inline |
Definition at line 228 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Color.
Referenced by DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), SCH_FIELD::GetFieldColor(), SCH_LABEL_BASE::GetLabelColor(), KIGFX::SCH_PAINTER::getRenderColor(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), LIB_FIELD::Plot(), LIB_TEXT::Plot(), LIB_TEXTBOX::Plot(), SCH_FIELD::Print(), LIB_FIELD::print(), LIB_TEXT::print(), LIB_TEXTBOX::print(), SCH_LABEL_BASE::Print(), SCH_TEXT::Print(), SCH_TEXTBOX::Print(), DS_DRAW_ITEM_TEXT::PrintWsItem(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXT_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 225 of file eda_text.h.
References m_attributes, TEXT_ATTRIBUTES::m_Size, and VECTOR2< T >::y.
Referenced by SCH_LABEL_BASE::AutoplaceFields(), LIB_FIELD::compare(), LIB_TEXT::compare(), LIB_TEXTBOX::compare(), SCH_GLOBALLABEL::CreateGraphicShape(), SCH_HIERLABEL::CreateGraphicShape(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), SCH_HIERLABEL::GetBodyBoundingBox(), GetInterline(), PCB_TEXT::getKnockoutMargin(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_TABLECELL::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), SCH_GLOBALLABEL::GetSchematicTextOffset(), FP_TEXT_GRID_TABLE::GetValue(), hash_fp_item(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), SCH_IO_KICAD_SEXPR::saveField(), SCH_IO_LTSPICE_PARSER::setTextJustification(), PCB_DIM_ALIGNED::updateText(), PCB_DIM_ORTHOGONAL::updateText(), and DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Validate().
|
inline |
Definition at line 231 of file eda_text.h.
References m_pos.
Referenced by SCH_LABEL_BASE::AutoplaceFields(), LIB_FIELD::compare(), LIB_TEXT::compare(), PCB_GRID_HELPER::computeAnchors(), SCH_SHEET_PIN::ConstrainOnEdge(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), SCH_LABEL::doIsConnected(), SCH_GLOBALLABEL::doIsConnected(), SCH_HIERLABEL::doIsConnected(), KIGFX::DS_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), PCB_TEXT::Flip(), PCB_IO_KICAD_SEXPR::format(), DS_DRAW_ITEM_TEXT::GetApproxBBox(), SCH_LABEL_BASE::GetBodyBoundingBox(), SCH_LABEL::GetBodyBoundingBox(), SCH_HIERLABEL::GetBodyBoundingBox(), LIB_FIELD::GetBoundingBox(), LIB_TEXT::GetBoundingBox(), SCH_FIELD::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), PCB_TEXT::GetBoundingBox(), SCH_MOVE_TOOL::getConnectedDragItems(), SCH_LABEL_BASE::GetConnectionPoints(), GetDrawPos(), SCH_LABEL_BASE::GetEndPoints(), SCH_SHEET_PIN::GetEndPoints(), SCH_FIELD::GetLibPosition(), LIB_FIELD::GetPosition(), LIB_TEXT::GetPosition(), SCH_FIELD::GetPosition(), SCH_TEXT::GetPosition(), DS_DRAW_ITEM_TEXT::GetPosition(), PCB_TEXT::GetPosition(), ALTIUM_PCB::HelperParseDimensions6Radial(), LIB_FIELD::HitTest(), LIB_TEXT::HitTest(), PCB_IO_EAGLE::loadPlain(), PCB_POINT_EDITOR::makePoints(), PCB_TEXT::Mirror(), PCB_DIMENSION_BASE::Mirror(), LIB_FIELD::MirrorHorizontal(), LIB_TEXT::MirrorHorizontal(), SCH_DIRECTIVE_LABEL::MirrorHorizontally(), SCH_SHEET_PIN::MirrorHorizontally(), SCH_TEXT::MirrorHorizontally(), LIB_FIELD::MirrorVertical(), LIB_TEXT::MirrorVertical(), SCH_DIRECTIVE_LABEL::MirrorVertically(), SCH_SHEET_PIN::MirrorVertically(), SCH_TEXT::MirrorVertically(), LIB_TEXT::NormalizeJustification(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), std::hash< EDA_TEXT >::operator()(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), BRDITEMS_PLOTTER::PlotText(), LIB_FIELD::print(), SCH_LABEL_BASE::Print(), DIALOG_CHANGE_SYMBOLS::processSymbols(), SCH_LABEL_BASE::Rotate(), SCH_SHEET_PIN::Rotate(), SCH_TEXT::Rotate(), LIB_FIELD::Rotate(), LIB_TEXT::Rotate(), PCB_DIMENSION_BASE::Rotate(), PCB_TEXT::Rotate(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), SCH_LABEL_BASE::SetPosition(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), EASYEDA_PARSER_BASE::TransformTextToBaseline(), PCB_TEXT::TransformTextToPolySet(), SCH_LABEL_BASE::UpdateDanglingState(), PCB_DIM_RADIAL::updateGeometry(), PCB_DIM_LEADER::updateGeometry(), PCB_POINT_EDITOR::updateItem(), PCB_POINT_EDITOR::updatePoints(), and PCB_DIM_RADIAL::updateText().
|
inline |
Definition at line 219 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Size.
Referenced by SCH_EDIT_TOOL::ChangeTextType(), MICROWAVE_TOOL::createMicrowaveInductor(), KIGFX::SCH_PAINTER::draw(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), GetEffectiveTextPenWidth(), SCH_LABEL_BASE::GetLabelBoxExpansion(), LIB_TEXTBOX::GetLegacyTextMargin(), SCH_TEXTBOX::GetLegacyTextMargin(), PCB_TEXTBOX::GetLegacyTextMargin(), CADSTAR_SCH_ARCHIVE_LOADER::getScaledLibPart(), LIB_TEXTBOX::GetShownText(), PCB_TEXTBOX::GetShownText(), SCH_TEXTBOX::GetShownText(), GetTextBox(), SCH_TEXT::GetTextOffset(), SCH_IO_EAGLE::loadFieldAttributes(), PCB_IO_EAGLE::orientFPText(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), SCH_FIELD::Print(), LIB_FIELD::print(), LIB_TEXT::print(), SCH_TEXT::Print(), printOneLineOfText(), processTextItem(), SCH_IO_KICAD_LEGACY::saveSheet(), PCB_TEXT::TextHitTest(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow(), EASYEDA_PARSER_BASE::TransformTextToBaseline(), DIALOG_FOOTPRINT_PROPERTIES::Validate(), and DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Validate().
wxString EDA_TEXT::GetTextStyleName | ( | ) | const |
Definition at line 824 of file eda_text.cpp.
References _, IsBold(), and IsItalic().
Referenced by LIB_FIELD::GetMsgPanelInfo(), LIB_TEXT::GetMsgPanelInfo(), and SCH_FIELD::GetMsgPanelInfo().
|
inline |
Definition at line 123 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_StrokeWidth.
Referenced by SCH_EDIT_TOOL::ChangeTextType(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), PCB_IO_KICAD_SEXPR::formatRenderCache(), GetEffectiveTextPenWidth(), PCB_TEXT::getKnockoutMargin(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_TABLECELL::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), LIB_TEXTBOX::GetShownText(), PCB_TEXTBOX::GetShownText(), SCH_TEXTBOX::GetShownText(), FP_TEXT_GRID_TABLE::GetValue(), ALTIUM_PCB::HelperParseDimensions6Linear(), ALTIUM_PCB::HelperParseDimensions6Radial(), IsDefaultFormatting(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), processTextItem(), SCH_IO_KICAD_LEGACY::saveText(), PCB_TEXT::TextHitTest(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES::Validate(), and DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Validate().
|
inline |
Definition at line 222 of file eda_text.h.
References m_attributes, TEXT_ATTRIBUTES::m_Size, and VECTOR2< T >::x.
Referenced by LIB_FIELD::compare(), LIB_TEXT::compare(), LIB_TEXTBOX::compare(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), GetEffectiveTextPenWidth(), PCB_TEXT::getKnockoutMargin(), LIB_TEXTBOX::GetLibTextSize(), LIB_FIELD::GetMsgPanelInfo(), LIB_TEXT::GetMsgPanelInfo(), LIB_TEXTBOX::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), SCH_LABEL_BASE::GetMsgPanelInfo(), SCH_TABLECELL::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_TABLECELL::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), SCH_HIERLABEL::GetSchematicTextOffset(), SCH_FIELD::GetSchTextSize(), SCH_TEXT::GetSchTextSize(), SCH_TEXTBOX::GetSchTextSize(), FP_TEXT_GRID_TABLE::GetValue(), hash_fp_item(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), SCH_IO_KICAD_LEGACY::saveText(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_RADIAL::updateGeometry(), PCB_DIM_LEADER::updateGeometry(), DIALOG_FIELD_PROPERTIES::updateText(), and DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Validate().
|
inline |
Definition at line 164 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Valign.
Referenced by SCH_DRAWING_TOOLS::createNewText(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), SCH_DRAWING_TOOLS::DrawShape(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), LIB_TEXTBOX::GetDrawPos(), SCH_TEXTBOX::GetDrawPos(), LIB_FIELD::GetEffectiveVertJustify(), SCH_FIELD::GetEffectiveVertJustify(), GetLinePositions(), LIB_FIELD::GetMsgPanelInfo(), LIB_TEXT::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), GetTextBox(), hash_fp_item(), IsDefaultFormatting(), SCH_FIELD::IsVertJustifyFlipped(), SCH_IO_EAGLE::loadFieldAttributes(), SCH_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), LIB_TEXT::MirrorHorizontal(), LIB_TEXT::MirrorVertical(), LIB_TEXT::NormalizeJustification(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_FIELD::Plot(), positioningChanged(), LIB_FIELD::print(), printOneLineOfText(), processTextItem(), LIB_TEXT::Rotate(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXT_PROPERTIES::TransferDataToWindow().
|
static |
Generate a href to a page in the current schematic.
aDestination | Destination sheet's page number. |
Definition at line 1173 of file eda_text.cpp.
Referenced by SCH_SHEET::Plot().
|
inlinevirtual |
Definition at line 358 of file eda_text.h.
References m_hyperlink.
Referenced by Format(), SCH_TEXT::IsHypertext(), SCH_TEXTBOX::IsHypertext(), SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), and DIALOG_TEXT_PROPERTIES::TransferDataToWindow().
|
inline |
Indicates the ShownText has text var references which need to be processed.
Definition at line 114 of file eda_text.h.
References m_shown_text_has_text_var_refs.
Referenced by SCH_LABEL_BASE::cacheShownText(), KIGFX::SCH_PAINTER::draw(), PCB_TEXT::GetShownText(), PCB_TEXTBOX::GetShownText(), SCH_FIELD::GetShownText(), SCH_TEXT::GetShownText(), SCH_TEXTBOX::GetShownText(), SCH_LABEL_BASE::GetShownText(), SCH_LABEL_BASE::HasCachedDriverName(), and SCH_LABEL_BASE::SCH_LABEL_BASE().
|
inline |
Definition at line 145 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Bold.
Referenced by BOARD_ADAPTER::addText(), SCH_EDIT_TOOL::ChangeTextType(), LIB_TEXTBOX::compare(), SCH_DRAWING_TOOLS::createNewText(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), KIGFX::DS_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), SCH_DRAWING_TOOLS::DrawShape(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), getDrawFont(), LIB_FIELD::getDrawFont(), LIB_TEXT::getDrawFont(), LIB_TEXTBOX::getDrawFont(), SCH_FIELD::getDrawFont(), SCH_TEXT::getDrawFont(), SCH_TEXTBOX::getDrawFont(), GetEffectiveTextPenWidth(), KIGFX::SCH_PAINTER::getFont(), LIB_TEXTBOX::GetMsgPanelInfo(), SCH_LABEL_BASE::GetMsgPanelInfo(), SCH_TABLECELL::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), SCH_FIELD::GetRenderCache(), LIB_TEXTBOX::GetShownText(), PCB_TEXTBOX::GetShownText(), SCH_TEXTBOX::GetShownText(), GetTextBox(), GetTextStyleName(), hash_fp_item(), IsDefaultFormatting(), SCH_IO_EAGLE::loadFieldAttributes(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), LIB_FIELD::Plot(), LIB_TEXT::Plot(), LIB_TEXTBOX::Plot(), BRDITEMS_PLOTTER::PlotText(), SCH_FIELD::Print(), LIB_FIELD::print(), LIB_TEXT::print(), LIB_TEXTBOX::print(), SCH_TEXT::Print(), printOneLineOfText(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), SetFontIndex(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow().
bool EDA_TEXT::IsDefaultFormatting | ( | ) | const |
Definition at line 898 of file eda_text.cpp.
References GetFontName(), GetHorizJustify(), GetTextThickness(), GetVertJustify(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_V_ALIGN_CENTER, IsBold(), IsItalic(), IsMirrored(), IsMultilineAllowed(), and IsVisible().
Referenced by SCH_IO_KICAD_SEXPR::saveField().
|
static |
Check if aHref is a valid internal hyperlink.
aHref | String to validate |
aDestination | [optional] pointer to populate with the destination page |
Definition at line 1167 of file eda_text.cpp.
Referenced by PDF_PLOTTER::EndPlot(), SCH_NAVIGATE_TOOL::HypertextCommand(), and ValidateHyperlink().
|
inline |
Definition at line 141 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Italic.
Referenced by BOARD_ADAPTER::addText(), SCH_DIRECTIVE_LABEL::AutoplaceFields(), SCH_EDIT_TOOL::ChangeTextType(), LIB_TEXTBOX::compare(), SCH_DRAWING_TOOLS::createNewText(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), KIGFX::DS_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), SCH_DRAWING_TOOLS::DrawShape(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), getDrawFont(), LIB_FIELD::getDrawFont(), LIB_TEXT::getDrawFont(), LIB_TEXTBOX::getDrawFont(), SCH_FIELD::getDrawFont(), SCH_TEXT::getDrawFont(), SCH_TEXTBOX::getDrawFont(), KIGFX::SCH_PAINTER::getFont(), LIB_TEXTBOX::GetMsgPanelInfo(), SCH_LABEL_BASE::GetMsgPanelInfo(), SCH_TABLECELL::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), SCH_FIELD::GetRenderCache(), LIB_TEXTBOX::GetShownText(), PCB_TEXTBOX::GetShownText(), SCH_TEXTBOX::GetShownText(), GetTextBox(), GetTextStyleName(), FP_TEXT_GRID_TABLE::GetValueAsBool(), hash_fp_item(), IsDefaultFormatting(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), LIB_FIELD::Plot(), LIB_TEXT::Plot(), LIB_TEXTBOX::Plot(), BRDITEMS_PLOTTER::PlotText(), SCH_FIELD::Print(), LIB_FIELD::print(), LIB_TEXT::print(), LIB_TEXTBOX::print(), SCH_TEXT::Print(), printOneLineOfText(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), SCH_IO_KICAD_LEGACY::saveText(), SetFontIndex(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 167 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_KeepUpright.
Referenced by PCB_IO_KICAD_SEXPR::format(), PCB_TEXT::GetDrawRotation(), FP_TEXT_GRID_TABLE::GetValueAsBool(), PCB_TEXT::KeepUpright(), and PCB_TEXT_DESC::PCB_TEXT_DESC().
|
inline |
Definition at line 151 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Mirrored.
Referenced by PCAD2KICAD::PCAD_TEXT::AddToBoard(), EDA_TEXT_DESC::EDA_TEXT_DESC(), PCB_TEXT::Flip(), PCB_TEXTBOX::Flip(), Format(), PCB_TEXTBOX::GetDrawPos(), PCB_TABLECELL::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), GetTextBox(), hash_fp_item(), IsDefaultFormatting(), PCB_DIMENSION_BASE::Mirror(), PCB_IO_EAGLE::orientFPText(), printOneLineOfText(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 158 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Multiline.
Referenced by GetTextBox(), IsDefaultFormatting(), BRDITEMS_PLOTTER::PlotText(), and Print().
|
inlinevirtual |
Reimplemented in PCB_TEXTBOX.
Definition at line 148 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Visible.
Referenced by PCB_IO_IPC2581::addText(), SCH_EDITOR_CONTROL::AssignFootprints(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), AUTOPLACER::DoAutoplace(), KIGFX::SCH_PAINTER::draw(), DRAWING_TOOL::DrawVia(), EDA_TEXT_DESC::EDA_TEXT_DESC(), SCH_EDIT_TOOL::EditField(), PCB_IO_KICAD_SEXPR::format(), Format(), PCB_IO_IPC2581::generateLayerSetNet(), LIB_FIELD::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), FP_TEXT_GRID_TABLE::GetValueAsBool(), SCH_FIELD::HitTest(), DRC_RTREE::Insert(), IsDefaultFormatting(), SCH_IO_EAGLE::loadInstance(), SCH_FIELD::Matches(), EE_SELECTION_TOOL::narrowSelection(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), SCH_FIELD::Plot(), LIB_TEXT::Plot(), BRDITEMS_PLOTTER::PlotFootprintTextItems(), SCH_FIELD::Print(), LIB_SYMBOL::Print(), LIB_FIELD::print(), LIB_TEXT::print(), DIALOG_CHANGE_SYMBOLS::processSymbols(), processTextItem(), SCH_EDIT_TOOL::Properties(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), SCH_SHEET_PATH::UpdateAllScreenReferences(), and PCB_TEXT::ViewGetLayers().
double EDA_TEXT::Levenshtein | ( | const EDA_TEXT & | aOther | ) | const |
Return the levenstein distance between two texts.
Return a value of 0.0 - 1.0 where 1.0 is a perfect match.
Definition at line 1105 of file eda_text.cpp.
References distance(), and GetText().
Referenced by Similarity(), and SCH_FIELD::Similarity().
|
static |
Definition at line 63 of file eda_text.cpp.
References GR_TEXT_H_ALIGN_LEFT, and GR_TEXT_H_ALIGN_RIGHT.
Referenced by DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), FIELDS_GRID_TABLE< T >::SetValue(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), and DIALOG_SCH_FIELD_PROPERTIES::UpdateField().
|
static |
Definition at line 77 of file eda_text.cpp.
References GR_TEXT_V_ALIGN_BOTTOM, and GR_TEXT_V_ALIGN_TOP.
Referenced by DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), FIELDS_GRID_TABLE< T >::SetValue(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), and DIALOG_SCH_FIELD_PROPERTIES::UpdateField().
void EDA_TEXT::Offset | ( | const VECTOR2I & | aOffset | ) |
Definition at line 437 of file eda_text.cpp.
References ANGLE_0, m_bounding_box_cache_valid, m_pos, m_render_cache, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), SCH_FIELD::Move(), SCH_SHEET_PIN::Move(), SCH_TEXT::Move(), SCH_TEXTBOX::Move(), PCB_TEXT::Move(), PCB_TEXTBOX::Move(), PCB_DIMENSION_BASE::Move(), LIB_FIELD::Offset(), LIB_TEXT::Offset(), SCH_IO_LTSPICE_PARSER::setTextJustification(), SetTextPos(), SetTextX(), SetTextY(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PROPERTIES::TransferDataToWindow(), and DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 355 of file eda_text.h.
References Compare().
Definition at line 152 of file eda_text.cpp.
References m_attributes, m_bounding_box_cache, m_bounding_box_cache_valid, m_pos, m_render_cache, m_render_cache_angle, m_render_cache_font, m_render_cache_offset, m_render_cache_text, m_shown_text, m_shown_text_has_text_var_refs, and m_text.
Referenced by SCH_FIELD::operator=().
|
inline |
Definition at line 354 of file eda_text.h.
References Compare().
Referenced by PCB_TEXT::operator==(), PCB_TEXTBOX::operator==(), PCB_DIMENSION_BASE::operator==(), PCB_FIELD::operator==(), LIB_FIELD::operator==(), LIB_TEXT::operator==(), LIB_TEXTBOX::operator==(), SCH_TEXT::operator==(), and SCH_TEXTBOX::operator==().
|
inline |
Definition at line 356 of file eda_text.h.
References Compare().
void EDA_TEXT::Print | ( | const RENDER_SETTINGS * | aSettings, |
const VECTOR2I & | aOffset, | ||
const COLOR4D & | aColor, | ||
OUTLINE_MODE | aDisplay_mode = FILLED |
||
) |
Print this text object to the device context aDC.
aDC | the current Device Context. |
aOffset | draw offset (usually (0,0)). |
aColor | text color. |
aDisplay_mode | FILLED or SKETCH. |
Definition at line 731 of file eda_text.cpp.
References GetDrawPos(), GetLinePositions(), GetShownText(), IsMultilineAllowed(), printOneLineOfText(), and wxStringSplit().
Referenced by SCH_LABEL_BASE::Print(), SCH_TEXT::Print(), SCH_TEXTBOX::Print(), and DS_DRAW_ITEM_TEXT::PrintWsItem().
|
protected |
Print each line of this EDA_TEXT.
aOffset | draw offset (usually (0,0)). |
aColor | text color. |
aFillMode | FILLED or SKETCH |
aText | the single line of text to draw. |
aPos | the position of this line ). |
Definition at line 799 of file eda_text.cpp.
References KIGFX::RENDER_SETTINGS::GetDefaultFont(), KIGFX::RENDER_SETTINGS::GetDefaultPenWidth(), GetDrawRotation(), GetEffectiveTextPenWidth(), GetFont(), KIFONT::FONT::GetFont(), getFontMetrics(), GetHorizJustify(), KIGFX::RENDER_SETTINGS::GetPrintDC(), GetTextSize(), GetVertJustify(), GRPrintText(), IsBold(), IsItalic(), IsMirrored(), SKETCH, and VECTOR2< T >::x.
Referenced by Print().
|
inline |
Definition at line 361 of file eda_text.h.
References m_hyperlink.
bool EDA_TEXT::Replace | ( | const EDA_SEARCH_DATA & | aSearchData | ) |
Helper function used in search and replace dialog.
Perform a text replace using the find and replace criteria in aSearchData.
aSearchData | A reference to a EDA_SEARCH_DATA object containing the search and replace criteria. |
Definition at line 345 of file eda_text.cpp.
References cacheShownText(), ClearRenderCache(), m_bounding_box_cache_valid, m_text, and EDA_ITEM::Replace().
Referenced by LIB_TEXTBOX::Replace(), SCH_LABEL_BASE::Replace(), SCH_TEXT::Replace(), SCH_TEXTBOX::Replace(), SCH_FIELD::Replace(), and SCH_SHEET_PIN::Replace().
void EDA_TEXT::SetAttributes | ( | const EDA_TEXT & | aSrc, |
bool | aSetPosition = true |
||
) |
Set the text attributes from another instance.
Definition at line 292 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, and m_pos.
Referenced by SCH_EDIT_TOOL::ChangeTextType(), LIB_FIELD::Copy(), SCH_FIELD::ImportValues(), SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), LIB_FIELD::operator=(), DIALOG_CHANGE_SYMBOLS::processSymbols(), and processTextItem().
|
inline |
Definition at line 191 of file eda_text.h.
References m_attributes.
void EDA_TEXT::SetBold | ( | bool | aBold | ) |
Definition at line 221 of file eda_text.cpp.
References GetPenSizeForBold(), GetPenSizeForNormal(), m_attributes, TEXT_ATTRIBUTES::m_Bold, TEXT_ATTRIBUTES::m_Size, TEXT_ATTRIBUTES::m_StrokeWidth, SetBoldFlag(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SCH_IO_ALTIUM::AddTextBox(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextCodeIfExists(), SCH_EDIT_TOOL::ChangeTextType(), SCH_DRAWING_TOOLS::createNewText(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SCH_DRAWING_TOOLS::DrawShape(), DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), EDA_TEXT_DESC::EDA_TEXT_DESC(), ALTIUM_PCB::HelperParseDimensions6Linear(), ALTIUM_PCB::HelperParseDimensions6Radial(), SCH_IO_EAGLE::loadFieldAttributes(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), SCH_IO_EAGLE::loadTextAttributes(), DIALOG_LABEL_PROPERTIES::OnAddField(), SCH_IO_ALTIUM::ParseHarnessPort(), SCH_IO_ALTIUM::ParseLabel(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), and DIALOG_FIELD_PROPERTIES::updateText().
void EDA_TEXT::SetBoldFlag | ( | bool | aBold | ) |
Definition at line 237 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, TEXT_ATTRIBUTES::m_Bold, and m_bounding_box_cache_valid.
Referenced by ALTIUM_PCB::ConvertTexts6ToEdaTextSettings(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadField(), SCH_IO_KICAD_LEGACY::loadSymbol(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SetBold(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow().
void EDA_TEXT::SetFont | ( | KIFONT::FONT * | aFont | ) |
Definition at line 358 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, and TEXT_ATTRIBUTES::m_Font.
Referenced by SCH_EDIT_TOOL::ChangeTextType(), ALTIUM_PCB::ConvertTexts6ToEdaTextSettings(), DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), SetFontIndex(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), and DIALOG_FIELD_PROPERTIES::updateText().
void EDA_TEXT::SetFontIndex | ( | int | aIdx | ) |
Definition at line 875 of file eda_text.cpp.
References Fontconfig(), KIFONT::FONT::GetFont(), IsBold(), IsItalic(), Pgm(), and SetFont().
Referenced by EDA_TEXT_DESC::EDA_TEXT_DESC().
void EDA_TEXT::SetHorizJustify | ( | GR_TEXT_H_ALIGN_T | aType | ) |
Definition at line 268 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, and TEXT_ATTRIBUTES::m_Halign.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), SCH_IO_ALTIUM::AddLibTextBox(), SCH_IO_ALTIUM::AddTextBox(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), FOOTPRINT::AutoPositionFields(), ALTIUM_PCB::ConvertTexts6ToEdaTextSettings(), SCH_DRAWING_TOOLS::createNewText(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), SCH_DRAWING_TOOLS::DrawShape(), eagleToKicadAlignment(), EDA_TEXT_DESC::EDA_TEXT_DESC(), FlipHJustify(), ALTIUM_PCB::HelperParseDimensions6Radial(), AUTOPLACER::justifyField(), PCB_TEXT::KeepUpright(), LIB_TEXTBOX::LIB_TEXTBOX(), CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions(), FABMASTER::loadEtch(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadField(), SCH_IO_EAGLE::loadFieldAttributes(), FABMASTER::loadFootprints(), SCH_IO_EAGLE::loadFrame(), FABMASTER::loadGraphics(), PCB_IO_KICAD_LEGACY::loadMODULE_TEXT(), FABMASTER::loadOutline(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), PCB_IO_EAGLE::loadPlain(), SCH_IO_KICAD_LEGACY::loadSymbol(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef(), SCH_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), PCB_TEXT::Mirror(), LIB_TEXT::MirrorHorizontal(), LIB_TEXTBOX::MirrorHorizontally(), SCH_TEXTBOX::MirrorHorizontally(), LIB_TEXT::MirrorVertical(), LIB_TEXTBOX::MirrorVertically(), SCH_TEXTBOX::MirrorVertically(), PCB_IO_EAGLE::orientFPText(), PCB_IO_EAGLE::packageText(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_ALTIUM::ParseHarnessPort(), SCH_IO_ALTIUM::ParsePowerPort(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), PCB_TEXTBOX::PCB_TEXTBOX(), LIB_TEXT::Rotate(), SCH_TEXTBOX::SCH_TEXTBOX(), SCH_LABEL_BASE::SetSpinStyle(), SCH_IO_LTSPICE_PARSER::setTextJustification(), PCAD2KICAD::SetTextJustify(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), and DIALOG_SCH_FIELD_PROPERTIES::UpdateField().
|
inline |
Definition at line 360 of file eda_text.h.
References m_hyperlink.
Referenced by SCH_EDIT_TOOL::ChangeTextType(), EDA_TEXT_DESC::EDA_TEXT_DESC(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), and DIALOG_TEXT_PROPERTIES::TransferDataFromWindow().
void EDA_TEXT::SetItalic | ( | bool | aItalic | ) |
Definition at line 213 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, and TEXT_ATTRIBUTES::m_Italic.
Referenced by SCH_IO_ALTIUM::AddTextBox(), PCAD2KICAD::PCAD_FOOTPRINT::AddToBoard(), PCAD2KICAD::PCAD_TEXT::AddToBoard(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextCodeIfExists(), SCH_EDIT_TOOL::ChangeTextType(), ALTIUM_PCB::ConvertTexts6ToEdaTextSettings(), PCB_BASE_FRAME::CreateNewFootprint(), SCH_DRAWING_TOOLS::createNewText(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), DRAWING_TOOL::DrawDimension(), SCH_DRAWING_TOOLS::DrawShape(), DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), EDA_TEXT_DESC::EDA_TEXT_DESC(), ALTIUM_PCB::HelperParseDimensions6Linear(), ALTIUM_PCB::HelperParseDimensions6Radial(), FABMASTER::loadEtch(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadField(), SCH_IO_EAGLE::loadFieldAttributes(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), PCB_IO_KICAD_LEGACY::loadMODULE_TEXT(), FABMASTER::loadOutline(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), SCH_IO_KICAD_LEGACY::loadSymbol(), DIALOG_LABEL_PROPERTIES::OnAddField(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAddField(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_ALTIUM::ParseHarnessPort(), SCH_IO_ALTIUM::ParseLabel(), FP_TEXT_GRID_TABLE::SetValueAsBool(), PCB_TEXT::StyleFromSettings(), PCB_TEXTBOX::StyleFromSettings(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), and DIALOG_FIELD_PROPERTIES::updateText().
void EDA_TEXT::SetKeepUpright | ( | bool | aKeepUpright | ) |
Definition at line 284 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, and TEXT_ATTRIBUTES::m_KeepUpright.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), PCAD2KICAD::PCAD_FOOTPRINT::AddToBoard(), ALTIUM_PCB::ConvertTexts6ToFootprintItemOnLayer(), PCB_BASE_FRAME::CreateNewFootprint(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_TEXT_effects(), PCB_TEXT::PCB_TEXT(), PCB_TEXT_DESC::PCB_TEXT_DESC(), FP_TEXT_GRID_TABLE::SetValueAsBool(), PCB_TEXT::StyleFromSettings(), and PCB_TEXTBOX::StyleFromSettings().
void EDA_TEXT::SetLineSpacing | ( | double | aLineSpacing | ) |
Definition at line 366 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, and TEXT_ATTRIBUTES::m_LineSpacing.
Referenced by PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), and SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT().
void EDA_TEXT::SetMirrored | ( | bool | isMirrored | ) |
Definition at line 252 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, and TEXT_ATTRIBUTES::m_Mirrored.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), PCAD2KICAD::PCAD_FOOTPRINT::AddToBoard(), PCAD2KICAD::PCAD_TEXT::AddToBoard(), ALTIUM_PCB::ConvertTexts6ToEdaTextSettings(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), EDA_TEXT_DESC::EDA_TEXT_DESC(), PCB_TEXT::Flip(), PCB_TEXTBOX::Flip(), PCB_IO_KICAD_LEGACY::loadMODULE_TEXT(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), PCB_IO_EAGLE::loadPlain(), PCB_DIMENSION_BASE::Mirror(), PCB_IO_EAGLE::orientFPText(), PCB_IO_EAGLE::packageText(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), PCB_TABLECELL::PCB_TABLECELL(), PCB_TEXT::PCB_TEXT(), FP_TEXT_GRID_TABLE::SetValueAsLong(), PCB_TEXT::StyleFromSettings(), PCB_TEXTBOX::StyleFromSettings(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), and DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog().
void EDA_TEXT::SetMultilineAllowed | ( | bool | aAllow | ) |
aAllow | true if ok to use multiline option, false if ok to use only single line text. (Single line is faster in calculations than multiline.) |
Definition at line 260 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, and TEXT_ATTRIBUTES::m_Multiline.
Referenced by SCH_IO_LTSPICE_PARSER::CreateSCH_TEXT(), LIB_TEXTBOX::LIB_TEXTBOX(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef(), PCB_TEXT::PCB_TEXT(), PCB_TEXTBOX::PCB_TEXTBOX(), SCH_LABEL_BASE::SCH_LABEL_BASE(), SCH_TEXT::SCH_TEXT(), and SCH_TEXTBOX::SCH_TEXTBOX().
|
virtual |
Reimplemented in SCH_FIELD.
Definition at line 183 of file eda_text.cpp.
References cacheShownText(), and m_text.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), SCH_IO_EAGLE::addImplicitConnections(), SCH_IO_ALTIUM::AddLibTextBox(), SCH_IO_ALTIUM::AddTextBox(), PCAD2KICAD::PCAD_FOOTPRINT::AddToBoard(), PCAD2KICAD::PCAD_TEXT::AddToBoard(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextCodeIfExists(), BOOST_AUTO_TEST_CASE(), ALTIUM_PCB::ConvertTexts6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertTexts6ToFootprintItemOnLayer(), createBoard(), PCB_BASE_FRAME::CreateNewFootprint(), SYMBOL_EDIT_FRAME::CreateNewSymbol(), SCH_DRAWING_TOOLS::createNewText(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), SCH_IO_LTSPICE_PARSER::CreateSCH_LABEL(), KIGFX::SCH_PAINTER::draw(), DRAWING_TOOL::DrawBoardCharacteristics(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), DRAWING_TOOL::DrawSpecificationStackup(), FOOTPRINT::DuplicateItem(), EDA_TEXT_DESC::EDA_TEXT_DESC(), PCB_IO_EASYEDAPRO_PARSER::fillFootprintModelInfo(), PCB_IO_EASYEDAPRO::FootprintLoad(), CADSTAR_SCH_ARCHIVE_LOADER::getKiCadSchText(), LIB_FIELD::HitTest(), SCH_LABEL_BASE::IncrementLabel(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadAliases(), CADSTAR_SCH_ARCHIVE_LOADER::loadBusses(), CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadDocs(), FABMASTER::loadEtch(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadField(), FABMASTER::loadFootprints(), SCH_IO_EAGLE::loadFrame(), FABMASTER::loadGraphics(), CADSTAR_SCH_ARCHIVE_LOADER::loadHierarchicalSheetPins(), CADSTAR_SCH_ARCHIVE_LOADER::loadLibPart(), SCH_IO_EAGLE::loadLibrary(), PCB_IO_KICAD_LEGACY::loadMODULE_TEXT(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), FABMASTER::loadOutline(), SCH_IO_KICAD_LEGACY_LIB_CACHE::LoadPart(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), PCB_IO_EAGLE::loadPlain(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances(), SCH_IO_HTTP_LIB::loadSymbolFromPart(), SCH_IO_DATABASE::loadSymbolFromRow(), SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymbolGateAndPartFields(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), LIB_FIELD::operator=(), PCB_IO_EAGLE::orientFPText(), PCB_IO_EAGLE::packageText(), PANEL_SYMBOL_CHOOSER::PANEL_SYMBOL_CHOOSER(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), PCB_IO_EASYEDAPRO_PARSER::ParseFootprint(), PCB_IO_KICAD_SEXPR_PARSER::parseFOOTPRINT_unchecked(), SCH_IO_ALTIUM::ParseHarnessEntry(), SCH_IO_ALTIUM::ParseHarnessPort(), SCH_IO_ALTIUM::ParseImplementation(), SCH_IO_ALTIUM::ParseLabel(), SCH_IO_ALTIUM::ParseLibDesignator(), SCH_IO_ALTIUM::ParseLibFile(), SCH_IO_ALTIUM::ParseLibParameter(), SCH_IO_ALTIUM::ParsePowerPort(), SCH_IO_KICAD_SEXPR_PARSER::parseSchTextBoxContent(), SCH_IO_ALTIUM::ParseSheetEntry(), SCH_EASYEDAPRO_PARSER::ParseSymbol(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), PCB_IO_KICAD_SEXPR_PARSER::parseTextBoxContent(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), BOARD_EDITOR_CONTROL::PlaceFootprint(), LIB_SYMBOL::PlotLibFields(), processTextItem(), SYMBOL_EDITOR_CONTROL::RenameSymbol(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveDcmInfoAsFields(), CLIPBOARD_IO::SaveSelection(), SYMBOL_EDIT_FRAME::saveSymbolCopyAs(), LIB_SYMBOL::SetDescription(), SCH_FIELD::SetName(), FOOTPRINT::SetReference(), SCH_FIELD::SetText(), FOOTPRINT::SetValue(), FP_TEXT_GRID_TABLE::SetValue(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_TABLE_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), BOARD_NETLIST_UPDATER::updateFootprintParameters(), and PCB_DIMENSION_BASE::updateText().
|
virtual |
Reimplemented in PCB_TEXTBOX.
Definition at line 205 of file eda_text.cpp.
References ClearRenderCache(), TEXT_ATTRIBUTES::m_Angle, m_attributes, and m_bounding_box_cache_valid.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), PCAD2KICAD::PCAD_FOOTPRINT::AddToBoard(), PCAD2KICAD::PCAD_TEXT::AddToBoard(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), FOOTPRINT::AutoPositionFields(), ALTIUM_PCB::ConvertTexts6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertTexts6ToFootprintItemOnLayer(), SCH_DRAWING_TOOLS::createNewText(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), SCH_DRAWING_TOOLS::DrawShape(), eagleToKicadAlignment(), PCB_TEXT::Flip(), PCB_TEXTBOX::Flip(), PCB_IO_EASYEDA::FootprintLoad(), LIB_FIELD::HitTest(), LIB_TEXT::HitTest(), LIB_FIELD::Init(), PCB_TEXT::KeepUpright(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadField(), SCH_IO_EAGLE::loadFieldAttributes(), PCB_IO_KICAD_LEGACY::loadMODULE_TEXT(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), PCB_IO_EAGLE::loadPlain(), SCH_IO_KICAD_LEGACY::loadSymbol(), PCB_TEXTBOX::Mirror(), PCB_DIMENSION_BASE::Mirror(), DIALOG_LABEL_PROPERTIES::OnAddField(), DIALOG_SHEET_PROPERTIES::OnAddField(), DIALOG_SYMBOL_PROPERTIES::OnAddField(), PCB_IO_EAGLE::orientFPText(), PCB_IO_EAGLE::packageText(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_TEXT_effects(), SCH_IO_ALTIUM::ParsePowerPort(), SCH_IO_KICAD_SEXPR_PARSER::parseSchTextBoxContent(), SCH_EDIT_TOOL::Rotate(), SCH_TEXTBOX::Rotate(), LIB_TEXTBOX::Rotate(), LIB_FIELD::Rotate(), LIB_TEXT::Rotate(), PCB_DIMENSION_BASE::Rotate(), PCB_TEXT::Rotate(), PCB_TEXTBOX::Rotate(), SCH_TEXT::Rotate90(), SCH_TEXTBOX::Rotate90(), SCH_LABEL_BASE::SetSpinStyle(), SetTextAngleDegrees(), SCH_IO_LTSPICE_PARSER::setTextJustification(), FP_TEXT_GRID_TABLE::SetValue(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), PCB_DIM_ALIGNED::updateText(), PCB_DIM_ORTHOGONAL::updateText(), PCB_DIM_RADIAL::updateText(), and DIALOG_FIELD_PROPERTIES::updateText().
|
inline |
Definition at line 134 of file eda_text.h.
References DEGREES_T, and SetTextAngle().
Referenced by EDA_TEXT_DESC::EDA_TEXT_DESC(), SCH_EASYEDA_PARSER::ParseSchematic(), and SCH_EASYEDA_PARSER::ParseSymbolShapes().
|
inline |
Definition at line 227 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Color.
Referenced by DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), EDA_TEXT_DESC::EDA_TEXT_DESC(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_ALTIUM::ParseHarnessPort(), SCH_IO_ALTIUM::ParseHarnessType(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), and DIALOG_FIELD_PROPERTIES::updateText().
void EDA_TEXT::SetTextHeight | ( | int | aHeight | ) |
Definition at line 408 of file eda_text.cpp.
References alg::clamp(), ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, m_IuScale, TEXT_ATTRIBUTES::m_Size, TEXT_MAX_SIZE_MILS, TEXT_MIN_SIZE_MILS, and VECTOR2< T >::y.
Referenced by CADSTAR_SCH_ARCHIVE_LOADER::applyTextCodeIfExists(), EDA_TEXT_DESC::EDA_TEXT_DESC(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), FABMASTER::loadEtch(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), FABMASTER::loadOutline(), FP_TEXT_GRID_TABLE::SetValue(), and DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog().
void EDA_TEXT::SetTextPos | ( | const VECTOR2I & | aPoint | ) |
Definition at line 419 of file eda_text.cpp.
References m_pos, Offset(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PCAD2KICAD::PCAD_TEXT::AddToBoard(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), CADSTAR_SCH_ARCHIVE_LOADER::applyToLibraryFieldAttribute(), LIB_FIELD::BeginEdit(), LIB_TEXT::BeginEdit(), BOOST_AUTO_TEST_CASE(), LIB_FIELD::CalcEdit(), LIB_TEXT::CalcEdit(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), DRAWING_TOOL::DrawDimension(), DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), ALTIUM_PCB::HelperParseDimensions6Radial(), LIB_FIELD::HitTest(), LIB_TEXT::HitTest(), CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions(), FABMASTER::loadEtch(), SCH_IO_EAGLE::loadFieldAttributes(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), FABMASTER::loadOutline(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), PCB_IO_EAGLE::loadPlain(), SCH_IO_KICAD_LEGACY::loadSymbol(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef(), PCB_DIMENSION_BASE::Mirror(), LIB_FIELD::MoveTo(), LIB_TEXT::MoveTo(), LIB_TEXT::NormalizeJustification(), PCB_IO_EAGLE::orientFPText(), SCH_IO_ALTIUM::ParseLibParameter(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_TEXT_effects(), SCH_IO_KICAD_SEXPR_PARSER::parseSchText(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), PCB_TEXT::PCB_TEXT(), DIALOG_CHANGE_SYMBOLS::processSymbols(), SCH_LABEL_BASE::Rotate(), SCH_SHEET_PIN::Rotate(), SCH_TEXT::Rotate(), LIB_FIELD::Rotate(), LIB_TEXT::Rotate(), PCB_DIMENSION_BASE::Rotate(), PCB_TEXT::Rotate(), SCH_FIELD::SCH_FIELD(), SCH_SHEET_PIN::SCH_SHEET_PIN(), SCH_TEXT::SCH_TEXT(), DS_DRAW_ITEM_TEXT::SetPosition(), PCB_TEXT::SetPosition(), SCH_FIELD::SetPosition(), SCH_TEXT::SetPosition(), EASYEDA_PARSER_BASE::TransformTextToBaseline(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), SCH_SYMBOL::UpdateFields(), PCB_POINT_EDITOR::updateItem(), PCB_DIM_ALIGNED::updateText(), and PCB_DIM_ORTHOGONAL::updateText().
void EDA_TEXT::SetTextSize | ( | VECTOR2I | aNewSize, |
bool | aEnforceMinTextSize = true |
||
) |
Definition at line 374 of file eda_text.cpp.
References alg::clamp(), ClearRenderCache(), EDA_IU_SCALE::IU_PER_MM, m_attributes, m_bounding_box_cache_valid, m_IuScale, TEXT_ATTRIBUTES::m_Size, TEXT_MAX_SIZE_MILS, TEXT_MIN_SIZE_MILS, unityScale, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SCH_IO_EAGLE::addImplicitConnections(), SCH_IO_ALTIUM::AddLibTextBox(), SCH_IO_ALTIUM::AddTextBox(), CADSTAR_PCB_ARCHIVE_LOADER::applyTextCode(), SCH_EDIT_TOOL::ChangeTextType(), ALTIUM_PCB::ConvertTexts6ToEdaTextSettings(), MICROWAVE_TOOL::createBaseFootprint(), SCH_IO_LTSPICE_PARSER::CreateFields(), PCB_BASE_FRAME::CreateNewFootprint(), SCH_DRAWING_TOOLS::createNewText(), SCH_IO_LTSPICE_PARSER::CreatePowerSymbol(), SCH_IO_LTSPICE_PARSER::CreateSCH_LABEL(), SCH_IO_LTSPICE_PARSER::CreateSCH_TEXT(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), DRAWING_TOOL::DrawDimension(), SCH_DRAWING_TOOLS::DrawShape(), DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), EDA_TEXT(), CADSTAR_SCH_ARCHIVE_LOADER::getScaledLibPart(), ALTIUM_PCB::HelperParseDimensions6Linear(), ALTIUM_PCB::HelperParseDimensions6Radial(), LIB_TEXT::LIB_TEXT(), LIB_TEXTBOX::LIB_TEXTBOX(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadField(), SCH_IO_EAGLE::loadFieldAttributes(), SCH_IO_EAGLE::loadFrame(), PCB_IO_KICAD_LEGACY::loadMODULE_TEXT(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), PCB_IO_EAGLE::loadPlain(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances(), SCH_IO_KICAD_LEGACY::loadSheet(), SCH_IO_KICAD_LEGACY::loadSymbol(), SCH_IO_EAGLE::loadTextAttributes(), DIALOG_LIB_SYMBOL_PROPERTIES::OnAddField(), DIALOG_SYMBOL_PROPERTIES::OnAddField(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAddField(), PCB_IO_EAGLE::orientFPText(), PCB_IO_EAGLE::packageText(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_ALTIUM::ParseHarnessPort(), SCH_IO_ALTIUM::ParseLabel(), SCH_IO_ALTIUM::ParseLibDesignator(), SCH_IO_ALTIUM::ParseLibParameter(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), BACK_ANNOTATE::processNetNameChange(), LIB_TEXTBOX::SetLibTextSize(), SCH_FIELD::SetSchTextSize(), SCH_TEXT::SetSchTextSize(), SCH_TEXTBOX::SetSchTextSize(), PCAD2KICAD::SetTextSizeFromStrokeFontHeight(), PCAD2KICAD::SetTextSizeFromTrueTypeFontHeight(), PCB_TEXT::StyleFromSettings(), PCB_TEXTBOX::StyleFromSettings(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), and DIALOG_FIELD_PROPERTIES::updateText().
void EDA_TEXT::SetTextThickness | ( | int | aWidth | ) |
The TextThickness is that set by the user.
The EffectiveTextPenWidth also factors in bold text and thickness clamping.
Definition at line 197 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, and TEXT_ATTRIBUTES::m_StrokeWidth.
Referenced by PCAD2KICAD::PCAD_FOOTPRINT::AddToBoard(), PCAD2KICAD::PCAD_TEXT::AddToBoard(), CADSTAR_PCB_ARCHIVE_LOADER::applyTextCode(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextCodeIfExists(), SCH_EDIT_TOOL::ChangeTextType(), ALTIUM_PCB::ConvertTexts6ToEdaTextSettings(), MICROWAVE_TOOL::createBaseFootprint(), PCB_BASE_FRAME::CreateNewFootprint(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), DRAWING_TOOL::DrawDimension(), DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), EDA_TEXT_DESC::EDA_TEXT_DESC(), ALTIUM_PCB::HelperParseDimensions6Linear(), ALTIUM_PCB::HelperParseDimensions6Radial(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), FABMASTER::loadEtch(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), PCB_IO_KICAD_LEGACY::loadMODULE_TEXT(), FABMASTER::loadOutline(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), PCB_IO_EAGLE::loadPlain(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAddField(), PCB_IO_EAGLE::orientFPText(), PCB_IO_EAGLE::packageText(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), PCB_TEXT::PCB_TEXT(), FP_TEXT_GRID_TABLE::SetValue(), PCB_TEXT::StyleFromSettings(), PCB_TEXTBOX::StyleFromSettings(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), and DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog().
void EDA_TEXT::SetTextWidth | ( | int | aWidth | ) |
Definition at line 397 of file eda_text.cpp.
References alg::clamp(), ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, m_IuScale, TEXT_ATTRIBUTES::m_Size, TEXT_MAX_SIZE_MILS, TEXT_MIN_SIZE_MILS, and VECTOR2< T >::x.
Referenced by CADSTAR_SCH_ARCHIVE_LOADER::applyTextCodeIfExists(), EDA_TEXT_DESC::EDA_TEXT_DESC(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), FABMASTER::loadEtch(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), FABMASTER::loadOutline(), FP_TEXT_GRID_TABLE::SetValue(), and DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog().
void EDA_TEXT::SetTextX | ( | int | aX | ) |
Definition at line 425 of file eda_text.cpp.
References m_pos, Offset(), and VECTOR2< T >::x.
Referenced by SCH_SHEET_PIN::ConstrainOnEdge(), PCB_TEXT::Flip(), PCB_TEXT::Mirror(), LIB_FIELD::MirrorHorizontal(), LIB_TEXT::MirrorHorizontal(), SCH_DIRECTIVE_LABEL::MirrorHorizontally(), SCH_SHEET_PIN::MirrorHorizontally(), SCH_TEXT::MirrorHorizontally(), and SCH_SHEET_PIN::SetSide().
void EDA_TEXT::SetTextY | ( | int | aY | ) |
Definition at line 431 of file eda_text.cpp.
References m_pos, Offset(), and VECTOR2< T >::y.
Referenced by SCH_SHEET_PIN::ConstrainOnEdge(), PCB_TEXT::Flip(), PCB_TEXT::Mirror(), LIB_FIELD::MirrorVertical(), LIB_TEXT::MirrorVertical(), SCH_DIRECTIVE_LABEL::MirrorVertically(), SCH_SHEET_PIN::MirrorVertically(), SCH_TEXT::MirrorVertically(), and SCH_SHEET_PIN::SetSide().
void EDA_TEXT::SetupRenderCache | ( | const wxString & | aResolvedText, |
const EDA_ANGLE & | aAngle | ||
) |
Definition at line 547 of file eda_text.cpp.
References m_render_cache, m_render_cache_angle, and m_render_cache_text.
void EDA_TEXT::SetVertJustify | ( | GR_TEXT_V_ALIGN_T | aType | ) |
Definition at line 276 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, and TEXT_ATTRIBUTES::m_Valign.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), FOOTPRINT::AutoPositionFields(), ALTIUM_PCB::ConvertTexts6ToEdaTextSettings(), SCH_DRAWING_TOOLS::createNewText(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), SCH_DRAWING_TOOLS::DrawShape(), eagleToKicadAlignment(), EDA_TEXT_DESC::EDA_TEXT_DESC(), ALTIUM_PCB::HelperParseDimensions6Radial(), AUTOPLACER::justifyField(), LIB_TEXTBOX::LIB_TEXTBOX(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadField(), SCH_IO_EAGLE::loadFieldAttributes(), SCH_IO_EAGLE::loadFrame(), PCB_IO_KICAD_LEGACY::loadMODULE_TEXT(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), PCB_IO_EAGLE::loadPlain(), SCH_IO_KICAD_LEGACY::loadSymbol(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef(), SCH_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), LIB_TEXT::MirrorHorizontal(), LIB_TEXT::MirrorVertical(), PCB_IO_EAGLE::orientFPText(), PCB_IO_EAGLE::packageText(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), PCB_TEXTBOX::PCB_TEXTBOX(), LIB_TEXT::Rotate(), SCH_GLOBALLABEL::SCH_GLOBALLABEL(), SCH_TEXTBOX::SCH_TEXTBOX(), SCH_LABEL_BASE::SetSpinStyle(), SCH_GLOBALLABEL::SetSpinStyle(), SCH_HIERLABEL::SetSpinStyle(), SCH_IO_LTSPICE_PARSER::setTextJustification(), PCAD2KICAD::SetTextJustify(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), and DIALOG_SCH_FIELD_PROPERTIES::UpdateField().
|
virtual |
Reimplemented in PCB_TEXTBOX.
Definition at line 245 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, and TEXT_ATTRIBUTES::m_Visible.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), CADSTAR_SCH_ARCHIVE_LOADER::addNewFieldToSymbol(), PCAD2KICAD::PCAD_FOOTPRINT::AddToBoard(), CADSTAR_PCB_ARCHIVE_LOADER::applyTextCode(), SCH_EDITOR_CONTROL::AssignFootprints(), SCH_EDIT_TOOL::ChangeTextType(), SCH_IO_LTSPICE_PARSER::CreateFields(), PCB_BASE_FRAME::CreateNewFootprint(), SCH_IO_LTSPICE_PARSER::CreatePowerSymbol(), SCH_IO_LTSPICE_PARSER::CreateSCH_LABEL(), SCH_IO_LTSPICE_PARSER::CreateSCH_TEXT(), EDA_TEXT_DESC::EDA_TEXT_DESC(), PCB_IO_EASYEDAPRO_PARSER::fillFootprintModelInfo(), FOOTPRINT::FOOTPRINT(), PCB_IO_EASYEDA::FootprintLoad(), PCB_IO_EASYEDAPRO::FootprintLoad(), LIB_FIELD::Init(), CADSTAR_SCH_ARCHIVE_LOADER::loadBusses(), PCB_IO_EAGLE::loadElements(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadField(), FABMASTER::loadFootprints(), SCH_IO_EAGLE::loadInstance(), SCH_IO_EAGLE::loadLibrary(), PCB_IO_KICAD_LEGACY::loadMODULE_TEXT(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), SCH_IO_KICAD_LEGACY_LIB_CACHE::LoadPart(), PCB_IO_EAGLE::loadPlain(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances(), SCH_IO_KICAD_LEGACY::loadSymbol(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymbolFieldAttribute(), SCH_IO_HTTP_LIB::loadSymbolFromPart(), SCH_IO_DATABASE::loadSymbolFromRow(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymbolGateAndPartFields(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef(), DIALOG_FOOTPRINT_PROPERTIES::OnAddField(), DIALOG_LABEL_PROPERTIES::OnAddField(), ALTIUM_PCB::ParseComponents6Data(), SCH_IO_ALTIUM::ParseDesignator(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_ALTIUM::ParseFileName(), PCB_IO_KICAD_SEXPR_PARSER::parseFOOTPRINT_unchecked(), SCH_IO_ALTIUM::ParseHarnessType(), SCH_IO_ALTIUM::ParseLibParameter(), SCH_IO_ALTIUM::ParseParameter(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_TEXT_effects(), SCH_IO_ALTIUM::ParsePowerPort(), SCH_IO_KICAD_SEXPR_PARSER::parseSchText(), SCH_IO_ALTIUM::ParseSheetName(), SCH_EASYEDAPRO_PARSER::ParseSymbol(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), SCH_EDITOR_CONTROL::processCmpToFootprintLinkFile(), DIALOG_CHANGE_SYMBOLS::processSymbols(), processTextItem(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveDcmInfoAsFields(), SCH_FIELD::SCH_FIELD(), FP_TEXT_GRID_TABLE::SetValueAsBool(), DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow(), SCH_SHEET_PATH::UpdateAllScreenReferences(), BOARD_NETLIST_UPDATER::updateFootprintParameters(), and DIALOG_FIELD_PROPERTIES::updateText().
double EDA_TEXT::Similarity | ( | const EDA_TEXT & | aOther | ) | const |
Definition at line 1151 of file eda_text.cpp.
References Levenshtein(), m_attributes, and m_pos.
Referenced by PCB_TEXT::Similarity(), PCB_TEXTBOX::Similarity(), PCB_DIMENSION_BASE::Similarity(), PCB_FIELD::Similarity(), LIB_FIELD::Similarity(), LIB_TEXT::Similarity(), LIB_TEXTBOX::Similarity(), SCH_TEXT::Similarity(), and SCH_TEXTBOX::Similarity().
void EDA_TEXT::SwapAttributes | ( | EDA_TEXT & | aTradingPartner | ) |
Swap the text attributes of the two involved instances.
Definition at line 311 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, and m_pos.
Referenced by SCH_FIELD::SwapData(), SCH_TEXT::SwapData(), and SCH_TEXTBOX::SwapData().
void EDA_TEXT::SwapText | ( | EDA_TEXT & | aTradingPartner | ) |
Definition at line 304 of file eda_text.cpp.
References cacheShownText(), and m_text.
Referenced by SCH_FIELD::SwapData(), SCH_TEXT::SwapData(), and SCH_TEXTBOX::SwapData().
|
virtual |
Test if object bounding box is contained within or intersects aRect.
aRect | Rect to test against. |
aContains | Test for containment instead of intersection if true. |
aAccuracy | Amount to inflate the bounding box. |
Reimplemented in PCB_TEXT.
Definition at line 718 of file eda_text.cpp.
References BOX2< Vec >::Contains(), GetDrawRotation(), GetTextBox(), BOX2< Vec >::Inflate(), and BOX2< Vec >::Intersects().
|
virtual |
Test if aPoint is within the bounds of this object.
aPoint | A VECTOR2I to test. |
aAccuracy | Amount to inflate the bounding box. |
Reimplemented in PCB_TEXT.
Definition at line 706 of file eda_text.cpp.
References BOX2< Vec >::Contains(), GetDrawPos(), GetDrawRotation(), GetTextBox(), BOX2< Vec >::Inflate(), and RotatePoint().
Referenced by LIB_FIELD::HitTest(), LIB_TEXT::HitTest(), DS_DRAW_ITEM_TEXT::HitTest(), and PCB_TEXT::TextHitTest().
|
static |
Check if aURL is a valid hyperlink.
aURL | String to validate |
Definition at line 1088 of file eda_text.cpp.
References IsGotoPageHref().
Referenced by SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), and DIALOG_TEXT_PROPERTIES::TransferDataFromWindow().
|
private |
Definition at line 434 of file eda_text.h.
Referenced by Compare(), EDA_TEXT(), GetAttributes(), GetFont(), GetHorizJustify(), GetLineSpacing(), GetTextAngle(), GetTextAngleDegrees(), GetTextColor(), GetTextHeight(), GetTextSize(), GetTextThickness(), GetTextWidth(), GetVertJustify(), IsBold(), IsItalic(), IsKeepUpright(), IsMirrored(), IsMultilineAllowed(), IsVisible(), operator=(), SetAttributes(), SetBold(), SetBoldFlag(), SetFont(), SetHorizJustify(), SetItalic(), SetKeepUpright(), SetLineSpacing(), SetMirrored(), SetMultilineAllowed(), SetTextAngle(), SetTextColor(), SetTextHeight(), SetTextSize(), SetTextThickness(), SetTextWidth(), SetVertJustify(), SetVisible(), Similarity(), and SwapAttributes().
|
mutableprivate |
Definition at line 432 of file eda_text.h.
Referenced by EDA_TEXT(), GetTextBox(), and operator=().
|
mutableprivate |
Definition at line 431 of file eda_text.h.
Referenced by EDA_TEXT(), and GetTextBox().
|
mutableprivate |
Definition at line 430 of file eda_text.h.
Referenced by EDA_TEXT(), and GetTextBox().
|
mutableprivate |
Definition at line 429 of file eda_text.h.
Referenced by GetTextBox().
|
mutableprivate |
Definition at line 428 of file eda_text.h.
Referenced by cacheShownText(), ClearBoundingBoxCache(), EDA_TEXT(), Empty(), GetTextBox(), Offset(), operator=(), Replace(), SetAttributes(), SetBoldFlag(), SetFont(), SetHorizJustify(), SetItalic(), SetKeepUpright(), SetLineSpacing(), SetMirrored(), SetMultilineAllowed(), SetTextAngle(), SetTextHeight(), SetTextSize(), SetTextThickness(), SetTextWidth(), SetVertJustify(), and SwapAttributes().
|
protected |
A hyperlink URL.
If empty, this text object is not a hyperlink.
Definition at line 413 of file eda_text.h.
Referenced by SCH_TEXT::DoHypertextAction(), SCH_TEXTBOX::DoHypertextAction(), GetHyperlink(), HasHyperlink(), RemoveHyperlink(), and SetHyperlink().
|
private |
Definition at line 420 of file eda_text.h.
Referenced by EDA_TEXT(), Format(), SetTextHeight(), SetTextSize(), and SetTextWidth().
|
private |
Definition at line 435 of file eda_text.h.
Referenced by Compare(), EDA_TEXT(), GetTextPos(), Offset(), operator=(), SetAttributes(), SetTextPos(), SetTextX(), SetTextY(), Similarity(), and SwapAttributes().
|
mutableprivate |
Definition at line 426 of file eda_text.h.
Referenced by AddRenderCacheGlyph(), ClearRenderCache(), EDA_TEXT(), GetRenderCache(), Offset(), operator=(), and SetupRenderCache().
|
mutableprivate |
Definition at line 424 of file eda_text.h.
Referenced by EDA_TEXT(), GetRenderCache(), operator=(), and SetupRenderCache().
|
mutableprivate |
Definition at line 423 of file eda_text.h.
Referenced by EDA_TEXT(), GetRenderCache(), and operator=().
|
mutableprivate |
Definition at line 425 of file eda_text.h.
Referenced by EDA_TEXT(), GetRenderCache(), and operator=().
|
mutableprivate |
Definition at line 422 of file eda_text.h.
Referenced by EDA_TEXT(), GetRenderCache(), operator=(), and SetupRenderCache().
|
private |
Definition at line 417 of file eda_text.h.
Referenced by cacheShownText(), EDA_TEXT(), GetShownText(), and operator=().
|
private |
Definition at line 418 of file eda_text.h.
Referenced by cacheShownText(), EDA_TEXT(), HasTextVars(), and operator=().
|
private |
Definition at line 416 of file eda_text.h.
Referenced by cacheShownText(), Compare(), CopyText(), EDA_TEXT(), Empty(), GetText(), operator=(), Replace(), SetText(), and SwapText().