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. | |
virtual wxString | GetShownText (bool aAllowExtraText, int aDepth=0) const |
Return the string actually shown after processing of the base text. | |
bool | HasTextVars () const |
Indicates the ShownText has text var references which need to be processed. | |
virtual void | SetText (const wxString &aText) |
void | SetTextThickness (int aWidth) |
The TextThickness is that set by the user. | |
int | GetTextThickness () const |
int | GetEffectiveTextPenWidth (int aDefaultPenWidth=0) const |
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultPenWidth. | |
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. | |
void | SwapAttributes (EDA_TEXT &aTradingPartner) |
Swap the text attributes of the two involved instances. | |
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. | |
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. | |
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. | |
virtual bool | TextHitTest (const VECTOR2I &aPoint, int aAccuracy=0) const |
Test if aPoint is within the bounds of this object. | |
virtual bool | TextHitTest (const BOX2I &aRect, bool aContains, int aAccuracy=0) const |
Test if object bounding box is contained within or intersects aRect. | |
BOX2I | GetTextBox (int aLine=-1) const |
Useful in multiline texts to calculate the full text or a line area (for zones filling, locate functions....) | |
int | GetInterline () const |
Return the distance between two lines of text. | |
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. | |
double | Levenshtein (const EDA_TEXT &aOther) const |
Return the levenstein distance between two texts. | |
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. | |
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. | |
static bool | IsGotoPageHref (const wxString &aHref, wxString *aDestination=nullptr) |
Check if aHref is a valid internal hyperlink. | |
static wxString | GotoPageHref (const wxString &aDestination) |
Generate a href to a page in the current schematic. | |
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. | |
Protected Attributes | |
wxString | m_hyperlink |
A hyperlink URL. | |
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 |
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 82 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 114 of file eda_text.cpp.
References m_attributes, m_bounding_box_cache, 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 145 of file eda_text.cpp.
void EDA_TEXT::AddRenderCacheGlyph | ( | const SHAPE_POLY_SET & | aPoly | ) |
Definition at line 553 of file eda_text.cpp.
References m_render_cache.
|
protectedvirtual |
Reimplemented in SCH_LABEL_BASE.
Definition at line 462 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 503 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 497 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 1057 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 188 of file eda_text.cpp.
References cacheShownText(), and m_text.
void EDA_TEXT::Empty | ( | ) |
Definition at line 454 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 172 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 906 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::saveField(), and SCH_IO_KICAD_SEXPR_LIB_CACHE::saveField().
|
inline |
Definition at line 195 of file eda_text.h.
References m_attributes.
Referenced by BOARD_ADAPTER::addText(), PCB_IO_IPC2581::addText(), PCB_TEXT::Deserialize(), KIGFX::DS_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), DS_DRAW_ITEM_TEXT::GetApproxBBox(), GetEffectiveTextShape(), GetRenderCache(), SIM_MODEL::MigrateSimModel(), std::hash< EDA_TEXT >::operator()(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), BRDITEMS_PLOTTER::PlotText(), PCB_TEXT::Serialize(), PCB_TEXT::TransformTextToPolySet(), and PCB_TEXTBOX::TransformTextToPolySet().
|
protectedvirtual |
Reimplemented in SCH_FIELD, SCH_TEXT, and SCH_TEXTBOX.
Definition at line 480 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 SCH_TEXTBOX, and PCB_TEXTBOX.
Definition at line 341 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 340 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 322 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(), SCH_FIELD::GetPenWidth(), SCH_DIRECTIVE_LABEL::GetPenWidth(), SCH_TEXT::GetPenWidth(), GetTextBox(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), BRDITEMS_PLOTTER::PlotText(), SCH_FIELD::Print(), SCH_TEXT::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 978 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 211 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_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), KIGFX::DS_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), PCB_IO_KICAD_SEXPR::format(), Format(), PCB_IO_KICAD_SEXPR::formatRenderCache(), getDrawFont(), SCH_FIELD::getDrawFont(), SCH_TEXT::getDrawFont(), SCH_TEXTBOX::getDrawFont(), KIGFX::SCH_PAINTER::getFont(), GetFontIndex(), GetFontName(), 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(), FIELDS_GRID_TABLE::GetValue(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotText(), SCH_FIELD::Print(), SCH_TEXT::Print(), printOneLineOfText(), PCB_TEXT::Serialize(), DIALOG_LABEL_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 847 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 491 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 838 of file eda_text.cpp.
References GetFont(), and KIFONT::FONT::GetName().
Referenced by Compare(), and IsDefaultFormatting().
|
inline |
Definition at line 164 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Halign.
Referenced by SCH_EDIT_TOOL::ChangeTextType(), SCH_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(), SCH_TEXTBOX::GetDrawPos(), PCB_TEXTBOX::GetDrawPos(), SCH_FIELD::GetEffectiveHorizJustify(), 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(), SIM_MODEL::MigrateSimModel(), SCH_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), PCB_TEXT::Mirror(), SCH_TEXT::MirrorHorizontally(), SCH_TEXTBOX::MirrorHorizontally(), SCH_TEXT::MirrorVertically(), SCH_TEXTBOX::MirrorVertically(), SCH_TEXT::NormalizeJustification(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_FIELD::Plot(), positioningChanged(), SCH_FIELD::Print(), SCH_TEXTBOX::Print(), printOneLineOfText(), processTextItem(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), PCB_TEXT::Serialize(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 361 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(), PCB_TEXT::Serialize(), 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 559 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 748 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 219 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_LineSpacing.
Referenced by Format(), and PCB_TEXT::Serialize().
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 510 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 SCH_FIELD, SCH_LABEL_BASE, SCH_TEXT, SCH_TEXTBOX, PCB_TEXT, and PCB_TEXTBOX.
Definition at line 109 of file eda_text.h.
References m_shown_text.
Referenced by BOARD_ADAPTER::addText(), SCH_LABEL_BASE::cacheShownText(), KIGFX::DS_PAINTER::draw(), PCB_IO_KICAD_SEXPR::formatRenderCache(), PCB_IO_IPC2581::generateLayerSetNet(), DS_DRAW_ITEM_TEXT::GetApproxBBox(), GetEffectiveTextShape(), PCB_TEXT::GetShownText(), PCB_TEXTBOX::GetShownText(), SCH_FIELD::GetShownText(), SCH_TEXT::GetShownText(), SCH_TEXTBOX::GetShownText(), SCH_LABEL_BASE::GetShownText(), GetTextBox(), BRDITEMS_PLOTTER::PlotText(), 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 98 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(), SCH_FIELD::compare(), SCH_TEXT::compare(), SCH_TEXTBOX::compare(), SCH_BUS_WIRE_ENTRY::ConnectionPropagatesTo(), SCH_DRAWING_TOOLS::createNewText(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_FIELD_PROPERTIES::DIALOG_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(), SCH_FIELD::GetFullText(), SCH_FIELD::GetItemDescription(), SCH_PIN::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(), 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(), LIB_SYMBOL::GetRef(), SCH_SYMBOL::GetRef(), FOOTPRINT::GetReference(), LIB_SYMBOL::GetSearchTerms(), SCH_LABEL_BASE::GetShownText(), SCH_TEXT::GetShownText(), FOOTPRINT::GetValue(), LIB_SYMBOL::GetValue(), SCH_SYMBOL::GetValue(), FIELDS_GRID_TABLE::GetValue(), FP_TEXT_GRID_TABLE::GetValue(), SCH_LABEL_BASE::HasConnectivityChanges(), SCH_SHEET_PIN::HasConnectivityChanges(), hash_fp_item(), SCH_SHEET::HasUndefinedPins(), 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(), SCH_FIELD::Matches(), SCH_LABEL_BASE::Matches(), SCH_SHEET_PIN::Matches(), SCH_TEXT::Matches(), SCH_TEXTBOX::Matches(), PCB_TEXT::Matches(), PCB_TEXTBOX::Matches(), SIM_MODEL::MigrateSimModel(), 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<<(), 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(), SCH_TEXT::Plot(), LIB_SYMBOL::PlotFields(), PlotInteractiveLayer(), DIALOG_RESCUE_EACH::PopulateInstanceList(), DIALOG_CHANGE_SYMBOLS::processSymbols(), processTextItem(), SCH_EDIT_FRAME::PutDataInPreviousState(), NETLIST_EXPORTER_SPICE_MODEL::readPorts(), SYMBOL_EDITOR_CONTROL::RenameSymbol(), SCH_FIELD::Replace(), SCH_COMMIT::Revert(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_SEXPR::saveField(), SCH_IO_KICAD_SEXPR_LIB_CACHE::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_LEGACY::saveText(), SCH_IO_KICAD_SEXPR::saveText(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveText(), SCH_IO_KICAD_SEXPR::saveTextBox(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveTextBox(), SCH_EDIT_FRAME::SendSelectItemsToPcb(), PCB_TEXT::Serialize(), SCH_IO_LTSPICE_PARSER::setTextJustification(), SYMBOL_EDIT_FRAME::setupUIConditions(), SYMBOL_VIEWER_FRAME::setupUIConditions(), EE_INSPECTION_TOOL::ShowDatasheet(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), 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_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_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 134 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(), SCH_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(), SCH_FIELD::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), PCB_TEXT::GetBoundingBox(), SCH_TEXTBOX::GetDrawPos(), GetDrawRotation(), SCH_FIELD::GetDrawRotation(), PCB_TEXT::GetDrawRotation(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), PCB_TEXTBOX::GetShownText(), SCH_TEXTBOX::GetShownText(), SCH_LABEL_BASE::GetSpinStyle(), FIELDS_GRID_TABLE::GetValue(), FP_TEXT_GRID_TABLE::GetValue(), EE_SELECTION_TOOL::GuessSelectionCandidates(), hash_fp_item(), SCH_EDIT_TOOL::JustifyText(), PCB_TEXT::KeepUpright(), SCH_IO_EAGLE::loadFieldAttributes(), PCB_TEXT::Mirror(), PCB_TEXTBOX::Mirror(), PCB_DIMENSION_BASE::Mirror(), SCH_TEXT::MirrorHorizontally(), SCH_TEXTBOX::MirrorHorizontally(), SCH_TEXT::MirrorSpinStyle(), SCH_TEXT::MirrorVertically(), SCH_TEXTBOX::MirrorVertically(), SCH_TEXT::NormalizeJustification(), KI_TEST::kitest_cmp_drawings::operator()(), PCB_IO_EAGLE::orientFPText(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_TEXT_effects(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), positioningChanged(), SCH_FIELD::Print(), SCH_TEXT::Print(), SCH_TEXTBOX::Print(), processTextItem(), SCH_EDIT_TOOL::Rotate(), SCH_FIELD::Rotate(), SCH_TEXTBOX::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_LEGACY::saveField(), SCH_IO_KICAD_SEXPR::saveField(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), SCH_IO_KICAD_SEXPR::saveText(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveText(), SCH_IO_KICAD_SEXPR::saveTextBox(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveTextBox(), PCB_TEXTBOX::SetTextAngle(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow(), EASYEDA_PARSER_BASE::TransformTextToBaseline(), DIALOG_FIELD_PROPERTIES::UpdateField(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_RADIAL::updateGeometry(), and PCB_DIM_LEADER::updateGeometry().
|
inline |
Definition at line 141 of file eda_text.h.
References EDA_ANGLE::AsDegrees(), TEXT_ATTRIBUTES::m_Angle, and m_attributes.
Referenced by EDA_TEXT_DESC::EDA_TEXT_DESC(), and PCB_TEXT::Serialize().
BOX2I EDA_TEXT::GetTextBox | ( | int | aLine = -1 | ) | 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. |
Definition at line 565 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_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(), SCH_FIELD::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), DS_DRAW_ITEM_TEXT::GetBoundingBox(), PCB_DIMENSION_BASE::GetBoundingBox(), PCB_TEXT::GetBoundingBox(), SCH_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 231 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(), FIELDS_GRID_TABLE::GetValue(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), SCH_TEXT::Plot(), SCH_TEXTBOX::Plot(), SCH_FIELD::Print(), SCH_LABEL_BASE::Print(), SCH_TEXT::Print(), SCH_TEXTBOX::Print(), DS_DRAW_ITEM_TEXT::PrintWsItem(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXT_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 228 of file eda_text.h.
References m_attributes, TEXT_ATTRIBUTES::m_Size, and VECTOR2< T >::y.
Referenced by SCH_LABEL_BASE::AutoplaceFields(), SCH_FIELD::compare(), SCH_TEXT::compare(), SCH_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(), FIELDS_GRID_TABLE::GetValue(), 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 234 of file eda_text.h.
References m_pos.
Referenced by SCH_LABEL_BASE::AutoplaceFields(), SCH_FIELD::compare(), SCH_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(), 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(), SCH_FIELD::GetPosition(), SCH_TEXT::GetPosition(), DS_DRAW_ITEM_TEXT::GetPosition(), PCB_TEXT::GetPosition(), FIELDS_GRID_TABLE::GetValue(), PCB_IO_EAGLE::loadPlain(), PCB_POINT_EDITOR::makePoints(), PCB_TEXT::Mirror(), PCB_DIMENSION_BASE::Mirror(), SCH_FIELD::MirrorHorizontally(), SCH_DIRECTIVE_LABEL::MirrorHorizontally(), SCH_SHEET_PIN::MirrorHorizontally(), SCH_TEXT::MirrorHorizontally(), SCH_FIELD::MirrorVertically(), SCH_DIRECTIVE_LABEL::MirrorVertically(), SCH_SHEET_PIN::MirrorVertically(), SCH_TEXT::MirrorVertically(), SCH_TEXT::NormalizeJustification(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), std::hash< EDA_TEXT >::operator()(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), BRDITEMS_PLOTTER::PlotText(), SCH_FIELD::Print(), SCH_LABEL_BASE::Print(), DIALOG_CHANGE_SYMBOLS::processSymbols(), SCH_LABEL_BASE::Rotate(), SCH_SHEET_PIN::Rotate(), SCH_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(), FIELDS_GRID_TABLE::SetValue(), 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 222 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(), SCH_TEXTBOX::GetLegacyTextMargin(), PCB_TEXTBOX::GetLegacyTextMargin(), CADSTAR_SCH_ARCHIVE_LOADER::getScaledLibPart(), 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(), SCH_TEXT::Print(), SCH_TEXTBOX::Print(), printOneLineOfText(), processTextItem(), SCH_IO_KICAD_LEGACY::saveSheet(), PCB_TEXT::Serialize(), 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 817 of file eda_text.cpp.
References _, IsBold(), and IsItalic().
Referenced by SCH_FIELD::GetMsgPanelInfo().
|
inline |
Definition at line 126 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(), PCB_TEXTBOX::GetShownText(), SCH_TEXTBOX::GetShownText(), FP_TEXT_GRID_TABLE::GetValue(), IsDefaultFormatting(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), processTextItem(), SCH_IO_KICAD_LEGACY::saveText(), PCB_TEXT::Serialize(), 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 225 of file eda_text.h.
References m_attributes, TEXT_ATTRIBUTES::m_Size, and VECTOR2< T >::x.
Referenced by SCH_FIELD::compare(), SCH_TEXT::compare(), SCH_TEXTBOX::compare(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), GetEffectiveTextPenWidth(), PCB_TEXT::getKnockoutMargin(), 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_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LABEL_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 167 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(), SCH_TEXTBOX::GetDrawPos(), SCH_FIELD::GetEffectiveVertJustify(), GetLinePositions(), SCH_FIELD::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), GetTextBox(), hash_fp_item(), IsDefaultFormatting(), SCH_FIELD::IsVertJustifyFlipped(), SCH_IO_EAGLE::loadFieldAttributes(), SCH_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SCH_TEXT::MirrorHorizontally(), SCH_TEXT::MirrorVertically(), SCH_TEXT::NormalizeJustification(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_FIELD::Plot(), positioningChanged(), SCH_FIELD::Print(), SCH_TEXTBOX::Print(), printOneLineOfText(), processTextItem(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), PCB_TEXT::Serialize(), 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 1166 of file eda_text.cpp.
Referenced by SCH_SHEET::Plot().
|
inlinevirtual |
Definition at line 360 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 117 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_TEXT::GetShownText(), SCH_TEXTBOX::GetShownText(), SCH_LABEL_BASE::GetShownText(), SCH_LABEL_BASE::HasCachedDriverName(), and SCH_LABEL_BASE::SCH_LABEL_BASE().
|
inline |
Definition at line 148 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Bold.
Referenced by BOARD_ADAPTER::addText(), SCH_EDIT_TOOL::ChangeTextType(), SCH_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(), SCH_FIELD::getDrawFont(), SCH_TEXT::getDrawFont(), SCH_TEXTBOX::getDrawFont(), GetEffectiveTextPenWidth(), KIGFX::SCH_PAINTER::getFont(), SCH_LABEL_BASE::GetMsgPanelInfo(), SCH_TABLECELL::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), SCH_FIELD::GetRenderCache(), PCB_TEXTBOX::GetShownText(), SCH_TEXTBOX::GetShownText(), GetTextBox(), GetTextStyleName(), FIELDS_GRID_TABLE::GetValue(), FIELDS_GRID_TABLE::GetValueAsBool(), 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(), BRDITEMS_PLOTTER::PlotText(), SCH_FIELD::Print(), SCH_TEXT::Print(), SCH_TEXTBOX::Print(), printOneLineOfText(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), PCB_TEXT::Serialize(), SetFontIndex(), FIELDS_GRID_TABLE::SetValue(), DIALOG_LABEL_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 891 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 1160 of file eda_text.cpp.
Referenced by PDF_PLOTTER::EndPlot(), SCH_NAVIGATE_TOOL::HypertextCommand(), and ValidateHyperlink().
|
inline |
Definition at line 144 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(), SCH_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(), SCH_FIELD::getDrawFont(), SCH_TEXT::getDrawFont(), SCH_TEXTBOX::getDrawFont(), KIGFX::SCH_PAINTER::getFont(), SCH_LABEL_BASE::GetMsgPanelInfo(), SCH_TABLECELL::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), SCH_FIELD::GetRenderCache(), PCB_TEXTBOX::GetShownText(), SCH_TEXTBOX::GetShownText(), GetTextBox(), GetTextStyleName(), FIELDS_GRID_TABLE::GetValue(), FIELDS_GRID_TABLE::GetValueAsBool(), 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(), BRDITEMS_PLOTTER::PlotText(), SCH_FIELD::Print(), SCH_TEXT::Print(), SCH_TEXTBOX::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(), PCB_TEXT::Serialize(), SetFontIndex(), FIELDS_GRID_TABLE::SetValue(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 170 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(), PCB_TEXT_DESC::PCB_TEXT_DESC(), and PCB_TEXT::Serialize().
|
inline |
Definition at line 154 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(), PCB_TEXT::Serialize(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 161 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Multiline.
Referenced by GetTextBox(), IsDefaultFormatting(), BRDITEMS_PLOTTER::PlotText(), Print(), and PCB_TEXT::Serialize().
|
inlinevirtual |
Reimplemented in PCB_TEXTBOX.
Definition at line 151 of file eda_text.h.
References m_attributes, and TEXT_ATTRIBUTES::m_Visible.
Referenced by PCB_IO_IPC2581::addText(), SCH_EDITOR_CONTROL::AssignFootprints(), EDIT_TOOL::DeleteItems(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), AUTOPLACER::DoAutoplace(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), 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(), SCH_FIELD::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), FIELDS_GRID_TABLE::GetValue(), FIELDS_GRID_TABLE::GetValueAsBool(), FP_TEXT_GRID_TABLE::GetValueAsBool(), DRC_RTREE::Insert(), IsDefaultFormatting(), SCH_IO_EAGLE::loadInstance(), SCH_FIELD::Matches(), EE_SELECTION_TOOL::narrowSelection(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), LIB_SYMBOL::PlotFields(), BRDITEMS_PLOTTER::PlotFootprintTextItems(), LIB_SYMBOL::Print(), SCH_FIELD::Print(), SCH_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(), EE_SELECTION_TOOL::Selectable(), PCB_TEXT::Serialize(), 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 1098 of file eda_text.cpp.
References distance(), and GetText().
Referenced by 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::SetValue(), and DIALOG_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::SetValue(), and DIALOG_FIELD_PROPERTIES::UpdateField().
void EDA_TEXT::Offset | ( | const VECTOR2I & | aOffset | ) |
Definition at line 435 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(), 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 357 of file eda_text.h.
References Compare().
Definition at line 150 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 356 of file eda_text.h.
References Compare().
Referenced by PCB_TEXT::operator==(), PCB_TEXTBOX::operator==(), PCB_DIMENSION_BASE::operator==(), PCB_FIELD::operator==(), SCH_FIELD::operator==(), SCH_TEXT::operator==(), and SCH_TEXTBOX::operator==().
|
inline |
Definition at line 358 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 724 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 792 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 363 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 343 of file eda_text.cpp.
References cacheShownText(), ClearRenderCache(), m_bounding_box_cache_valid, m_text, and EDA_ITEM::Replace().
Referenced by 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 290 of file eda_text.cpp.
References ClearRenderCache(), m_attributes, m_bounding_box_cache_valid, and m_pos.
Referenced by SCH_EDIT_TOOL::ChangeTextType(), PCB_TEXT::Deserialize(), SCH_FIELD::ImportValues(), SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic(), SIM_MODEL::MigrateSimModel(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), DIALOG_CHANGE_SYMBOLS::processSymbols(), and processTextItem().
|
inline |
Definition at line 194 of file eda_text.h.
References m_attributes.
void EDA_TEXT::SetBold | ( | bool | aBold | ) |
Definition at line 219 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(), 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(), FIELDS_GRID_TABLE::SetValue(), FIELDS_GRID_TABLE::SetValueAsBool(), DIALOG_LABEL_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 235 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 356 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(), FIELDS_GRID_TABLE::SetValue(), DIALOG_LABEL_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 868 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 266 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(), AUTOPLACER::justifyField(), PCB_TEXT::KeepUpright(), 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(), SCH_TEXT::MirrorHorizontally(), SCH_TEXTBOX::MirrorHorizontally(), SCH_TEXT::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(), SCH_TEXTBOX::SCH_TEXTBOX(), SCH_LABEL_BASE::SetSpinStyle(), SCH_IO_LTSPICE_PARSER::setTextJustification(), PCAD2KICAD::SetTextJustify(), FIELDS_GRID_TABLE::SetValue(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), and DIALOG_FIELD_PROPERTIES::UpdateField().
|
inline |
Definition at line 362 of file eda_text.h.
References m_hyperlink.
Referenced by SCH_EDIT_TOOL::ChangeTextType(), PCB_TEXT::Deserialize(), 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 211 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(), 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(), FIELDS_GRID_TABLE::SetValue(), FIELDS_GRID_TABLE::SetValueAsBool(), FP_TEXT_GRID_TABLE::SetValueAsBool(), PCB_TEXT::StyleFromSettings(), PCB_TEXTBOX::StyleFromSettings(), DIALOG_LABEL_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 282 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 364 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 250 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(), 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 258 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(), 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 181 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::ConvertTexts6ToFootprintItemOnLayer(), createBoard(), PCB_BASE_FRAME::CreateNewFootprint(), SCH_DRAWING_TOOLS::createNewText(), SCH_IO_LTSPICE_PARSER::CreateSCH_LABEL(), PCB_TEXT::Deserialize(), 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(), SCH_LABEL_BASE::IncrementLabel(), CADSTAR_SCH_ARCHIVE_LOADER::loadBusses(), CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets(), FABMASTER::loadEtch(), FABMASTER::loadFootprints(), SCH_IO_EAGLE::loadFrame(), FABMASTER::loadGraphics(), CADSTAR_SCH_ARCHIVE_LOADER::loadHierarchicalSheetPins(), PCB_IO_KICAD_LEGACY::loadMODULE_TEXT(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), FABMASTER::loadOutline(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), PCB_IO_EAGLE::loadPlain(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef(), PCB_IO_EAGLE::orientFPText(), PCB_IO_EAGLE::packageText(), 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_KICAD_SEXPR_PARSER::parseSchTextBoxContent(), SCH_IO_ALTIUM::ParseSheetEntry(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), PCB_IO_KICAD_SEXPR_PARSER::parseTextBoxContent(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), BOARD_EDITOR_CONTROL::PlaceFootprint(), DIALOG_EXCHANGE_FOOTPRINTS::processFootprint(), processTextItem(), CLIPBOARD_IO::SaveSelection(), FOOTPRINT::SetFPID(), SCH_FIELD::SetName(), FOOTPRINT::SetReference(), SCH_FIELD::SetText(), FOOTPRINT::SetValue(), FP_TEXT_GRID_TABLE::SetValue(), DIALOG_LABEL_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(), BOARD_NETLIST_UPDATER::updateFootprintParameters(), and PCB_DIMENSION_BASE::updateText().
|
virtual |
Reimplemented in PCB_TEXTBOX.
Definition at line 203 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::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(), 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_TEXTBOX::Plot(), SCH_TEXTBOX::Print(), SCH_EDIT_TOOL::Rotate(), SCH_FIELD::Rotate(), SCH_TEXTBOX::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(), FIELDS_GRID_TABLE::SetValue(), FP_TEXT_GRID_TABLE::SetValue(), 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 137 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 230 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(), FIELDS_GRID_TABLE::SetValue(), DIALOG_LABEL_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 406 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_MM, TEXT_MIN_SIZE_MM, 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 417 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(), SCH_FIELD::BeginEdit(), SCH_TEXT::BeginEdit(), BOOST_AUTO_TEST_CASE(), SCH_FIELD::CalcEdit(), SCH_TEXT::CalcEdit(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), DRAWING_TOOL::DrawDimension(), DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), 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(), SCH_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(), 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(), FIELDS_GRID_TABLE::SetValue(), EASYEDA_PARSER_BASE::TransformTextToBaseline(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), DIALOG_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 372 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_MM, TEXT_MIN_SIZE_MM, 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(), 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::loadSymbolFrame(), 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(), SCH_FIELD::SetSchTextSize(), SCH_TEXT::SetSchTextSize(), SCH_TEXTBOX::SetSchTextSize(), PCAD2KICAD::SetTextSizeFromStrokeFontHeight(), PCAD2KICAD::SetTextSizeFromTrueTypeFontHeight(), FIELDS_GRID_TABLE::SetValue(), PCB_TEXT::StyleFromSettings(), PCB_TEXTBOX::StyleFromSettings(), DIALOG_LABEL_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 195 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(), PCB_TEXT::Deserialize(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), DRAWING_TOOL::DrawDimension(), DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), EDA_TEXT_DESC::EDA_TEXT_DESC(), 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 395 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_MM, TEXT_MIN_SIZE_MM, 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 423 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(), SCH_FIELD::MirrorHorizontally(), 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 429 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(), SCH_FIELD::MirrorVertically(), 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 545 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 274 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(), AUTOPLACER::justifyField(), 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(), SCH_TEXT::MirrorHorizontally(), SCH_TEXT::MirrorVertically(), 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(), 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(), FIELDS_GRID_TABLE::SetValue(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), and DIALOG_FIELD_PROPERTIES::UpdateField().
|
virtual |
Reimplemented in PCB_TEXTBOX.
Definition at line 243 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(), EDIT_TOOL::DeleteItems(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), EDA_TEXT_DESC::EDA_TEXT_DESC(), PCB_IO_EASYEDAPRO_PARSER::fillFootprintModelInfo(), FOOTPRINT::FOOTPRINT(), PCB_IO_EASYEDA::FootprintLoad(), PCB_IO_EASYEDAPRO::FootprintLoad(), LIB_SYMBOL::LIB_SYMBOL(), 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(), 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(), FIELDS_GRID_TABLE::SetValue(), FIELDS_GRID_TABLE::SetValueAsBool(), 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 1144 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(), SCH_FIELD::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 309 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 302 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 711 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 699 of file eda_text.cpp.
References BOX2< Vec >::Contains(), GetDrawPos(), GetDrawRotation(), GetTextBox(), BOX2< Vec >::Inflate(), and RotatePoint().
Referenced by DS_DRAW_ITEM_TEXT::HitTest(), and PCB_TEXT::TextHitTest().
|
static |
Check if aURL is a valid hyperlink.
aURL | String to validate |
Definition at line 1081 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 435 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 433 of file eda_text.h.
Referenced by EDA_TEXT(), GetTextBox(), and operator=().
|
mutableprivate |
Definition at line 432 of file eda_text.h.
Referenced by EDA_TEXT(), and GetTextBox().
|
mutableprivate |
Definition at line 431 of file eda_text.h.
Referenced by GetTextBox().
|
mutableprivate |
Definition at line 430 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 415 of file eda_text.h.
Referenced by SCH_TEXT::DoHypertextAction(), SCH_TEXTBOX::DoHypertextAction(), GetHyperlink(), HasHyperlink(), RemoveHyperlink(), and SetHyperlink().
|
private |
Definition at line 422 of file eda_text.h.
Referenced by EDA_TEXT(), Format(), SetTextHeight(), SetTextSize(), and SetTextWidth().
|
private |
Definition at line 436 of file eda_text.h.
Referenced by Compare(), EDA_TEXT(), GetTextPos(), Offset(), operator=(), SetAttributes(), SetTextPos(), SetTextX(), SetTextY(), Similarity(), and SwapAttributes().
|
mutableprivate |
Definition at line 428 of file eda_text.h.
Referenced by AddRenderCacheGlyph(), ClearRenderCache(), EDA_TEXT(), GetRenderCache(), Offset(), operator=(), and SetupRenderCache().
|
mutableprivate |
Definition at line 426 of file eda_text.h.
Referenced by EDA_TEXT(), GetRenderCache(), operator=(), and SetupRenderCache().
|
mutableprivate |
Definition at line 425 of file eda_text.h.
Referenced by EDA_TEXT(), GetRenderCache(), and operator=().
|
mutableprivate |
Definition at line 427 of file eda_text.h.
Referenced by EDA_TEXT(), GetRenderCache(), and operator=().
|
mutableprivate |
Definition at line 424 of file eda_text.h.
Referenced by EDA_TEXT(), GetRenderCache(), operator=(), and SetupRenderCache().
|
private |
Definition at line 419 of file eda_text.h.
Referenced by cacheShownText(), EDA_TEXT(), GetShownText(), and operator=().
|
private |
Definition at line 420 of file eda_text.h.
Referenced by cacheShownText(), EDA_TEXT(), HasTextVars(), and operator=().
|
private |
Definition at line 418 of file eda_text.h.
Referenced by cacheShownText(), Compare(), CopyText(), EDA_TEXT(), Empty(), GetText(), operator=(), Replace(), SetText(), and SwapText().