![]() |
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 wxString &text=wxEmptyString) | |
EDA_TEXT (const EDA_TEXT &aText) | |
virtual | ~EDA_TEXT () |
virtual const wxString & | GetText () const |
Return the string associated with the text object. More... | |
virtual wxString | GetShownText (int aDepth=0) const |
Return the string actually shown after processing of the base text. More... | |
wxString | ShortenedShownText () const |
Returns a shortened version (max 15 characters) of the shown 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 aDefaultWidth=0) const |
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultWidth. More... | |
virtual void | SetTextAngle (double aAngle) |
double | GetTextAngle () const |
double | GetTextAngleDegrees () const |
double | GetTextAngleRadians () const |
void | SetItalic (bool isItalic) |
bool | IsItalic () const |
void | SetBold (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 |
EDA_TEXT_HJUSTIFY_T | GetHorizJustify () const |
EDA_TEXT_VJUSTIFY_T | GetVertJustify () const |
void | SetHorizJustify (EDA_TEXT_HJUSTIFY_T aType) |
void | SetVertJustify (EDA_TEXT_VJUSTIFY_T aType) |
void | SetEffects (const EDA_TEXT &aSrc) |
Set the text effects from another instance. More... | |
void | SwapEffects (EDA_TEXT &aTradingPartner) |
Swap the text effects of the two involved instances. More... | |
void | SwapText (EDA_TEXT &aTradingPartner) |
void | CopyText (const EDA_TEXT &aSrc) |
bool | Replace (const wxFindReplaceData &aSearchData) |
Helper function used in search and replace dialog. More... | |
bool | IsDefaultFormatting () const |
void | SetTextSize (const wxSize &aNewSize) |
const wxSize & | GetTextSize () const |
void | SetTextWidth (int aWidth) |
int | GetTextWidth () const |
void | SetTextHeight (int aHeight) |
int | GetTextHeight () const |
void | SetTextPos (const wxPoint &aPoint) |
const wxPoint & | GetTextPos () const |
void | SetTextX (int aX) |
void | SetTextY (int aY) |
void | Offset (const wxPoint &aOffset) |
void | Empty () |
void | Print (const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, const COLOR4D &aColor, OUTLINE_MODE aDisplay_mode=FILLED) |
Print this text object to the device context aDC. More... | |
std::vector< wxPoint > | TransformToSegmentList () const |
Convert the text shape to a list of segment. More... | |
void | TransformBoundingBoxWithClearanceToPolygon (SHAPE_POLY_SET *aCornerBuffer, int aClearanceValue) const |
Convert the text bounding box to a rectangular polygon depending on the text orientation, the bounding box is not always horizontal or vertical. More... | |
std::shared_ptr< SHAPE_COMPOUND > | GetEffectiveTextShape () const |
virtual bool | TextHitTest (const wxPoint &aPoint, int aAccuracy=0) const |
Test if aPoint is within the bounds of this object. More... | |
virtual bool | TextHitTest (const EDA_RECT &aRect, bool aContains, int aAccuracy=0) const |
Test if object bounding box is contained within or intersects aRect. More... | |
int | LenSize (const wxString &aLine, int aThickness) const |
EDA_RECT | GetTextBox (int aLine=-1, bool aInvertY=false) const |
Useful in multiline texts to calculate the full text or a line area (for zones filling, locate functions....) More... | |
int | GetInterline () const |
Return the distance between two lines of text. More... | |
wxString | GetTextStyleName () const |
void | GetLinePositions (std::vector< wxPoint > &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... | |
virtual void | Format (OUTPUTFORMATTER *aFormatter, int aNestLevel, int aControlBits) const |
Output the object to aFormatter in s-expression form. More... | |
virtual double | GetDrawRotation () const |
virtual wxPoint | GetDrawPos () const |
virtual EDA_TEXT_HJUSTIFY_T | GetDrawHorizJustify () const |
virtual EDA_TEXT_VJUSTIFY_T | GetDrawVertJustify () const |
int | Compare (const EDA_TEXT *aOther) const |
Static Public Member Functions | |
static EDA_TEXT_HJUSTIFY_T | MapHorizJustify (int aHorizJustify) |
static EDA_TEXT_VJUSTIFY_T | MapVertJustify (int aVertJustify) |
Private Types | |
enum | TE_FLAGS { TE_MIRROR, TE_ITALIC, TE_BOLD, TE_MULTILINE, TE_VISIBLE } |
Private Member Functions | |
void | cacheShownText () |
void | printOneLineOfText (const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, const COLOR4D &aColor, OUTLINE_MODE aFillMode, const wxString &aText, const wxPoint &aPos) |
Print each line of this EDA_TEXT. More... | |
Private Attributes | |
wxString | m_text |
wxString | m_shown_text |
bool | m_shown_text_has_text_var_refs |
TEXT_EFFECTS | m_e |
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 140 of file eda_text.h.
|
private |
Enumerator | |
---|---|
TE_MIRROR | |
TE_ITALIC | |
TE_BOLD | |
TE_MULTILINE | |
TE_VISIBLE |
Definition at line 417 of file eda_text.h.
EDA_TEXT::EDA_TEXT | ( | const wxString & | text = wxEmptyString | ) |
Definition at line 101 of file eda_text.cpp.
References cacheShownText(), DEFAULT_SIZE_TEXT, and SetTextSize().
EDA_TEXT::EDA_TEXT | ( | const EDA_TEXT & | aText | ) |
|
virtual |
Definition at line 119 of file eda_text.cpp.
|
private |
Definition at line 189 of file eda_text.cpp.
References m_shown_text, m_shown_text_has_text_var_refs, m_text, and UnescapeString().
Referenced by EDA_TEXT(), Replace(), and SetText().
int EDA_TEXT::Compare | ( | const EDA_TEXT * | aOther | ) | const |
Definition at line 659 of file eda_text.cpp.
References TEXT_EFFECTS::angle, TEXT_EFFECTS::bits, TEXT_EFFECTS::hjustify, m_e, m_text, TEXT_EFFECTS::penwidth, TEXT_EFFECTS::pos, TEXT_EFFECTS::size, TEST, TEST_E, TEST_PT, and TEXT_EFFECTS::vjustify.
void EDA_TEXT::CopyText | ( | const EDA_TEXT & | aSrc | ) |
Definition at line 131 of file eda_text.cpp.
References m_shown_text, m_shown_text_has_text_var_refs, and m_text.
Referenced by LIB_FIELD::Copy(), and CLIPBOARD_IO::SaveSelection().
|
inline |
Definition at line 275 of file eda_text.h.
References m_text.
Referenced by SCH_LEGACY_PLUGIN_CACHE::LoadPart().
|
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 539 of file eda_text.cpp.
References CTL_OMIT_HIDE, FormatInternalUnits(), GetHorizJustify(), GetTextHeight(), GetTextThickness(), GetTextWidth(), GetVertJustify(), GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, IsBold(), IsItalic(), IsMirrored(), IsVisible(), and OUTPUTFORMATTER::Print().
Referenced by SCH_SEXPR_PLUGIN::saveField(), SCH_SEXPR_PLUGIN_CACHE::saveField(), SCH_SEXPR_PLUGIN::saveText(), and SCH_SEXPR_PLUGIN_CACHE::saveText().
|
inlinevirtual |
Reimplemented in SCH_FIELD.
Definition at line 390 of file eda_text.h.
References GetHorizJustify().
Referenced by TransformToSegmentList().
|
inlinevirtual |
Reimplemented in SCH_FIELD.
Definition at line 389 of file eda_text.h.
References GetTextPos().
Referenced by TransformToSegmentList().
|
inlinevirtual |
Reimplemented in FP_TEXT, and SCH_FIELD.
Definition at line 388 of file eda_text.h.
References GetTextAngle().
Referenced by TransformToSegmentList().
|
inlinevirtual |
Reimplemented in SCH_FIELD.
Definition at line 391 of file eda_text.h.
References GetVertJustify().
Referenced by TransformToSegmentList().
int EDA_TEXT::GetEffectiveTextPenWidth | ( | int | aDefaultWidth = 0 | ) | const |
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultWidth.
Definition at line 159 of file eda_text.cpp.
References ALLOW_BOLD_THICKNESS, Clamp_Text_PenSize(), GetPenSizeForBold(), GetPenSizeForNormal(), GetTextSize(), GetTextThickness(), GetTextWidth(), and IsBold().
Referenced by BOARD_ADAPTER::addShapeWithClearance(), KIGFX::DS_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), SCH_HIERLABEL::GetBoundingBox(), SCH_GLOBALLABEL::GetBoundingBoxBase(), GetEffectiveTextShape(), LIB_TEXT::GetPenWidth(), LIB_FIELD::GetPenWidth(), SCH_FIELD::GetPenWidth(), SCH_TEXT::GetPenWidth(), GetTextBox(), KIGFX::SCH_PAINTER::getTextThickness(), LIB_TEXT::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), BRDITEMS_PLOTTER::PlotPcbText(), LIB_TEXT::print(), SCH_FIELD::Print(), printOneLineOfText(), PNS_KICAD_IFACE_BASE::syncTextItem(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), PCB_DIM_LEADER::updateGeometry(), PCB_DIM_ALIGNED::updateText(), and PCB_DIM_ORTHOGONAL::updateText().
std::shared_ptr< SHAPE_COMPOUND > EDA_TEXT::GetEffectiveTextShape | ( | ) | const |
Definition at line 646 of file eda_text.cpp.
References GetEffectiveTextPenWidth(), and TransformToSegmentList().
Referenced by PCB_TEXT::GetEffectiveShape(), and FP_TEXT::GetEffectiveShape().
|
inline |
Definition at line 219 of file eda_text.h.
References TEXT_EFFECTS::hjustify, and m_e.
Referenced by BOARD_ADAPTER::addShapeWithClearance(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), EDA_TEXT_DESC::EDA_TEXT_DESC(), AUTOPLACER::fieldHPlacement(), Format(), GetDrawHorizJustify(), SCH_FIELD::GetEffectiveHorizJustify(), LIB_TEXT::GetMsgPanelInfo(), LIB_FIELD::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), GetTextBox(), IsDefaultFormatting(), SCH_FIELD::IsHorizJustifyFlipped(), FP_TEXT::KeepUpright(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), LEGACY_PLUGIN::loadPCB_TEXT(), SCH_EDIT_TOOL::Mirror(), LIB_TEXT::MirrorHorizontal(), SCH_GLOBALLABEL::MirrorHorizontally(), SCH_GLOBALLABEL::MirrorSpinStyle(), LIB_TEXT::MirrorVertical(), LIB_TEXT::NormalizeJustification(), SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), BRDITEMS_PLOTTER::PlotPcbText(), positioningChanged(), LIB_FIELD::print(), printOneLineOfText(), LIB_TEXT::Rotate(), SCH_GLOBALLABEL::Rotate90(), SCH_LEGACY_PLUGIN::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveText(), KIGFX::GAL::SetTextAttributes(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), and FP_TEXT::TransformTextShapeWithClearanceToPolygon().
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 233 of file eda_text.cpp.
References KIGFX::STROKE_FONT::GetInterline(), GetTextHeight(), and KiROUND().
Referenced by CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), and GetLinePositions().
void EDA_TEXT::GetLinePositions | ( | std::vector< wxPoint > & | 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 wxPoint positions. |
aLineCount | is the number of lines (not recalculated here for efficiency reasons. |
Definition at line 443 of file eda_text.cpp.
References GetInterline(), GetTextAngle(), GetTextPos(), GetVertJustify(), GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, and RotatePoint().
Referenced by SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotPcbText(), Print(), and TransformToSegmentList().
|
inlinevirtual |
Return the string actually shown after processing of the base text.
aDepth | is used to prevent infinite recursions and loops when expanding text variables. |
Reimplemented in FP_TEXT, SCH_TEXT, SCH_FIELD, and PCB_TEXT.
Definition at line 162 of file eda_text.h.
References m_shown_text.
Referenced by KIGFX::DS_PAINTER::draw(), DS_DRAW_ITEM_TEXT::GetSelectMenuText(), PCB_TEXT::GetShownText(), SCH_FIELD::GetShownText(), SCH_TEXT::GetShownText(), FP_TEXT::GetShownText(), GetTextBox(), LIB_FIELD::Plot(), LIB_SYMBOL::PlotLibFields(), LIB_TEXT::print(), Print(), ShortenedShownText(), and TransformToSegmentList().
|
inlinevirtual |
Return the string associated with the text object.
Definition at line 154 of file eda_text.h.
References m_text.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), SCH_EAGLE_PLUGIN::addImplicitConnections(), NETLIST_EXPORTER_XML::addSymbolFields(), SIM_PLOT_FRAME::AddTuner(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), CONNECTION_GRAPH::buildConnectionGraph(), LIB_TEXT::Clone(), LIB_TEXT::compare(), LIB_FIELD::compare(), SCH_DRAWING_TOOLS::createNewText(), SCH_DRAWING_TOOLS::createSheetPin(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), DIALOG_LIB_FIELD_PROPERTIES::DIALOG_LIB_FIELD_PROPERTIES(), DIALOG_SCH_FIELD_PROPERTIES::DIALOG_SCH_FIELD_PROPERTIES(), KIGFX::SCH_VIEW::DisplaySymbol(), SCH_FIELD::DoHypertextMenu(), KIGFX::SCH_PAINTER::draw(), EDA_TEXT_DESC::EDA_TEXT_DESC(), CONNECTION_GRAPH::ercCheckHierSheets(), CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), LIB_SYMBOL::Flatten(), PCB_PLUGIN::format(), FormatProbeItem(), SCH_SYMBOL::GetFootprint(), LIB_FIELD::GetFullText(), FOOTPRINT_INFO_GENERATOR::GetHtmlFieldRow(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet(), FP_TEXT::GetLength(), getMatchingTextItem(), PCB_TEXT::GetMsgPanelInfo(), LIB_TEXT::GetMsgPanelInfo(), LIB_FIELD::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_SYMBOL::GetRef(), FOOTPRINT::GetReference(), LIB_SYMBOL::GetSearchText(), PCB_DIMENSION_BASE::GetText(), FOOTPRINT::GetValue(), SCH_SYMBOL::GetValue(), LIB_FIELD::HitTest(), SCH_DRAWING_TOOLS::importHierLabel(), SCH_TEXT::IncrementLabel(), GENERAL_COLLECTOR::Inspect(), SCH_FIELD::IsVoid(), CADSTAR_SCH_ARCHIVE_LOADER::Load(), LEGACY_PLUGIN::loadPCB_TEXT(), SCH_EAGLE_PLUGIN::loadSchematic(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances(), SCH_EAGLE_PLUGIN::loadSegments(), SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic(), SCH_SHEET_PIN::Matches(), SCH_TEXT::Matches(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), SCH_TEXT::operator<(), SCH_FIELD::operator<(), LIB_FIELD::operator=(), SCH_SEXPR_PARSER::parseEDA_TEXT(), PCB_PARSER::parseEDA_TEXT(), SCH_SEXPR_PARSER::parseSchematicSymbol(), SCH_EDITOR_CONTROL::Paste(), DRAWING_TOOL::PlaceText(), LIB_TEXT::Plot(), LIB_FIELD::Plot(), BRDITEMS_PLOTTER::PlotFootprintTextItems(), DIALOG_RESCUE_EACH::PopulateInstanceList(), LIB_FIELD::print(), DIALOG_CHANGE_SYMBOLS::processSymbol(), processTextItem(), SCH_EDIT_FRAME::RecomputeIntersheetRefs(), SCH_GLOBALLABEL::ResolveTextVar(), SCH_SEXPR_PLUGIN::saveField(), SCH_LEGACY_PLUGIN::saveField(), SCH_SEXPR_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN::saveSheet(), SCH_LEGACY_PLUGIN::saveSymbol(), SCH_LEGACY_PLUGIN_CACHE::SaveSymbol(), SCH_SEXPR_PLUGIN::saveText(), SCH_LEGACY_PLUGIN::saveText(), SCH_SEXPR_PLUGIN_CACHE::saveText(), SCH_LEGACY_PLUGIN_CACHE::saveText(), SYMBOL_VIEWER_FRAME::setupUIConditions(), SYMBOL_EDIT_FRAME::setupUIConditions(), EE_INSPECTION_TOOL::ShowDatasheet(), SCH_SHEET::SymbolCount(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PROPERTIES::TransferDataToWindow(), TransformBoundingBoxWithClearanceToPolygon(), TUNER_SLIDER::TUNER_SLIDER(), SCH_EDITOR_CONTROL::updatePastedSymbol(), SYMBOL_EDIT_FRAME::UpdateSymbolMsgPanelInfo(), and FP_TEXT::ViewGetLOD().
|
inline |
Definition at line 195 of file eda_text.h.
References TEXT_EFFECTS::angle, and m_e.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), BOARD_ADAPTER::addShapeWithClearance(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), KIGFX::DS_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), PCB_TEXT::Flip(), FP_TEXT::Flip(), PCB_PLUGIN::format(), LIB_TEXT::GetBoundingBox(), SCH_FIELD::GetBoundingBox(), LIB_FIELD::GetBoundingBox(), PCB_TEXT::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), SCH_LABEL::GetBoundingBox(), SCH_FIELD::GetDrawRotation(), FP_TEXT::GetDrawRotation(), GetDrawRotation(), GetLinePositions(), GetTextAngleDegrees(), GetTextAngleRadians(), LIB_TEXT::HitTest(), LIB_FIELD::HitTest(), FP_TEXT::KeepUpright(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary(), PCB_DIMENSION_BASE::Mirror(), LIB_TEXT::MirrorHorizontal(), SCH_GLOBALLABEL::MirrorSpinStyle(), LIB_TEXT::MirrorVertical(), LIB_TEXT::NormalizeJustification(), EAGLE_PLUGIN::orientFPText(), ALTIUM_PCB::ParseTexts6Data(), LIB_TEXT::Plot(), LIB_FIELD::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotPcbText(), positioningChanged(), LIB_TEXT::print(), SCH_FIELD::Print(), LIB_FIELD::print(), printOneLineOfText(), SCH_EDIT_TOOL::Rotate(), PCB_TEXT::Rotate(), LIB_TEXT::Rotate(), FP_TEXT::Rotate(), LIB_FIELD::Rotate(), PCB_DIMENSION_BASE::Rotate(), SCH_GLOBALLABEL::Rotate90(), SCH_LEGACY_PLUGIN::saveField(), SCH_SEXPR_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_SEXPR_PLUGIN::saveText(), SCH_SEXPR_PLUGIN_CACHE::saveText(), SCH_LEGACY_PLUGIN_CACHE::saveText(), TextHitTest(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), TransformBoundingBoxWithClearanceToPolygon(), FP_TEXT::TransformShapeWithClearanceToPolygon(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), and DIALOG_SCH_FIELD_PROPERTIES::UpdateField().
|
inline |
Definition at line 197 of file eda_text.h.
References GetTextAngle().
Referenced by CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), PCB_TEXT::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), and SCH_SEXPR_PLUGIN::saveField().
|
inline |
Definition at line 198 of file eda_text.h.
References GetTextAngle().
Referenced by KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), and PCB_DIM_LEADER::updateGeometry().
EDA_RECT EDA_TEXT::GetTextBox | ( | int | aLine = -1 , |
bool | aInvertY = false |
||
) | const |
Useful in multiline texts to calculate the full text or a line area (for zones filling, locate functions....)
aLine | The line of text to consider. Pass -1 for all lines. |
aInvertY | Invert the Y axis when calculating bounding box. |
Definition at line 239 of file eda_text.cpp.
References basic_gal, GetEffectiveTextPenWidth(), GetHorizJustify(), KIGFX::STROKE_FONT::GetInterline(), GetShownText(), KIGFX::GAL::GetStrokeFont(), GetTextHeight(), GetTextPos(), GetTextSize(), GetVertJustify(), EDA_RECT::GetWidth(), EDA_RECT::GetX(), EDA_RECT::GetY(), GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, EDA_RECT::Inflate(), IsMirrored(), IsMultilineAllowed(), KiROUND(), EDA_RECT::Move(), EDA_RECT::Normalize(), EDA_RECT::SetOrigin(), EDA_RECT::SetSize(), EDA_RECT::SetX(), EDA_RECT::SetY(), text, wxStringSplit(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by LIB_TEXT::GetBoundingBox(), SCH_FIELD::GetBoundingBox(), LIB_FIELD::GetBoundingBox(), PCB_TEXT::GetBoundingBox(), FP_TEXT::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), PCB_DIMENSION_BASE::GetBoundingBox(), SCH_LABEL::GetBoundingBox(), DS_DRAW_ITEM_TEXT::GetBoundingBox(), LIB_TEXT::HitTest(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary(), LIB_TEXT::NormalizeJustification(), FP_TEXT::TextHitTest(), TextHitTest(), TransformBoundingBoxWithClearanceToPolygon(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_LEADER::updateGeometry(), and FP_TEXT::ViewBBox().
|
inline |
Definition at line 265 of file eda_text.h.
References m_e, and TEXT_EFFECTS::size.
Referenced by LIB_TEXT::compare(), LIB_FIELD::compare(), SCH_GLOBALLABEL::CreateGraphicShape(), SCH_HIERLABEL::CreateGraphicShape(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), SCH_HIERLABEL::GetBoundingBox(), SCH_GLOBALLABEL::GetBoundingBoxBase(), GetInterline(), PCB_TEXT::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), SCH_GLOBALLABEL::GetSchematicTextOffset(), GetTextBox(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), SCH_SEXPR_PLUGIN::saveField(), PCB_DIM_ALIGNED::updateText(), and PCB_DIM_ORTHOGONAL::updateText().
|
inline |
Definition at line 268 of file eda_text.h.
References m_e, and TEXT_EFFECTS::pos.
Referenced by BOARD_ADAPTER::addShapeWithClearance(), LIB_TEXT::compare(), LIB_FIELD::compare(), SCH_SHEET_PIN::ConstrainOnEdge(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), SCH_LABEL::doIsConnected(), SCH_GLOBALLABEL::doIsConnected(), SCH_HIERLABEL::doIsConnected(), KIGFX::DS_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), PCB_TEXT::Flip(), FP_TEXT::Flip(), PCB_PLUGIN::format(), LIB_TEXT::GetBoundingBox(), SCH_FIELD::GetBoundingBox(), LIB_FIELD::GetBoundingBox(), PCB_TEXT::GetBoundingBox(), FP_TEXT::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), SCH_LABEL::GetBoundingBox(), SCH_HIERLABEL::GetBoundingBox(), SCH_GLOBALLABEL::GetBoundingBoxBase(), SCH_MOVE_TOOL::getConnectedDragItems(), SCH_TEXT::GetConnectionPoints(), GetDrawPos(), SCH_SHEET_PIN::GetEndPoints(), SCH_TEXT::GetEndPoints(), SCH_FIELD::GetLibPosition(), GetLinePositions(), PCB_TEXT::GetPosition(), FP_TEXT::GetPosition(), LIB_TEXT::GetPosition(), LIB_FIELD::GetPosition(), SCH_FIELD::GetPosition(), SCH_TEXT::GetPosition(), DS_DRAW_ITEM_TEXT::GetPosition(), GetTextBox(), LIB_TEXT::HitTest(), LIB_FIELD::HitTest(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary(), FP_TEXT::Mirror(), PCB_DIMENSION_BASE::Mirror(), LIB_TEXT::MirrorHorizontal(), LIB_FIELD::MirrorHorizontal(), SCH_SHEET_PIN::MirrorHorizontally(), SCH_TEXT::MirrorHorizontally(), SCH_GLOBALLABEL::MirrorHorizontally(), SCH_GLOBALLABEL::MirrorSpinStyle(), LIB_TEXT::MirrorVertical(), LIB_FIELD::MirrorVertical(), SCH_SHEET_PIN::MirrorVertically(), SCH_TEXT::MirrorVertically(), SCH_GLOBALLABEL::MirrorVertically(), LIB_TEXT::NormalizeJustification(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), DRAWING_TOOL::PlaceText(), SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), BRDITEMS_PLOTTER::PlotPcbText(), LIB_FIELD::print(), Print(), SCH_GLOBALLABEL::Print(), SCH_HIERLABEL::Print(), DIALOG_CHANGE_SYMBOLS::processSymbol(), PCB_TEXT::Rotate(), LIB_TEXT::Rotate(), FP_TEXT::Rotate(), LIB_FIELD::Rotate(), SCH_SHEET_PIN::Rotate(), SCH_TEXT::Rotate(), PCB_DIMENSION_BASE::Rotate(), SCH_GLOBALLABEL::Rotate(), SCH_GLOBALLABEL::Rotate90(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveText(), FP_TEXT::SetDrawCoord(), FP_TEXT::SetLocalCoord(), FP_TEXT::TextHitTest(), TextHitTest(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), TransformBoundingBoxWithClearanceToPolygon(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), SCH_TEXT::UpdateDanglingState(), and FP_TEXT::ViewBBox().
|
inline |
Definition at line 259 of file eda_text.h.
References m_e, and TEXT_EFFECTS::size.
Referenced by BOARD_ADAPTER::addShapeWithClearance(), MICROWAVE_TOOL::createMicrowaveInductor(), KIGFX::SCH_PAINTER::draw(), GetEffectiveTextPenWidth(), SCH_TEXT::GetLabelBoxExpansion(), CADSTAR_SCH_ARCHIVE_LOADER::getScaledLibPart(), GetTextBox(), SCH_TEXT::GetTextOffset(), LenSize(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), EAGLE_PLUGIN::orientFPText(), LIB_TEXT::Plot(), LIB_FIELD::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), BRDITEMS_PLOTTER::PlotPcbText(), LIB_TEXT::print(), SCH_FIELD::Print(), LIB_FIELD::print(), printOneLineOfText(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), SCH_LEGACY_PLUGIN::saveSheet(), KIGFX::GAL::SetTextAttributes(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), TransformToSegmentList(), and SCH_GLOBALLABEL::UpdateIntersheetRefProps().
wxString EDA_TEXT::GetTextStyleName | ( | ) | const |
Definition at line 504 of file eda_text.cpp.
References _, IsBold(), and IsItalic().
Referenced by LIB_TEXT::GetMsgPanelInfo(), LIB_FIELD::GetMsgPanelInfo(), and SCH_FIELD::GetMsgPanelInfo().
|
inline |
Definition at line 181 of file eda_text.h.
References m_e, and TEXT_EFFECTS::penwidth.
Referenced by EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), GetEffectiveTextPenWidth(), PCB_TEXT::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), IsDefaultFormatting(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), SCH_LEGACY_PLUGIN::saveText(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), and SCH_GLOBALLABEL::UpdateIntersheetRefProps().
|
inline |
Definition at line 262 of file eda_text.h.
References m_e, and TEXT_EFFECTS::size.
Referenced by LIB_TEXT::compare(), LIB_FIELD::compare(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), GetEffectiveTextPenWidth(), PCB_TEXT::GetMsgPanelInfo(), LIB_TEXT::GetMsgPanelInfo(), LIB_FIELD::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_HIERLABEL::GetSchematicTextOffset(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), SCH_EAGLE_PLUGIN::loadTextAttributes(), SCH_LEGACY_PLUGIN::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN::saveText(), SCH_LEGACY_PLUGIN_CACHE::saveText(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataToWindow(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_LEADER::updateGeometry(), and DIALOG_FIELD_PROPERTIES::updateText().
|
inline |
Definition at line 220 of file eda_text.h.
References m_e, and TEXT_EFFECTS::vjustify.
Referenced by BOARD_ADAPTER::addShapeWithClearance(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), GetDrawVertJustify(), SCH_FIELD::GetEffectiveVertJustify(), GetLinePositions(), LIB_TEXT::GetMsgPanelInfo(), LIB_FIELD::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), GetTextBox(), IsDefaultFormatting(), SCH_FIELD::IsVertJustifyFlipped(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), SCH_EDIT_TOOL::Mirror(), LIB_TEXT::MirrorHorizontal(), LIB_TEXT::MirrorVertical(), LIB_TEXT::NormalizeJustification(), SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), BRDITEMS_PLOTTER::PlotPcbText(), positioningChanged(), LIB_FIELD::print(), printOneLineOfText(), LIB_TEXT::Rotate(), SCH_LEGACY_PLUGIN::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveText(), KIGFX::GAL::SetTextAttributes(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), and FP_TEXT::TransformTextShapeWithClearanceToPolygon().
|
inline |
Indicates the ShownText has text var references which need to be processed.
Definition at line 172 of file eda_text.h.
References m_shown_text_has_text_var_refs.
Referenced by PCB_TEXT::GetShownText(), SCH_FIELD::GetShownText(), SCH_TEXT::GetShownText(), and FP_TEXT::GetShownText().
|
inline |
Definition at line 204 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_BOLD.
Referenced by BOARD_ADAPTER::addShapeWithClearance(), SCH_DRAWING_TOOLS::createNewText(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), KIGFX::SCH_PAINTER::draw(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), GetEffectiveTextPenWidth(), SCH_TEXT::GetMsgPanelInfo(), GetTextStyleName(), IsDefaultFormatting(), LenSize(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), LIB_TEXT::Plot(), LIB_FIELD::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), LIB_TEXT::print(), SCH_FIELD::Print(), LIB_FIELD::print(), printOneLineOfText(), SCH_LEGACY_PLUGIN::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveText(), KIGFX::GAL::SetTextAttributes(), DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataToWindow(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), and SCH_GLOBALLABEL::UpdateIntersheetRefProps().
bool EDA_TEXT::IsDefaultFormatting | ( | ) | const |
Definition at line 525 of file eda_text.cpp.
References GetHorizJustify(), GetTextThickness(), GetVertJustify(), GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, IsBold(), IsItalic(), IsMirrored(), IsMultilineAllowed(), and IsVisible().
Referenced by SCH_SEXPR_PLUGIN::saveField().
|
inline |
Definition at line 201 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_ITALIC.
Referenced by BOARD_ADAPTER::addShapeWithClearance(), SCH_DRAWING_TOOLS::createNewText(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), KIGFX::SCH_PAINTER::draw(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), SCH_TEXT::GetMsgPanelInfo(), GetTextStyleName(), IsDefaultFormatting(), LenSize(), LIB_TEXT::Plot(), LIB_FIELD::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), BRDITEMS_PLOTTER::PlotPcbText(), LIB_TEXT::print(), SCH_FIELD::Print(), LIB_FIELD::print(), printOneLineOfText(), SCH_LEGACY_PLUGIN::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN::saveText(), SCH_LEGACY_PLUGIN_CACHE::saveText(), KIGFX::GAL::SetTextAttributes(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataToWindow(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), TransformToSegmentList(), and SCH_GLOBALLABEL::UpdateIntersheetRefProps().
|
inline |
Definition at line 210 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_MIRROR.
Referenced by BOARD_ADAPTER::addShapeWithClearance(), KIGFX::SCH_PAINTER::draw(), EDA_TEXT_DESC::EDA_TEXT_DESC(), PCB_TEXT::Flip(), Format(), PCB_TEXT::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), GetTextBox(), IsDefaultFormatting(), PCB_DIMENSION_BASE::Mirror(), EAGLE_PLUGIN::orientFPText(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), BRDITEMS_PLOTTER::PlotPcbText(), printOneLineOfText(), KIGFX::GAL::SetTextAttributes(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), and TransformToSegmentList().
|
inline |
Definition at line 217 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_MULTILINE.
Referenced by DIALOG_TEXT_AND_LABEL_PROPERTIES::DIALOG_TEXT_AND_LABEL_PROPERTIES(), GetTextBox(), IsDefaultFormatting(), SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotPcbText(), Print(), and TransformToSegmentList().
|
inlinevirtual |
Reimplemented in PCB_TEXT.
Definition at line 207 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_VISIBLE.
Referenced by BOARD_ADAPTER::addFootprintShapesWithClearance(), SCH_EDITOR_CONTROL::AssignFootprints(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), AUTOPLACER::DoAutoplace(), KIGFX::SCH_PAINTER::draw(), EDA_TEXT_DESC::EDA_TEXT_DESC(), SCH_EDIT_TOOL::EditField(), PCB_PLUGIN::format(), Format(), FOOTPRINT::GetBoundingBox(), LIB_FIELD::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), SCH_FIELD::HitTest(), IsDefaultFormatting(), SCH_FIELD::Matches(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), SCH_FIELD::Plot(), BRDITEMS_PLOTTER::PlotFootprintTextItems(), SCH_FIELD::Print(), LIB_FIELD::print(), LIB_SYMBOL::Print(), DIALOG_CHANGE_SYMBOLS::processSymbol(), processTextItem(), SCH_EDIT_TOOL::Properties(), SCH_LEGACY_PLUGIN::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveText(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), and FP_TEXT::ViewGetLayers().
int EDA_TEXT::LenSize | ( | const wxString & | aLine, |
int | aThickness | ||
) | const |
aLine | the line of text to consider. For single line text, this parameter is always m_Text. |
aThickness | the stroke width of the text. |
Definition at line 204 of file eda_text.cpp.
References basic_gal, KIGFX::GAL::GetTextLineSize(), GetTextSize(), IsBold(), IsItalic(), KiROUND(), KIGFX::GAL::SetFontBold(), KIGFX::GAL::SetFontItalic(), KIGFX::GAL::SetFontUnderlined(), KIGFX::GAL::SetGlyphSize(), KIGFX::GAL::SetLineWidth(), and VECTOR2< T >::x.
Referenced by SCH_GLOBALLABEL::CreateGraphicShape(), SCH_HIERLABEL::GetBoundingBox(), and SCH_GLOBALLABEL::GetBoundingBoxBase().
|
static |
Definition at line 73 of file eda_text.cpp.
References GR_TEXT_HJUSTIFY_LEFT, and GR_TEXT_HJUSTIFY_RIGHT.
Referenced by DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), and DIALOG_SCH_FIELD_PROPERTIES::UpdateField().
|
static |
Definition at line 87 of file eda_text.cpp.
References GR_TEXT_VJUSTIFY_BOTTOM, and GR_TEXT_VJUSTIFY_TOP.
Referenced by DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), and DIALOG_SCH_FIELD_PROPERTIES::UpdateField().
|
inline |
Definition at line 273 of file eda_text.h.
References m_e, and TEXT_EFFECTS::pos.
Referenced by CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), PCB_TEXT::Move(), FP_TEXT::Move(), SCH_FIELD::Move(), SCH_SHEET_PIN::Move(), SCH_TEXT::Move(), PCB_DIMENSION_BASE::Move(), LIB_TEXT::Offset(), LIB_FIELD::Offset(), FP_TEXT::SetDrawCoord(), DIALOG_SHEET_PROPERTIES::TransferDataToWindow(), and DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow().
void EDA_TEXT::Print | ( | const RENDER_SETTINGS * | aSettings, |
const wxPoint & | 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 420 of file eda_text.cpp.
References GetLinePositions(), GetShownText(), GetTextPos(), IsMultilineAllowed(), printOneLineOfText(), and wxStringSplit().
Referenced by SCH_TEXT::Print(), SCH_GLOBALLABEL::Print(), SCH_HIERLABEL::Print(), and DS_DRAW_ITEM_TEXT::PrintWsItem().
|
private |
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 484 of file eda_text.cpp.
References KIGFX::RENDER_SETTINGS::GetDefaultPenWidth(), GetEffectiveTextPenWidth(), GetHorizJustify(), KIGFX::RENDER_SETTINGS::GetPrintDC(), GetTextAngle(), GetTextSize(), GetVertJustify(), GRText(), IsBold(), IsItalic(), IsMirrored(), and SKETCH.
Referenced by Print().
bool EDA_TEXT::Replace | ( | const wxFindReplaceData & | 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 wxFindReplaceData object containing the search and replace criteria. |
Definition at line 180 of file eda_text.cpp.
References cacheShownText(), m_text, and EDA_ITEM::Replace().
Referenced by SCH_SHEET_PIN::Replace(), SCH_FIELD::Replace(), and SCH_TEXT::Replace().
|
inline |
Definition at line 203 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_BOLD.
Referenced by CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), SCH_EDIT_TOOL::ChangeTextType(), SCH_DRAWING_TOOLS::createNewText(), DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), EDA_TEXT_DESC::EDA_TEXT_DESC(), ALTIUM_PCB::HelperParseDimensions6Linear(), ALTIUM_PCB::HelperParseDimensions6Radial(), SCH_LEGACY_PLUGIN_CACHE::loadField(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), SCH_LEGACY_PLUGIN::loadSymbol(), SCH_EAGLE_PLUGIN::loadTextAttributes(), SCH_SEXPR_PARSER::parseEDA_TEXT(), PCB_PARSER::parseEDA_TEXT(), SCH_ALTIUM_PLUGIN::ParseLabel(), ALTIUM_PCB::ParseTexts6Data(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataFromWindow(), SCH_GLOBALLABEL::UpdateIntersheetRefProps(), and DIALOG_FIELD_PROPERTIES::updateText().
void EDA_TEXT::SetEffects | ( | const EDA_TEXT & | aSrc | ) |
Set the text effects from another instance.
TEXT_EFFECTS is not exposed in the public API, but includes everything except the actual text string itself.
Definition at line 139 of file eda_text.cpp.
References m_e.
Referenced by LIB_TEXT::Clone(), LIB_FIELD::Copy(), SCH_FIELD::ImportValues(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), LIB_FIELD::operator=(), DIALOG_CHANGE_SYMBOLS::processSymbol(), CLIPBOARD_IO::SaveSelection(), and FP_TEXT::SetEffects().
|
inline |
Definition at line 222 of file eda_text.h.
References TEXT_EFFECTS::hjustify, and m_e.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), GRAPHICS_IMPORTER_PCBNEW::AddText(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), SCH_GLOBALLABEL::AutoplaceFields(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), eagleToKicadAlignment(), EDA_TEXT_DESC::EDA_TEXT_DESC(), ALTIUM_PCB::HelperParseDimensions6Radial(), AUTOPLACER::justifyField(), FP_TEXT::KeepUpright(), CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions(), SCH_LEGACY_PLUGIN_CACHE::loadField(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), FABMASTER::loadFootprints(), LEGACY_PLUGIN::loadMODULE_TEXT(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), SCH_LEGACY_PLUGIN::loadSymbol(), SCH_EDIT_TOOL::Mirror(), LIB_TEXT::MirrorHorizontal(), SCH_GLOBALLABEL::MirrorHorizontally(), SCH_GLOBALLABEL::MirrorSpinStyle(), LIB_TEXT::MirrorVertical(), EAGLE_PLUGIN::orientFPText(), EAGLE_PLUGIN::packageText(), SCH_SEXPR_PARSER::parseEDA_TEXT(), PCB_PARSER::parseEDA_TEXT(), SCH_ALTIUM_PLUGIN::ParsePowerPort(), ALTIUM_PCB::ParseTexts6Data(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), LIB_TEXT::Rotate(), SCH_GLOBALLABEL::Rotate90(), SCH_TEXT::SetLabelSpinStyle(), SCH_GLOBALLABEL::SetLabelSpinStyle(), SCH_HIERLABEL::SetLabelSpinStyle(), PCAD2KICAD::SetTextJustify(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), and DIALOG_SCH_FIELD_PROPERTIES::UpdateField().
|
inline |
Definition at line 200 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_ITALIC.
Referenced by PCAD2KICAD::PCB_FOOTPRINT::AddToBoard(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), SCH_EDIT_TOOL::ChangeTextType(), PCB_BASE_FRAME::CreateNewFootprint(), SCH_DRAWING_TOOLS::createNewText(), DRAWING_TOOL::DrawDimension(), DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), EDA_TEXT_DESC::EDA_TEXT_DESC(), ALTIUM_PCB::HelperParseDimensions6Linear(), ALTIUM_PCB::HelperParseDimensions6Radial(), SCH_LEGACY_PLUGIN_CACHE::loadField(), FABMASTER::loadFootprints(), LEGACY_PLUGIN::loadMODULE_TEXT(), LEGACY_PLUGIN::loadPCB_TEXT(), SCH_LEGACY_PLUGIN::loadSymbol(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAddField(), DIALOG_FOOTPRINT_PROPERTIES::OnAddField(), SCH_SEXPR_PARSER::parseEDA_TEXT(), PCB_PARSER::parseEDA_TEXT(), SCH_ALTIUM_PLUGIN::ParseLabel(), ALTIUM_PCB::ParseTexts6Data(), DRAWING_TOOL::PlaceText(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataFromWindow(), SCH_GLOBALLABEL::UpdateIntersheetRefProps(), and DIALOG_FIELD_PROPERTIES::updateText().
|
inline |
Definition at line 209 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_MIRROR.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), PCAD2KICAD::PCB_FOOTPRINT::AddToBoard(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), EDA_TEXT_DESC::EDA_TEXT_DESC(), PCB_TEXT::Flip(), FP_TEXT::Flip(), FP_TEXT::FP_TEXT(), LEGACY_PLUGIN::loadMODULE_TEXT(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), PCB_DIMENSION_BASE::Mirror(), DIALOG_FOOTPRINT_PROPERTIES::OnAddField(), EAGLE_PLUGIN::orientFPText(), EAGLE_PLUGIN::packageText(), SCH_SEXPR_PARSER::parseEDA_TEXT(), PCB_PARSER::parseEDA_TEXT(), ALTIUM_PCB::ParseTexts6Data(), DRAWING_TOOL::PlaceText(), and DIALOG_TEXT_PROPERTIES::TransferDataFromWindow().
|
inline |
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 216 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_MULTILINE.
Referenced by CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary(), PCB_TEXT::PCB_TEXT(), SCH_HIERLABEL::SCH_HIERLABEL(), SCH_LABEL::SCH_LABEL(), and SCH_TEXT::SCH_TEXT().
|
virtual |
Definition at line 124 of file eda_text.cpp.
References cacheShownText(), and m_text.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), SCH_EAGLE_PLUGIN::addImplicitConnections(), GRAPHICS_IMPORTER_PCBNEW::AddText(), PCAD2KICAD::PCB_FOOTPRINT::AddToBoard(), FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), LIB_TEXT::Clone(), createBoard(), PCB_BASE_FRAME::CreateNewFootprint(), SYMBOL_EDIT_FRAME::CreateNewSymbol(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), DRAWING_TOOL::DrawBoardCharacteristics(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), DRAWING_TOOL::DrawSpecificationStackup(), FOOTPRINT::DuplicateItem(), EDA_TEXT_DESC::EDA_TEXT_DESC(), CADSTAR_SCH_ARCHIVE_LOADER::getKiCadSchText(), SCH_SYMBOL::GetValue(), LIB_FIELD::HitTest(), SCH_TEXT::IncrementLabel(), SCH_LEGACY_PLUGIN_CACHE::loadAliases(), CADSTAR_SCH_ARCHIVE_LOADER::loadBusses(), CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets(), SCH_LEGACY_PLUGIN_CACHE::loadDocs(), SCH_LEGACY_PLUGIN_CACHE::loadField(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromLibrary(), FABMASTER::loadFootprints(), SCH_EAGLE_PLUGIN::loadFrame(), CADSTAR_SCH_ARCHIVE_LOADER::loadHierarchicalSheetPins(), SCH_EAGLE_PLUGIN::loadInstance(), SCH_EAGLE_PLUGIN::loadLibrary(), LEGACY_PLUGIN::loadMODULE_TEXT(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), SCH_LEGACY_PLUGIN_CACHE::LoadPart(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances(), SCH_EAGLE_PLUGIN::loadSheet(), SCH_LEGACY_PLUGIN::loadSheet(), CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets(), SCH_LEGACY_PLUGIN::loadSymbol(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), DIALOG_SHEET_PROPERTIES::OnUpdateUI(), LIB_FIELD::operator=(), EAGLE_PLUGIN::orientFPText(), EAGLE_PLUGIN::packageText(), SCH_SEXPR_PARSER::parseEDA_TEXT(), PCB_PARSER::parseEDA_TEXT(), SCH_ALTIUM_PLUGIN::ParseFileName(), SCH_ALTIUM_PLUGIN::ParseLabel(), SCH_ALTIUM_PLUGIN::ParseParameter(), SCH_ALTIUM_PLUGIN::ParsePowerPort(), SCH_ALTIUM_PLUGIN::ParseSheetEntry(), SCH_ALTIUM_PLUGIN::ParseSheetName(), ALTIUM_PCB::ParseTexts6Data(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SCH_EDITOR_CONTROL::Paste(), LIB_SYMBOL::PlotLibFields(), DIALOG_CHANGE_SYMBOLS::processSymbol(), processTextItem(), SCH_SEXPR_PLUGIN_CACHE::saveDcmInfoAsFields(), CLIPBOARD_IO::SaveSelection(), SCH_SYMBOL::SCH_SYMBOL(), LIB_SYMBOL::SetName(), SCH_SYMBOL::SetRef(), FOOTPRINT::SetReference(), FOOTPRINT::SetValue(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_SPICE_MODEL::TransferDataFromWindow(), DIALOG_SHEET_PROPERTIES::TransferDataToWindow(), SCH_SHEET_PATH::UpdateAllScreenReferences(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), DIALOG_SCH_FIELD_PROPERTIES::UpdateField(), SCH_SYMBOL::UpdateFields(), SCH_SHEET_LIST::UpdateSymbolInstances(), PCB_DIMENSION_BASE::updateText(), and SIM_PLOT_FRAME::UpdateTunerValue().
|
inlinevirtual |
Reimplemented in DS_DRAW_ITEM_TEXT, FP_TEXT, and PCB_TEXT.
Definition at line 188 of file eda_text.h.
References TEXT_EFFECTS::angle, and m_e.
Referenced by GRAPHICS_IMPORTER_PCBNEW::AddText(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), SCH_GLOBALLABEL::AutoplaceFields(), eagleToKicadAlignment(), LIB_TEXT::HitTest(), LIB_FIELD::HitTest(), LIB_FIELD::Init(), SCH_LEGACY_PLUGIN_CACHE::loadField(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), SCH_LEGACY_PLUGIN::loadSymbol(), DIALOG_SHEET_PROPERTIES::OnAddField(), DIALOG_SYMBOL_PROPERTIES::OnAddField(), SCH_ALTIUM_PLUGIN::ParsePowerPort(), ALTIUM_PCB::ParseTexts6Data(), SCH_EDIT_TOOL::Rotate(), LIB_TEXT::Rotate(), LIB_FIELD::Rotate(), SCH_GLOBALLABEL::Rotate90(), SCH_TEXT::SetLabelSpinStyle(), SCH_GLOBALLABEL::SetLabelSpinStyle(), SCH_HIERLABEL::SetLabelSpinStyle(), PCB_TEXT::SetTextAngle(), FP_TEXT::SetTextAngle(), DS_DRAW_ITEM_TEXT::SetTextAngle(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), and DIALOG_FIELD_PROPERTIES::updateText().
|
inline |
Definition at line 264 of file eda_text.h.
References m_e, and TEXT_EFFECTS::size.
Referenced by GRAPHICS_IMPORTER_PCBNEW::AddText(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), EDA_TEXT_DESC::EDA_TEXT_DESC(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), and FABMASTER::loadFootprints().
|
inline |
Definition at line 267 of file eda_text.h.
References m_e, and TEXT_EFFECTS::pos.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), GRAPHICS_IMPORTER_PCBNEW::AddText(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), CADSTAR_SCH_ARCHIVE_LOADER::applyToLibraryFieldAttribute(), SCH_GLOBALLABEL::AutoplaceFields(), LIB_TEXT::BeginEdit(), LIB_FIELD::BeginEdit(), LIB_TEXT::CalcEdit(), LIB_FIELD::CalcEdit(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), FP_TEXT::FP_TEXT(), LIB_TEXT::HitTest(), LIB_FIELD::HitTest(), CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), FABMASTER::loadFootprints(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), SCH_LEGACY_PLUGIN::loadSymbol(), PCB_DIMENSION_BASE::Mirror(), SCH_GLOBALLABEL::MirrorSpinStyle(), LIB_TEXT::MoveTo(), LIB_FIELD::MoveTo(), LIB_TEXT::NormalizeJustification(), EAGLE_PLUGIN::orientFPText(), EAGLE_PLUGIN::packageText(), SCH_SEXPR_PARSER::parseSchText(), DRAWING_TOOL::PlaceText(), DIALOG_CHANGE_SYMBOLS::processSymbol(), PCB_TEXT::Rotate(), LIB_TEXT::Rotate(), FP_TEXT::Rotate(), LIB_FIELD::Rotate(), SCH_SHEET_PIN::Rotate(), SCH_TEXT::Rotate(), PCB_DIMENSION_BASE::Rotate(), SCH_GLOBALLABEL::Rotate(), SCH_GLOBALLABEL::Rotate90(), SCH_FIELD::SCH_FIELD(), SCH_SHEET_PIN::SCH_SHEET_PIN(), SCH_TEXT::SCH_TEXT(), FP_TEXT::SetDrawCoord(), PCB_TEXT::SetPosition(), FP_TEXT::SetPosition(), SCH_FIELD::SetPosition(), SCH_TEXT::SetPosition(), DS_DRAW_ITEM_TEXT::SetPosition(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), SCH_SYMBOL::UpdateFields(), PCB_DIM_ALIGNED::updateText(), and PCB_DIM_ORTHOGONAL::updateText().
|
inline |
Definition at line 258 of file eda_text.h.
References m_e, and TEXT_EFFECTS::size.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), SCH_EAGLE_PLUGIN::addImplicitConnections(), CADSTAR_PCB_ARCHIVE_LOADER::applyDimensionSettings(), SCH_EDIT_TOOL::ChangeTextType(), MICROWAVE_TOOL::createBaseFootprint(), PCB_BASE_FRAME::CreateNewFootprint(), SCH_DRAWING_TOOLS::createNewText(), SCH_DRAWING_TOOLS::createSheetPin(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), DRAWING_TOOL::DrawDimension(), 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(), SCH_LEGACY_PLUGIN_CACHE::loadField(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), SCH_EAGLE_PLUGIN::loadFrame(), LEGACY_PLUGIN::loadMODULE_TEXT(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances(), SCH_LEGACY_PLUGIN::loadSheet(), SCH_LEGACY_PLUGIN::loadSymbol(), SCH_EAGLE_PLUGIN::loadTextAttributes(), DIALOG_LIB_SYMBOL_PROPERTIES::OnAddField(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAddField(), DIALOG_SYMBOL_PROPERTIES::OnAddField(), DIALOG_FOOTPRINT_PROPERTIES::OnAddField(), EAGLE_PLUGIN::orientFPText(), EAGLE_PLUGIN::packageText(), SCH_SEXPR_PARSER::parseEDA_TEXT(), PCB_PARSER::parseEDA_TEXT(), SCH_ALTIUM_PLUGIN::ParseLabel(), ALTIUM_PCB::ParseTexts6Data(), DRAWING_TOOL::PlaceText(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), BACK_ANNOTATE::processNetNameChange(), PCB_DIMENSION_BASE::SetTextSize(), PCAD2KICAD::SetTextSizeFromStrokeFontHeight(), PCAD2KICAD::SetTextSizeFromTrueTypeFontHeight(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataFromWindow(), SCH_GLOBALLABEL::UpdateIntersheetRefProps(), and DIALOG_FIELD_PROPERTIES::updateText().
|
inline |
The TextThickness is that set by the user.
The EffectiveTextPenWidth also factors in bold text and thickness clamping.
Definition at line 180 of file eda_text.h.
References m_e, and TEXT_EFFECTS::penwidth.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), GRAPHICS_IMPORTER_PCBNEW::AddText(), PCAD2KICAD::PCB_FOOTPRINT::AddToBoard(), CADSTAR_PCB_ARCHIVE_LOADER::applyDimensionSettings(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), SCH_EDIT_TOOL::ChangeTextType(), 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(), FP_TEXT::FP_TEXT(), ALTIUM_PCB::HelperParseDimensions6Linear(), ALTIUM_PCB::HelperParseDimensions6Radial(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), FABMASTER::loadFootprints(), LEGACY_PLUGIN::loadMODULE_TEXT(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), SCH_EAGLE_PLUGIN::loadTextAttributes(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAddField(), DIALOG_FOOTPRINT_PROPERTIES::OnAddField(), EAGLE_PLUGIN::orientFPText(), EAGLE_PLUGIN::packageText(), SCH_SEXPR_PARSER::parseEDA_TEXT(), PCB_PARSER::parseEDA_TEXT(), ALTIUM_PCB::ParseTexts6Data(), DRAWING_TOOL::PlaceText(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataFromWindow(), and SCH_GLOBALLABEL::UpdateIntersheetRefProps().
|
inline |
Definition at line 261 of file eda_text.h.
References m_e, and TEXT_EFFECTS::size.
Referenced by GRAPHICS_IMPORTER_PCBNEW::AddText(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), EDA_TEXT_DESC::EDA_TEXT_DESC(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), and FABMASTER::loadFootprints().
|
inline |
Definition at line 270 of file eda_text.h.
References m_e, and TEXT_EFFECTS::pos.
Referenced by SCH_SHEET_PIN::ConstrainOnEdge(), PCB_TEXT::Flip(), FP_TEXT::Flip(), FP_TEXT::Mirror(), LIB_TEXT::MirrorHorizontal(), LIB_FIELD::MirrorHorizontal(), SCH_SHEET_PIN::MirrorHorizontally(), SCH_TEXT::MirrorHorizontally(), and SCH_SHEET_PIN::SetSide().
|
inline |
Definition at line 271 of file eda_text.h.
References m_e, and TEXT_EFFECTS::pos.
Referenced by SCH_SHEET_PIN::ConstrainOnEdge(), PCB_TEXT::Flip(), FP_TEXT::Flip(), FP_TEXT::Mirror(), LIB_TEXT::MirrorVertical(), LIB_FIELD::MirrorVertical(), SCH_SHEET_PIN::MirrorVertically(), SCH_TEXT::MirrorVertically(), and SCH_SHEET_PIN::SetSide().
|
inline |
Definition at line 223 of file eda_text.h.
References m_e, and TEXT_EFFECTS::vjustify.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), GRAPHICS_IMPORTER_PCBNEW::AddText(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), eagleToKicadAlignment(), EDA_TEXT_DESC::EDA_TEXT_DESC(), ALTIUM_PCB::HelperParseDimensions6Radial(), AUTOPLACER::justifyField(), SCH_LEGACY_PLUGIN_CACHE::loadField(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), LEGACY_PLUGIN::loadMODULE_TEXT(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), SCH_LEGACY_PLUGIN::loadSymbol(), SCH_EDIT_TOOL::Mirror(), LIB_TEXT::MirrorHorizontal(), LIB_TEXT::MirrorVertical(), EAGLE_PLUGIN::orientFPText(), EAGLE_PLUGIN::packageText(), SCH_SEXPR_PARSER::parseEDA_TEXT(), PCB_PARSER::parseEDA_TEXT(), ALTIUM_PCB::ParseTexts6Data(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), LIB_TEXT::Rotate(), SCH_TEXT::SetLabelSpinStyle(), SCH_HIERLABEL::SetLabelSpinStyle(), PCAD2KICAD::SetTextJustify(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), and DIALOG_SCH_FIELD_PROPERTIES::UpdateField().
|
inlinevirtual |
Reimplemented in PCB_TEXT.
Definition at line 206 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_VISIBLE.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), PCAD2KICAD::PCB_FOOTPRINT::AddToBoard(), SCH_EDITOR_CONTROL::AssignFootprints(), PCB_BASE_FRAME::CreateNewFootprint(), EDA_TEXT_DESC::EDA_TEXT_DESC(), LIB_FIELD::Init(), CADSTAR_SCH_ARCHIVE_LOADER::loadBusses(), EAGLE_PLUGIN::loadElements(), SCH_LEGACY_PLUGIN_CACHE::loadField(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), FABMASTER::loadFootprints(), SCH_EAGLE_PLUGIN::loadInstance(), SCH_EAGLE_PLUGIN::loadLibrary(), LEGACY_PLUGIN::loadMODULE_TEXT(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), SCH_LEGACY_PLUGIN_CACHE::LoadPart(), EAGLE_PLUGIN::loadPlain(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances(), SCH_LEGACY_PLUGIN::loadSymbol(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymbolFieldAttribute(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary(), ALTIUM_PCB::ParseComponents6Data(), SCH_ALTIUM_PLUGIN::ParseDesignator(), SCH_SEXPR_PARSER::parseEDA_TEXT(), PCB_PARSER::parseEDA_TEXT(), SCH_ALTIUM_PLUGIN::ParseFileName(), SCH_ALTIUM_PLUGIN::ParseParameter(), SCH_ALTIUM_PLUGIN::ParsePowerPort(), SCH_ALTIUM_PLUGIN::ParseSheetName(), SCH_EDITOR_CONTROL::processCmpToFootprintLinkFile(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_CHANGE_SYMBOLS::processSymbol(), processTextItem(), SCH_SEXPR_PLUGIN_CACHE::saveDcmInfoAsFields(), SCH_FIELD::SCH_FIELD(), SCH_EDIT_FRAME::ShowAllIntersheetRefs(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow(), and DIALOG_FIELD_PROPERTIES::updateText().
wxString EDA_TEXT::ShortenedShownText | ( | ) | const |
Returns a shortened version (max 15 characters) of the shown text.
Definition at line 218 of file eda_text.cpp.
References GetShownText().
Referenced by LIB_TEXT::GetSelectMenuText(), PCB_TEXT::GetSelectMenuText(), LIB_FIELD::GetSelectMenuText(), SCH_SHEET_PIN::GetSelectMenuText(), SCH_FIELD::GetSelectMenuText(), FP_TEXT::GetSelectMenuText(), SCH_TEXT::GetSelectMenuText(), SCH_LABEL::GetSelectMenuText(), SCH_GLOBALLABEL::GetSelectMenuText(), and SCH_HIERLABEL::GetSelectMenuText().
void EDA_TEXT::SwapEffects | ( | EDA_TEXT & | aTradingPartner | ) |
Swap the text effects of the two involved instances.
TEXT_EFFECTS is not exposed in the public API, but includes everything except the actual text string itself.
Definition at line 153 of file eda_text.cpp.
References m_e.
Referenced by SCH_FIELD::SwapData(), SCH_TEXT::SwapData(), and FP_TEXT::SwapEffects().
void EDA_TEXT::SwapText | ( | EDA_TEXT & | aTradingPartner | ) |
Definition at line 145 of file eda_text.cpp.
References m_shown_text, m_shown_text_has_text_var_refs, and m_text.
Referenced by SCH_FIELD::SwapData(), and SCH_TEXT::SwapData().
|
virtual |
Test if aPoint is within the bounds of this object.
aPoint | A wxPoint to test. |
aAccuracy | Amount to inflate the bounding box. |
Reimplemented in FP_TEXT, and PCB_TEXT.
Definition at line 395 of file eda_text.cpp.
References EDA_RECT::Contains(), GetTextAngle(), GetTextBox(), GetTextPos(), EDA_RECT::Inflate(), and RotatePoint().
Referenced by LIB_TEXT::HitTest(), LIB_FIELD::HitTest(), DS_DRAW_ITEM_TEXT::HitTest(), and PCB_TEXT::TextHitTest().
|
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 FP_TEXT, and PCB_TEXT.
Definition at line 407 of file eda_text.cpp.
References EDA_RECT::Contains(), GetTextAngle(), GetTextBox(), EDA_RECT::Inflate(), and EDA_RECT::Intersects().
void EDA_TEXT::TransformBoundingBoxWithClearanceToPolygon | ( | SHAPE_POLY_SET * | aCornerBuffer, |
int | aClearanceValue | ||
) | const |
Convert the text bounding box to a rectangular polygon depending on the text orientation, the bounding box is not always horizontal or vertical.
Used in filling zones calculations Circles and arcs are approximated by segments
aCornerBuffer | a buffer to store the polygon. |
aClearanceValue | the clearance around the text bounding box to the real clearance value (usually near from 1.0). |
Definition at line 681 of file eda_text.cpp.
References SHAPE_POLY_SET::Append(), EDA_RECT::GetBottom(), EDA_RECT::GetOrigin(), EDA_RECT::GetRight(), GetText(), GetTextAngle(), GetTextBox(), GetTextPos(), EDA_RECT::Inflate(), SHAPE_POLY_SET::NewOutline(), and RotatePoint().
Referenced by PCB_TEXT::TransformShapeWithClearanceToPolygon().
std::vector< wxPoint > EDA_TEXT::TransformToSegmentList | ( | ) | const |
Convert the text shape to a list of segment.
Each segment is stored as 2 wxPoints: the starting point and the ending point there are therefore 2*n points.
Definition at line 606 of file eda_text.cpp.
References addTextSegmToBuffer(), BLACK, color, GetDrawHorizJustify(), GetDrawPos(), GetDrawRotation(), GetDrawVertJustify(), GetLinePositions(), GetShownText(), GetTextSize(), GRText(), IsItalic(), IsMirrored(), IsMultilineAllowed(), and wxStringSplit().
Referenced by GetEffectiveTextShape(), and PNS_KICAD_IFACE_BASE::syncTextItem().
|
private |
Definition at line 415 of file eda_text.h.
Referenced by Compare(), GetHorizJustify(), GetTextAngle(), GetTextHeight(), GetTextPos(), GetTextSize(), GetTextThickness(), GetTextWidth(), GetVertJustify(), IsBold(), IsItalic(), IsMirrored(), IsMultilineAllowed(), IsVisible(), Offset(), SetBold(), SetEffects(), SetHorizJustify(), SetItalic(), SetMirrored(), SetMultilineAllowed(), SetTextAngle(), SetTextHeight(), SetTextPos(), SetTextSize(), SetTextThickness(), SetTextWidth(), SetTextX(), SetTextY(), SetVertJustify(), SetVisible(), and SwapEffects().
|
private |
Definition at line 412 of file eda_text.h.
Referenced by cacheShownText(), CopyText(), GetShownText(), and SwapText().
|
private |
Definition at line 413 of file eda_text.h.
Referenced by cacheShownText(), CopyText(), HasTextVars(), and SwapText().
|
private |
Definition at line 411 of file eda_text.h.
Referenced by cacheShownText(), Compare(), CopyText(), Empty(), GetText(), Replace(), SetText(), and SwapText().