KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EDA_TEXT Class Reference

A mix-in class (via multiple inheritance) that handles texts such as labels, parts, components, or footprints. More...

#include <eda_text.h>

Inheritance diagram for EDA_TEXT:
DS_DRAW_ITEM_TEXT LIB_FIELD LIB_TEXT LIB_TEXTBOX PCB_TEXT PCB_TEXTBOX SCH_FIELD SCH_TEXT SCH_TEXTBOX

Public Member Functions

 EDA_TEXT (const EDA_IU_SCALE &aIuScale, const wxString &aText=wxEmptyString)
 
 EDA_TEXT (const EDA_TEXT &aText)
 
virtual ~EDA_TEXT ()
 
EDA_TEXToperator= (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_ANGLEGetTextAngle () 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_ATTRIBUTESGetAttributes () 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::FONTGetFont () 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 VECTOR2IGetTextPos () 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_COMPOUNDGetEffectiveTextShape (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::FONTgetDrawFont () const
 
virtual const KIFONT::METRICSgetFontMetrics () 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_SCALEm_IuScale
 
wxString m_render_cache_text
 
const KIFONT::FONTm_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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ EDA_TEXT() [1/2]

EDA_TEXT::EDA_TEXT ( const EDA_IU_SCALE aIuScale,
const wxString &  aText = wxEmptyString 
)

◆ EDA_TEXT() [2/2]

◆ ~EDA_TEXT()

EDA_TEXT::~EDA_TEXT ( )
virtual

Definition at line 147 of file eda_text.cpp.

Member Function Documentation

◆ AddRenderCacheGlyph()

void EDA_TEXT::AddRenderCacheGlyph ( const SHAPE_POLY_SET aPoly)

Definition at line 555 of file eda_text.cpp.

References m_render_cache.

◆ cacheShownText()

void EDA_TEXT::cacheShownText ( )
protectedvirtual

◆ ClearBoundingBoxCache()

◆ ClearRenderCache()

◆ Compare()

int EDA_TEXT::Compare ( const EDA_TEXT aOther) const

◆ CopyText()

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().

◆ Empty()

void EDA_TEXT::Empty ( )

◆ FlipHJustify()

◆ Format()

void EDA_TEXT::Format ( OUTPUTFORMATTER aFormatter,
int  aNestLevel,
int  aControlBits 
) const
virtual

Output the object to aFormatter in s-expression form.

Parameters
aFormatterThe OUTPUTFORMATTER object to write to.
aNestLevelThe indentation next level.
aControlBitsThe control bit definition for object specific formatting.
Exceptions
IO_ERRORon 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().

◆ GetAttributes()

◆ getDrawFont()

◆ GetDrawPos()

virtual VECTOR2I EDA_TEXT::GetDrawPos ( ) const
inlinevirtual

◆ GetDrawRotation()

◆ GetEffectiveTextPenWidth()

◆ GetEffectiveTextShape()

std::shared_ptr< SHAPE_COMPOUND > EDA_TEXT::GetEffectiveTextShape ( bool  aTriangulate = true,
const BOX2I aBBox = BOX2I(),
const EDA_ANGLE aAngle = ANGLE_0 
) const

◆ GetFont()

KIFONT::FONT * EDA_TEXT::GetFont ( ) const
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().

◆ GetFontIndex()

int EDA_TEXT::GetFontIndex ( ) const

◆ getFontMetrics()

const KIFONT::METRICS & EDA_TEXT::getFontMetrics ( ) const
protectedvirtual

◆ GetFontName()

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().

◆ GetHorizJustify()

GR_TEXT_H_ALIGN_T EDA_TEXT::GetHorizJustify ( ) const
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().

◆ GetHyperlink()

wxString EDA_TEXT::GetHyperlink ( ) const
inline

◆ GetInterline()

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().

◆ 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.

Parameters
aPositionsis the list to populate by the VECTOR2I positions.
aLineCountis 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().

◆ GetLineSpacing()

double EDA_TEXT::GetLineSpacing ( ) const
inline

Definition at line 216 of file eda_text.h.

References m_attributes, and TEXT_ATTRIBUTES::m_LineSpacing.

Referenced by Format().

◆ GetRenderCache()

◆ GetShownText()

virtual wxString EDA_TEXT::GetShownText ( bool  aAllowExtraText,
int  aDepth = 0 
) const
inlinevirtual

Return the string actually shown after processing of the base text.

Parameters
aAllowExtraTextis 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).
aDepthis 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().

◆ GetText()

virtual const wxString & EDA_TEXT::GetText ( ) const
inlinevirtual

Return the string associated with the text object.

Returns
a const wxString reference containing the string of the item.

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().

◆ GetTextAngle()

const EDA_ANGLE & EDA_TEXT::GetTextAngle ( ) const
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().

◆ GetTextAngleDegrees()

double EDA_TEXT::GetTextAngleDegrees ( ) const
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().

◆ GetTextBox()

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....)

Parameters
aLineThe line of text to consider. Pass -1 for all lines.
aInvertYInvert the Y axis when calculating bounding box.
Returns
the rect containing the line of text (i.e. the position and the size of one line) this rectangle is calculated for 0 orient text. If orientation is not 0 the rect must be rotated to match the physical area

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().

◆ GetTextColor()

◆ GetTextHeight()

◆ GetTextPos()

const VECTOR2I & EDA_TEXT::GetTextPos ( ) const
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().

◆ GetTextSize()

◆ GetTextStyleName()

wxString EDA_TEXT::GetTextStyleName ( ) const
Returns
a wxString with the style name( Normal, Italic, Bold, Bold+Italic).

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().

◆ GetTextThickness()

◆ GetTextWidth()

int EDA_TEXT::GetTextWidth ( ) const
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().

◆ GetVertJustify()

◆ GotoPageHref()

wxString EDA_TEXT::GotoPageHref ( const wxString &  aDestination)
static

Generate a href to a page in the current schematic.

Parameters
aDestinationDestination sheet's page number.
Returns
A hyperlink href string that goes to the specified page.

Definition at line 1173 of file eda_text.cpp.

Referenced by SCH_SHEET::Plot().

◆ HasHyperlink()

virtual bool EDA_TEXT::HasHyperlink ( ) const
inlinevirtual

◆ HasTextVars()

◆ IsBold()

bool EDA_TEXT::IsBold ( ) const
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().

◆ IsDefaultFormatting()

◆ IsGotoPageHref()

bool EDA_TEXT::IsGotoPageHref ( const wxString &  aHref,
wxString *  aDestination = nullptr 
)
static

Check if aHref is a valid internal hyperlink.

Parameters
aHrefString to validate
aDestination[optional] pointer to populate with the destination page
Returns
true if aHref is a valid internal hyperlink. Does not check if the destination page actually exists.

Definition at line 1167 of file eda_text.cpp.

Referenced by PDF_PLOTTER::EndPlot(), SCH_NAVIGATE_TOOL::HypertextCommand(), and ValidateHyperlink().

◆ IsItalic()

bool EDA_TEXT::IsItalic ( ) const
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().

◆ IsKeepUpright()

◆ IsMirrored()

◆ IsMultilineAllowed()

bool EDA_TEXT::IsMultilineAllowed ( ) const
inline

◆ IsVisible()

◆ Levenshtein()

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().

◆ MapHorizJustify()

◆ MapVertJustify()

◆ Offset()

◆ operator<()

bool EDA_TEXT::operator< ( const EDA_TEXT aRhs) const
inline

Definition at line 355 of file eda_text.h.

References Compare().

◆ operator=()

◆ operator==()

◆ operator>()

bool EDA_TEXT::operator> ( const EDA_TEXT aRhs) const
inline

Definition at line 356 of file eda_text.h.

References Compare().

◆ Print()

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.

Parameters
aDCthe current Device Context.
aOffsetdraw offset (usually (0,0)).
aColortext color.
aDisplay_modeFILLED 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().

◆ printOneLineOfText()

void EDA_TEXT::printOneLineOfText ( const RENDER_SETTINGS aSettings,
const VECTOR2I aOffset,
const COLOR4D aColor,
OUTLINE_MODE  aFillMode,
const wxString &  aText,
const VECTOR2I aPos 
)
protected

Print each line of this EDA_TEXT.

Parameters
aOffsetdraw offset (usually (0,0)).
aColortext color.
aFillModeFILLED or SKETCH
aTextthe single line of text to draw.
aPosthe 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().

◆ RemoveHyperlink()

void EDA_TEXT::RemoveHyperlink ( )
inline

Definition at line 361 of file eda_text.h.

References m_hyperlink.

◆ Replace()

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.

Parameters
aSearchDataA reference to a EDA_SEARCH_DATA object containing the search and replace criteria.
Returns
True if the text item was modified, otherwise false.

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().

◆ SetAttributes() [1/2]

◆ SetAttributes() [2/2]

void EDA_TEXT::SetAttributes ( const TEXT_ATTRIBUTES aTextAttrs)
inline

Definition at line 191 of file eda_text.h.

References m_attributes.

◆ SetBold()

◆ SetBoldFlag()

◆ SetFont()

◆ SetFontIndex()

void EDA_TEXT::SetFontIndex ( int  aIdx)

◆ SetHorizJustify()

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().

◆ SetHyperlink()

void EDA_TEXT::SetHyperlink ( wxString  aLink)
inline

◆ SetItalic()

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().

◆ SetKeepUpright()

◆ SetLineSpacing()

void EDA_TEXT::SetLineSpacing ( double  aLineSpacing)

◆ SetMirrored()

◆ SetMultilineAllowed()

void EDA_TEXT::SetMultilineAllowed ( bool  aAllow)
Parameters
aAllowtrue 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().

◆ SetText()

void EDA_TEXT::SetText ( const wxString &  aText)
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().

◆ SetTextAngle()

void EDA_TEXT::SetTextAngle ( const EDA_ANGLE aAngle)
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().

◆ SetTextAngleDegrees()

void EDA_TEXT::SetTextAngleDegrees ( double  aOrientation)
inline

◆ SetTextColor()

◆ SetTextHeight()

◆ SetTextPos()

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().

◆ SetTextSize()

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().

◆ SetTextThickness()

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().

◆ SetTextWidth()

◆ SetTextX()

◆ SetTextY()

◆ SetupRenderCache()

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.

◆ SetVertJustify()

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().

◆ SetVisible()

void EDA_TEXT::SetVisible ( bool  aVisible)
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().

◆ Similarity()

◆ SwapAttributes()

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().

◆ SwapText()

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().

◆ TextHitTest() [1/2]

bool EDA_TEXT::TextHitTest ( const BOX2I aRect,
bool  aContains,
int  aAccuracy = 0 
) const
virtual

Test if object bounding box is contained within or intersects aRect.

Parameters
aRectRect to test against.
aContainsTest for containment instead of intersection if true.
aAccuracyAmount to inflate the bounding box.
Returns
true if a hit, else false.

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().

◆ TextHitTest() [2/2]

bool EDA_TEXT::TextHitTest ( const VECTOR2I aPoint,
int  aAccuracy = 0 
) const
virtual

Test if aPoint is within the bounds of this object.

Parameters
aPointA VECTOR2I to test.
aAccuracyAmount to inflate the bounding box.
Returns
true if a hit, else false.

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().

◆ ValidateHyperlink()

bool EDA_TEXT::ValidateHyperlink ( const wxString &  aURL)
static

Check if aURL is a valid hyperlink.

Parameters
aURLString to validate
Returns
true if aURL is a valid hyperlink

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().

Member Data Documentation

◆ m_attributes

◆ m_bounding_box_cache

BOX2I EDA_TEXT::m_bounding_box_cache
mutableprivate

Definition at line 432 of file eda_text.h.

Referenced by EDA_TEXT(), GetTextBox(), and operator=().

◆ m_bounding_box_cache_inverted

bool EDA_TEXT::m_bounding_box_cache_inverted
mutableprivate

Definition at line 431 of file eda_text.h.

Referenced by EDA_TEXT(), and GetTextBox().

◆ m_bounding_box_cache_line

int EDA_TEXT::m_bounding_box_cache_line
mutableprivate

Definition at line 430 of file eda_text.h.

Referenced by EDA_TEXT(), and GetTextBox().

◆ m_bounding_box_cache_pos

VECTOR2I EDA_TEXT::m_bounding_box_cache_pos
mutableprivate

Definition at line 429 of file eda_text.h.

Referenced by GetTextBox().

◆ m_bounding_box_cache_valid

◆ m_hyperlink

wxString EDA_TEXT::m_hyperlink
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().

◆ m_IuScale

std::reference_wrapper<const EDA_IU_SCALE> EDA_TEXT::m_IuScale
private

Definition at line 420 of file eda_text.h.

Referenced by EDA_TEXT(), Format(), SetTextHeight(), SetTextSize(), and SetTextWidth().

◆ m_pos

◆ m_render_cache

std::vector<std::unique_ptr<KIFONT::GLYPH> > EDA_TEXT::m_render_cache
mutableprivate

◆ m_render_cache_angle

EDA_ANGLE EDA_TEXT::m_render_cache_angle
mutableprivate

Definition at line 424 of file eda_text.h.

Referenced by EDA_TEXT(), GetRenderCache(), operator=(), and SetupRenderCache().

◆ m_render_cache_font

const KIFONT::FONT* EDA_TEXT::m_render_cache_font
mutableprivate

Definition at line 423 of file eda_text.h.

Referenced by EDA_TEXT(), GetRenderCache(), and operator=().

◆ m_render_cache_offset

VECTOR2I EDA_TEXT::m_render_cache_offset
mutableprivate

Definition at line 425 of file eda_text.h.

Referenced by EDA_TEXT(), GetRenderCache(), and operator=().

◆ m_render_cache_text

wxString EDA_TEXT::m_render_cache_text
mutableprivate

Definition at line 422 of file eda_text.h.

Referenced by EDA_TEXT(), GetRenderCache(), operator=(), and SetupRenderCache().

◆ m_shown_text

wxString EDA_TEXT::m_shown_text
private

Definition at line 417 of file eda_text.h.

Referenced by cacheShownText(), EDA_TEXT(), GetShownText(), and operator=().

◆ m_shown_text_has_text_var_refs

bool EDA_TEXT::m_shown_text_has_text_var_refs
private

Definition at line 418 of file eda_text.h.

Referenced by cacheShownText(), EDA_TEXT(), HasTextVars(), and operator=().

◆ m_text

wxString EDA_TEXT::m_text
private

The documentation for this class was generated from the following files: