![]() |
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 | GetShownText (bool *processTextVars) const |
A version of GetShownText() which also indicates whether or not the text needs to be processed for text variables. More... | |
wxString | ShortenedShownText () const |
Returns a shortened version (max 15 characters) of the shown text. 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 |
void | SetVisible (bool aVisible) |
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, 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 |
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 | printOneLineOfText (const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, 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 119 of file eda_text.h.
|
private |
Enumerator | |
---|---|
TE_MIRROR | |
TE_ITALIC | |
TE_BOLD | |
TE_MULTILINE | |
TE_VISIBLE |
Definition at line 395 of file eda_text.h.
EDA_TEXT::EDA_TEXT | ( | const wxString & | text = wxEmptyString | ) |
Definition at line 91 of file eda_text.cpp.
References DEFAULT_SIZE_TEXT, m_shown_text, m_shown_text_has_text_var_refs, SetTextSize(), and UnescapeString().
EDA_TEXT::EDA_TEXT | ( | const EDA_TEXT & | aText | ) |
Definition at line 107 of file eda_text.cpp.
References m_shown_text, m_shown_text_has_text_var_refs, m_text, and UnescapeString().
|
virtual |
Definition at line 116 of file eda_text.cpp.
void EDA_TEXT::CopyText | ( | const EDA_TEXT & | aSrc | ) |
Definition at line 129 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 261 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 520 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().
|
virtual |
Reimplemented in FP_TEXT.
Definition at line 637 of file eda_text.cpp.
References GetTextAngle().
Referenced by TransformToSegmentList().
int EDA_TEXT::GetEffectiveTextPenWidth | ( | int | aDefaultWidth = 0 | ) | const |
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultWidth.
Definition at line 157 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(), export_vrml_fp_text(), export_vrml_pcbtext(), SCH_GLOBALLABEL::GetBoundingBox(), SCH_HIERLABEL::GetBoundingBox(), 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(), PlotDrawingSheet(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), BRDITEMS_PLOTTER::PlotPcbText(), LIB_TEXT::print(), SCH_FIELD::Print(), printOneLineOfText(), PNS_KICAD_IFACE_BASE::syncTextItem(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), ALIGNED_DIMENSION::updateGeometry(), ORTHOGONAL_DIMENSION::updateGeometry(), LEADER::updateGeometry(), ALIGNED_DIMENSION::updateText(), and ORTHOGONAL_DIMENSION::updateText().
std::shared_ptr< SHAPE_COMPOUND > EDA_TEXT::GetEffectiveTextShape | ( | ) | const |
Definition at line 624 of file eda_text.cpp.
References GetEffectiveTextPenWidth(), and TransformToSegmentList().
Referenced by PCB_TEXT::GetEffectiveShape(), FP_TEXT::GetEffectiveShape(), and PCB_SELECTION_TOOL::hitTestDistance().
|
inline |
Definition at line 205 of file eda_text.h.
References TEXT_EFFECTS::hjustify, and m_e.
Referenced by BOARD_ADAPTER::addShapeWithClearance(), DIALOG_EDIT_ONE_FIELD::DIALOG_EDIT_ONE_FIELD(), KIGFX::SCH_PAINTER::draw(), EDA_TEXT_DESC::EDA_TEXT_DESC(), export_vrml_fp_text(), export_vrml_pcbtext(), AUTOPLACER::fieldHorizPlacement(), PCB_TEXT::Flip(), FP_TEXT::Flip(), Format(), GetTextBox(), hash_fp_item(), 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(), PlotDrawingSheet(), 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_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_EDIT_TEXT::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), TransformToSegmentList(), and DIALOG_SCH_EDIT_ONE_FIELD::UpdateField().
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 217 of file eda_text.cpp.
References KIGFX::STROKE_FONT::GetInterline(), GetTextHeight(), and KiROUND().
Referenced by CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), GetLinePositions(), and GetTextBox().
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 424 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 BOARD_ADAPTER::addShapeWithClearance(), export_vrml_pcbtext(), SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotPcbText(), Print(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), 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 141 of file eda_text.h.
References m_shown_text.
Referenced by KIGFX::DS_PAINTER::draw(), LIB_FIELD::GetMsgPanelInfo(), DS_DRAW_ITEM_TEXT::GetSelectMenuText(), PCB_TEXT::GetShownText(), SCH_FIELD::GetShownText(), SCH_TEXT::GetShownText(), FP_TEXT::GetShownText(), GetTextBox(), LIB_FIELD::Plot(), PlotDrawingSheet(), LIB_PART::PlotLibFields(), LIB_TEXT::print(), Print(), ShortenedShownText(), DRC_TEST_PROVIDER_MISC::testTextVars(), and TransformToSegmentList().
|
inline |
A version of GetShownText() which also indicates whether or not the text needs to be processed for text variables.
processTextVars | [out] |
Definition at line 149 of file eda_text.h.
References m_shown_text, and m_shown_text_has_text_var_refs.
|
inlinevirtual |
Return the string associated with the text object.
Definition at line 133 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(), CONNECTION_GRAPH::buildConnectionGraph(), SCH_EDIT_TOOL::ChangeTextType(), LIB_TEXT::Clone(), LIB_TEXT::compare(), LIB_FIELD::compare(), SCH_DRAWING_TOOLS::createNewText(), SCH_DRAWING_TOOLS::createSheetPin(), DIALOG_EDIT_ONE_FIELD::DIALOG_EDIT_ONE_FIELD(), DIALOG_SCH_EDIT_ONE_FIELD::DIALOG_SCH_EDIT_ONE_FIELD(), KIGFX::SCH_VIEW::DisplayComponent(), SYMBOL_EDIT_FRAME::DisplaySymbolDatasheet(), SCH_FIELD::DoHypertextMenu(), KIGFX::SCH_PAINTER::draw(), SCH_EDIT_TOOL::Duplicate(), EDA_TEXT_DESC::EDA_TEXT_DESC(), CONNECTION_GRAPH::ercCheckHierSheets(), CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), LIB_PART::Flatten(), PCB_IO::format(), FormatProbeItem(), SCH_COMPONENT::GetFootprint(), LIB_FIELD::GetFullText(), FOOTPRINT_INFO_GENERATOR::GetHtmlFieldRow(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet(), FP_TEXT::GetLength(), getMatchingTextItem(), PCB_TEXT::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_COMPONENT::GetRef(), LIB_PART::GetSearchText(), DIMENSION_BASE::GetText(), FP_TEXT_GRID_TABLE::GetValue(), SCH_COMPONENT::GetValue(), hash_fp_item(), LIB_FIELD::HitTest(), SCH_DRAWING_TOOLS::importHierLabel(), SCH_TEXT::IncrementLabel(), GENERAL_COLLECTOR::Inspect(), SCH_FIELD::IsVoid(), 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_FIELD::operator<(), SCH_TEXT::operator<(), LIB_FIELD::operator=(), PCB_PARSER::parseDIMENSION(), 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_LEGACY_PLUGIN::saveComponent(), 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_CACHE::SaveSymbol(), SCH_SEXPR_PLUGIN::saveText(), SCH_LEGACY_PLUGIN::saveText(), SCH_SEXPR_PLUGIN_CACHE::saveText(), SCH_LEGACY_PLUGIN_CACHE::saveText(), SCH_COMPONENT::SetRef(), SYMBOL_VIEWER_FRAME::setupUIConditions(), SYMBOL_EDIT_FRAME::setupUIConditions(), EE_INSPECTION_TOOL::ShowDatasheet(), SCH_SHEET::SymbolCount(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_EDIT_COMPONENTS_LIBID::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_EDIT_TEXT::TransferDataToWindow(), DIALOG_SHEET_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_LABEL_EDITOR::TransferDataToWindow(), TransformBoundingBoxWithClearanceToPolygon(), TUNER_SLIDER::TUNER_SLIDER(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), DIALOG_FOOTPRINT_FP_EDITOR::Validate(), DIALOG_FOOTPRINT_PROPERTIES::Validate(), and FP_TEXT::ViewGetLOD().
|
inline |
Definition at line 181 of file eda_text.h.
References TEXT_EFFECTS::angle, and m_e.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), BOARD_ADAPTER::addShapeWithClearance(), DIALOG_EDIT_ONE_FIELD::DIALOG_EDIT_ONE_FIELD(), KIGFX::DS_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), export_vrml_pcbtext(), PCB_TEXT::Flip(), FP_TEXT::Flip(), PCB_IO::format(), LIB_TEXT::GetBoundingBox(), SCH_FIELD::GetBoundingBox(), PCB_TEXT::GetBoundingBox(), LIB_FIELD::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), SCH_LABEL::GetBoundingBox(), FP_TEXT::GetDrawRotation(), GetDrawRotation(), GetLinePositions(), GetTextAngleDegrees(), GetTextAngleRadians(), FP_TEXT_GRID_TABLE::GetValue(), hash_fp_item(), LIB_TEXT::HitTest(), LIB_FIELD::HitTest(), FP_TEXT::KeepUpright(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), DIMENSION_BASE::Mirror(), LIB_TEXT::MirrorHorizontal(), SCH_GLOBALLABEL::MirrorSpinStyle(), LIB_TEXT::MirrorVertical(), LIB_TEXT::NormalizeJustification(), EAGLE_PLUGIN::orientFPText(), PCB_PARSER::parseFOOTPRINT_unchecked(), ALTIUM_PCB::ParseTexts6Data(), LIB_TEXT::Plot(), LIB_FIELD::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), PlotDrawingSheet(), BRDITEMS_PLOTTER::PlotPcbText(), positioningChanged(), LIB_TEXT::print(), LIB_FIELD::print(), SCH_FIELD::Print(), printOneLineOfText(), SCH_EDIT_TOOL::Rotate(), PCB_TEXT::Rotate(), LIB_TEXT::Rotate(), FP_TEXT::Rotate(), LIB_FIELD::Rotate(), 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_EDIT_TEXT::TransferDataFromWindow(), DIALOG_LIB_EDIT_TEXT::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), TransformBoundingBoxWithClearanceToPolygon(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), and DIALOG_SCH_EDIT_ONE_FIELD::UpdateField().
|
inline |
Definition at line 183 of file eda_text.h.
References GetTextAngle().
Referenced by CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), PCB_TEXT::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), SCH_SEXPR_PLUGIN::saveField(), and DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 184 of file eda_text.h.
References GetTextAngle().
Referenced by KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), ALIGNED_DIMENSION::updateGeometry(), ORTHOGONAL_DIMENSION::updateGeometry(), and 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 223 of file eda_text.cpp.
References basic_gal, GetEffectiveTextPenWidth(), GetHorizJustify(), 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, IsMirrored(), IsMultilineAllowed(), KiROUND(), EDA_RECT::Move(), EDA_RECT::Normalize(), EDA_RECT::SetOrigin(), EDA_RECT::SetSize(), EDA_RECT::SetX(), EDA_RECT::SetY(), wxStringSplit(), and VECTOR2< T >::y.
Referenced by PCB_TEXT::Flip(), LIB_TEXT::GetBoundingBox(), SCH_FIELD::GetBoundingBox(), PCB_TEXT::GetBoundingBox(), LIB_FIELD::GetBoundingBox(), FP_TEXT::GetBoundingBox(), DIMENSION_BASE::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), DS_DRAW_ITEM_TEXT::GetBoundingBox(), SCH_LABEL::GetBoundingBox(), LIB_TEXT::HitTest(), LIB_TEXT::NormalizeJustification(), FP_TEXT::TextHitTest(), TextHitTest(), TransformBoundingBoxWithClearanceToPolygon(), ALIGNED_DIMENSION::updateGeometry(), ORTHOGONAL_DIMENSION::updateGeometry(), LEADER::updateGeometry(), and FP_TEXT::ViewBBox().
|
inline |
Definition at line 251 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_GLOBALLABEL::GetBoundingBox(), SCH_HIERLABEL::GetBoundingBox(), GetInterline(), PCB_TEXT::GetMsgPanelInfo(), LIB_FIELD::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), SCH_GLOBALLABEL::GetSchematicTextOffset(), GetTextBox(), FP_TEXT_GRID_TABLE::GetValue(), hash_fp_item(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), SCH_SEXPR_PARSER::parsePin(), SCH_SEXPR_PLUGIN::saveField(), ALIGNED_DIMENSION::updateText(), and ORTHOGONAL_DIMENSION::updateText().
|
inline |
Definition at line 254 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_EDIT_ONE_FIELD::DIALOG_EDIT_ONE_FIELD(), SCH_LABEL::doIsConnected(), SCH_GLOBALLABEL::doIsConnected(), SCH_HIERLABEL::doIsConnected(), KIGFX::DS_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), export_vrml_fp_text(), export_vrml_pcbtext(), PCB_TEXT::Flip(), FP_TEXT::Flip(), PCB_IO::format(), LIB_TEXT::GetBoundingBox(), SCH_FIELD::GetBoundingBox(), PCB_TEXT::GetBoundingBox(), LIB_FIELD::GetBoundingBox(), FP_TEXT::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), SCH_LABEL::GetBoundingBox(), SCH_GLOBALLABEL::GetBoundingBox(), SCH_HIERLABEL::GetBoundingBox(), SCH_TEXT::GetConnectionPoints(), 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(), FP_TEXT::Mirror(), 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(), PCB_PARSER::parseDIMENSION(), DRAWING_TOOL::PlaceText(), SCH_TEXT::Plot(), PlotDrawingSheet(), 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(), SCH_FIELD::Rotate(), LIB_FIELD::Rotate(), SCH_SHEET_PIN::Rotate(), DIMENSION_BASE::Rotate(), SCH_TEXT::Rotate(), SCH_GLOBALLABEL::Rotate(), SCH_GLOBALLABEL::Rotate90(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveText(), FP_TEXT::SetDrawCoord(), FP_TEXT::SetLocalCoord(), SCH_COMPONENT::SetRef(), FP_TEXT::TextHitTest(), TextHitTest(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), TransformBoundingBoxWithClearanceToPolygon(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), TransformToSegmentList(), SCH_TEXT::UpdateDanglingState(), DIALOG_SCH_EDIT_ONE_FIELD::UpdateField(), and FP_TEXT::ViewBBox().
|
inline |
Definition at line 245 of file eda_text.h.
References m_e, and TEXT_EFFECTS::size.
Referenced by BOARD_ADAPTER::addShapeWithClearance(), SCH_EDIT_TOOL::ChangeTextType(), MICROWAVE_TOOL::createMicrowaveInductor(), KIGFX::SCH_PAINTER::draw(), export_vrml_fp_text(), export_vrml_pcbtext(), GetEffectiveTextPenWidth(), GetTextBox(), SCH_TEXT::GetTextOffset(), LenSize(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), EAGLE_PLUGIN::orientFPText(), LIB_TEXT::Plot(), LIB_FIELD::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), PlotDrawingSheet(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), BRDITEMS_PLOTTER::PlotPcbText(), LIB_TEXT::print(), LIB_FIELD::print(), SCH_FIELD::Print(), printOneLineOfText(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), SCH_LEGACY_PLUGIN::saveSheet(), KIGFX::GAL::SetTextAttributes(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), TransformToSegmentList(), and SCH_GLOBALLABEL::UpdateIntersheetRefProps().
wxString EDA_TEXT::GetTextStyleName | ( | ) | const |
Definition at line 485 of file eda_text.cpp.
References _, IsBold(), and IsItalic().
Referenced by LIB_FIELD::GetMsgPanelInfo().
|
inline |
Definition at line 167 of file eda_text.h.
References m_e, and TEXT_EFFECTS::penwidth.
Referenced by SCH_EDIT_TOOL::ChangeTextType(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), GetEffectiveTextPenWidth(), LIB_TEXT::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), FP_TEXT_GRID_TABLE::GetValue(), LIB_TEXT::GetWidth(), LIB_FIELD::GetWidth(), IsDefaultFormatting(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), SCH_LEGACY_PLUGIN::saveText(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), and SCH_GLOBALLABEL::UpdateIntersheetRefProps().
|
inline |
Definition at line 248 of file eda_text.h.
References m_e, and TEXT_EFFECTS::size.
Referenced by LIB_TEXT::compare(), LIB_FIELD::compare(), DIALOG_EDIT_ONE_FIELD::DIALOG_EDIT_ONE_FIELD(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), GetEffectiveTextPenWidth(), PCB_TEXT::GetMsgPanelInfo(), LIB_FIELD::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_HIERLABEL::GetSchematicTextOffset(), FP_TEXT_GRID_TABLE::GetValue(), hash_fp_item(), 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_LABEL_EDITOR::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_EDIT_TEXT::TransferDataToWindow(), DIALOG_LABEL_EDITOR::TransferDataToWindow(), ALIGNED_DIMENSION::updateGeometry(), ORTHOGONAL_DIMENSION::updateGeometry(), and LEADER::updateGeometry().
|
inline |
Definition at line 206 of file eda_text.h.
References m_e, and TEXT_EFFECTS::vjustify.
Referenced by BOARD_ADAPTER::addShapeWithClearance(), DIALOG_EDIT_ONE_FIELD::DIALOG_EDIT_ONE_FIELD(), KIGFX::SCH_PAINTER::draw(), EDA_TEXT_DESC::EDA_TEXT_DESC(), export_vrml_fp_text(), export_vrml_pcbtext(), PCB_TEXT::Flip(), Format(), GetLinePositions(), GetTextBox(), hash_fp_item(), IsDefaultFormatting(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), SCH_EDIT_TOOL::Mirror(), LIB_TEXT::MirrorHorizontal(), LIB_TEXT::MirrorVertical(), LIB_TEXT::NormalizeJustification(), SCH_TEXT::Plot(), PlotDrawingSheet(), 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_EDIT_TEXT::TransferDataToWindow(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), TransformToSegmentList(), and DIALOG_SCH_EDIT_ONE_FIELD::UpdateField().
|
inline |
Definition at line 190 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_BOLD.
Referenced by SCH_EDIT_TOOL::ChangeTextType(), SCH_DRAWING_TOOLS::createNewText(), DIALOG_EDIT_ONE_FIELD::DIALOG_EDIT_ONE_FIELD(), KIGFX::SCH_PAINTER::draw(), EDA_TEXT_DESC::EDA_TEXT_DESC(), Format(), GetEffectiveTextPenWidth(), SCH_TEXT::GetMsgPanelInfo(), GetTextStyleName(), hash_fp_item(), IsDefaultFormatting(), LenSize(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), LIB_TEXT::Plot(), LIB_FIELD::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), PlotDrawingSheet(), LIB_TEXT::print(), LIB_FIELD::print(), SCH_FIELD::Print(), printOneLineOfText(), SCH_LEGACY_PLUGIN::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveText(), KIGFX::GAL::SetTextAttributes(), DIALOG_LIB_EDIT_TEXT::TransferDataToWindow(), DIALOG_LABEL_EDITOR::TransferDataToWindow(), and SCH_GLOBALLABEL::UpdateIntersheetRefProps().
bool EDA_TEXT::IsDefaultFormatting | ( | ) | const |
Definition at line 506 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 187 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_ITALIC.
Referenced by BOARD_ADAPTER::addShapeWithClearance(), SCH_EDIT_TOOL::ChangeTextType(), SCH_DRAWING_TOOLS::createNewText(), DIALOG_EDIT_ONE_FIELD::DIALOG_EDIT_ONE_FIELD(), KIGFX::SCH_PAINTER::draw(), EDA_TEXT_DESC::EDA_TEXT_DESC(), export_vrml_fp_text(), export_vrml_pcbtext(), Format(), SCH_TEXT::GetMsgPanelInfo(), GetTextStyleName(), FP_TEXT_GRID_TABLE::GetValueAsBool(), hash_fp_item(), IsDefaultFormatting(), LenSize(), LIB_TEXT::Plot(), LIB_FIELD::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), PlotDrawingSheet(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), BRDITEMS_PLOTTER::PlotPcbText(), LIB_TEXT::print(), LIB_FIELD::print(), SCH_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_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_EDIT_TEXT::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_LABEL_EDITOR::TransferDataToWindow(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), TransformToSegmentList(), and SCH_GLOBALLABEL::UpdateIntersheetRefProps().
|
inline |
Definition at line 196 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(), export_vrml_fp_text(), export_vrml_pcbtext(), PCB_TEXT::Flip(), Format(), PCB_TEXT::GetMsgPanelInfo(), FP_TEXT::GetMsgPanelInfo(), GetTextBox(), hash_fp_item(), IsDefaultFormatting(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), DIMENSION_BASE::Mirror(), EAGLE_PLUGIN::orientFPText(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), BRDITEMS_PLOTTER::PlotPcbText(), printOneLineOfText(), KIGFX::GAL::SetTextAttributes(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), FP_TEXT::TransformTextShapeWithClearanceToPolygon(), and TransformToSegmentList().
|
inline |
Definition at line 203 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_MULTILINE.
Referenced by BOARD_ADAPTER::addShapeWithClearance(), DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR(), export_vrml_pcbtext(), GetTextBox(), IsDefaultFormatting(), SCH_TEXT::Plot(), PlotDrawingSheet(), BRDITEMS_PLOTTER::PlotPcbText(), Print(), PCB_TEXT::TransformTextShapeWithClearanceToPolygon(), and TransformToSegmentList().
|
inline |
Definition at line 193 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_VISIBLE.
Referenced by BOARD_ADAPTER::addFootprintShapesWithClearance(), ZONE_FILLER::addKnockout(), SCH_EDITOR_CONTROL::AssignFootprints(), DIALOG_EDIT_ONE_FIELD::DIALOG_EDIT_ONE_FIELD(), KIGFX::SCH_PAINTER::draw(), EDA_TEXT_DESC::EDA_TEXT_DESC(), export_vrml_footprint(), export_vrml_fp_text(), PCB_IO::format(), Format(), FOOTPRINT::GetBoundingBox(), FP_TEXT::GetMsgPanelInfo(), FP_TEXT_GRID_TABLE::GetValueAsBool(), SCH_FIELD::HitTest(), GENERAL_COLLECTOR::Inspect(), IsDefaultFormatting(), SCH_FIELD::Matches(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), SCH_FIELD::Plot(), BRDITEMS_PLOTTER::PlotFootprintTextItems(), LIB_FIELD::print(), SCH_FIELD::Print(), LIB_PART::Print(), DIALOG_CHANGE_SYMBOLS::processSymbol(), processTextItem(), SCH_LEGACY_PLUGIN::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN_CACHE::saveText(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), FOOTPRINT::TransformFPShapesWithClearanceToPolygon(), 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 188 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_GLOBALLABEL::GetBoundingBox(), and SCH_HIERLABEL::GetBoundingBox().
|
static |
Definition at line 63 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_SCH_EDIT_ONE_FIELD::UpdateField(), and DIALOG_EDIT_ONE_FIELD::updateText().
|
static |
Definition at line 77 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_SCH_EDIT_ONE_FIELD::UpdateField(), and DIALOG_EDIT_ONE_FIELD::updateText().
|
inline |
Definition at line 259 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(), DIMENSION_BASE::Move(), SCH_TEXT::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, | ||
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 401 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 465 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 178 of file eda_text.cpp.
References m_shown_text, m_shown_text_has_text_var_refs, m_text, EDA_ITEM::Replace(), and UnescapeString().
Referenced by CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary(), SCH_FIELD::Replace(), SCH_SHEET_PIN::Replace(), and SCH_TEXT::Replace().
|
inline |
Definition at line 189 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_BOLD.
Referenced by CADSTAR_SCH_ARCHIVE_LOADER::applyToLibraryFieldAttribute(), 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(), SCH_LEGACY_PLUGIN::loadComponent(), SCH_LEGACY_PLUGIN_CACHE::loadField(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymbolFieldAttribute(), SCH_LEGACY_PLUGIN_CACHE::loadText(), 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_EDIT_TEXT::TransferDataFromWindow(), DIALOG_LABEL_EDITOR::TransferDataFromWindow(), SCH_GLOBALLABEL::UpdateIntersheetRefProps(), and DIALOG_EDIT_ONE_FIELD::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 137 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 208 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(), FP_TEXT::Flip(), ALTIUM_PCB::HelperParseDimensions6Leader(), AUTOPLACER::justifyField(), FP_TEXT::KeepUpright(), SCH_LEGACY_PLUGIN::loadComponent(), 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_CACHE::loadText(), SCH_EDIT_TOOL::Mirror(), LIB_TEXT::MirrorHorizontal(), SCH_GLOBALLABEL::MirrorHorizontally(), SCH_GLOBALLABEL::MirrorSpinStyle(), LIB_TEXT::MirrorVertical(), EAGLE_PLUGIN::orientFPText(), EAGLE_PLUGIN::packageText(), 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(), ALTIUM_PCB::ParseTexts6Data(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), LIB_TEXT::Rotate(), SCH_GLOBALLABEL::Rotate90(), SetEdaTextJustification(), SCH_TEXT::SetLabelSpinStyle(), SCH_GLOBALLABEL::SetLabelSpinStyle(), SCH_HIERLABEL::SetLabelSpinStyle(), PCAD2KICAD::SetTextJustify(), DS_DATA_ITEM_TEXT::SyncDrawItems(), DIALOG_LIB_EDIT_TEXT::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), and DIALOG_EDIT_ONE_FIELD::updateText().
|
inline |
Definition at line 186 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_ITALIC.
Referenced by PCAD2KICAD::PCB_FOOTPRINT::AddToBoard(), 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(), SCH_LEGACY_PLUGIN::loadComponent(), SCH_LEGACY_PLUGIN_CACHE::loadField(), FABMASTER::loadFootprints(), LEGACY_PLUGIN::loadMODULE_TEXT(), LEGACY_PLUGIN::loadPCB_TEXT(), SCH_LEGACY_PLUGIN_CACHE::loadText(), DIALOG_FOOTPRINT_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(), FP_TEXT_GRID_TABLE::SetValueAsBool(), DIALOG_LIB_EDIT_TEXT::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LABEL_EDITOR::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), SCH_GLOBALLABEL::UpdateIntersheetRefProps(), and DIALOG_EDIT_ONE_FIELD::updateText().
|
inline |
Definition at line 195 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(), CADSTAR_SCH_ARCHIVE_LOADER::getKiCadSchText(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), LEGACY_PLUGIN::loadMODULE_TEXT(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), 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(), FP_TEXT_GRID_TABLE::SetValueAsLong(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), and DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog().
|
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 202 of file eda_text.h.
References TEXT_EFFECTS::Bit(), m_e, and TE_MULTILINE.
Referenced by PCB_TEXT::PCB_TEXT(), SCH_HIERLABEL::SCH_HIERLABEL(), SCH_LABEL::SCH_LABEL(), SCH_TEXT::SCH_TEXT(), and DS_DATA_ITEM_TEXT::SyncDrawItems().
|
virtual |
Definition at line 121 of file eda_text.cpp.
References m_shown_text, m_shown_text_has_text_var_refs, m_text, and UnescapeString().
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(), LIB_TEXT::Clone(), createBoard(), PCB_BASE_FRAME::CreateNewFootprint(), SYMBOL_EDIT_FRAME::CreateNewPart(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), dummy(), KIGFX::dummy(), SCH_EDIT_TOOL::Duplicate(), FOOTPRINT::DuplicateItem(), EDA_TEXT_DESC::EDA_TEXT_DESC(), CADSTAR_SCH_ARCHIVE_LOADER::getKiCadSchText(), ALTIUM_PCB::HelperParseDimensions6Leader(), LIB_FIELD::HitTest(), SCH_TEXT::IncrementLabel(), SCH_LEGACY_PLUGIN_CACHE::loadAliases(), CADSTAR_SCH_ARCHIVE_LOADER::loadBusses(), CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets(), SCH_LEGACY_PLUGIN::loadComponent(), 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::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(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary(), SCH_LEGACY_PLUGIN_CACHE::loadText(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), TUNER_SLIDER::onSave(), DIALOG_SHEET_PROPERTIES::OnUpdateUI(), LIB_FIELD::operator=(), EAGLE_PLUGIN::orientFPText(), EAGLE_PLUGIN::packageText(), 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_PART::PlotLibFields(), DIALOG_CHANGE_SYMBOLS::processSymbol(), processTextItem(), SCH_SEXPR_PLUGIN_CACHE::saveDcmInfoAsFields(), CLIPBOARD_IO::SaveSelection(), SCH_COMPONENT::SCH_COMPONENT(), LIB_PART::SetName(), SCH_COMPONENT::SetRef(), FP_TEXT_GRID_TABLE::SetValue(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_EDIT_TEXT::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LABEL_EDITOR::TransferDataFromWindow(), DIALOG_SPICE_MODEL::TransferDataFromWindow(), DIALOG_SHEET_PROPERTIES::TransferDataToWindow(), SCH_SHEET_PATH::UpdateAllScreenReferences(), DIALOG_LIB_EDIT_ONE_FIELD::UpdateField(), DIALOG_SCH_EDIT_ONE_FIELD::UpdateField(), SCH_COMPONENT::UpdateFields(), SCH_SHEET_LIST::UpdateSymbolInstances(), and DIMENSION_BASE::updateText().
|
inlinevirtual |
Reimplemented in DS_DRAW_ITEM_TEXT, FP_TEXT, and PCB_TEXT.
Definition at line 174 of file eda_text.h.
References TEXT_EFFECTS::angle, and m_e.
Referenced by GRAPHICS_IMPORTER_PCBNEW::AddText(), CADSTAR_SCH_ARCHIVE_LOADER::applyToLibraryFieldAttribute(), SCH_GLOBALLABEL::AutoplaceFields(), eagleToKicadAlignment(), CADSTAR_SCH_ARCHIVE_LOADER::getKiCadSchText(), LIB_TEXT::HitTest(), LIB_FIELD::HitTest(), LIB_FIELD::Init(), CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets(), SCH_LEGACY_PLUGIN::loadComponent(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), SCH_LEGACY_PLUGIN_CACHE::loadField(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymbolFieldAttribute(), SCH_LEGACY_PLUGIN_CACHE::loadText(), DIALOG_SHEET_PROPERTIES::OnAddField(), DIALOG_SYMBOL_PROPERTIES::OnAddField(), SCH_ALTIUM_PLUGIN::ParseParameter(), SCH_ALTIUM_PLUGIN::ParsePowerPort(), ALTIUM_PCB::ParseTexts6Data(), SCH_EDIT_TOOL::Rotate(), LIB_TEXT::Rotate(), LIB_FIELD::Rotate(), SCH_GLOBALLABEL::Rotate90(), SetFieldOrientation(), SCH_TEXT::SetLabelSpinStyle(), SCH_GLOBALLABEL::SetLabelSpinStyle(), SCH_HIERLABEL::SetLabelSpinStyle(), PCB_TEXT::SetTextAngle(), FP_TEXT::SetTextAngle(), DS_DRAW_ITEM_TEXT::SetTextAngle(), DIALOG_LIB_EDIT_TEXT::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and DIALOG_EDIT_ONE_FIELD::updateText().
|
inline |
Definition at line 250 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(), FABMASTER::loadFootprints(), FP_TEXT_GRID_TABLE::SetValue(), and DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog().
|
inline |
Definition at line 253 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::applyToLibraryFieldAttribute(), SCH_GLOBALLABEL::AutoplaceFields(), LIB_TEXT::BeginEdit(), LIB_FIELD::BeginEdit(), LIB_FIELD::CalcEdit(), LIB_TEXT::CalcEdit(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), DS_DRAW_ITEM_TEXT::DS_DRAW_ITEM_TEXT(), FP_TEXT::FP_TEXT(), LIB_TEXT::HitTest(), LIB_FIELD::HitTest(), SCH_LEGACY_PLUGIN::loadComponent(), CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), FABMASTER::loadFootprints(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), 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(), SCH_FIELD::Rotate(), LIB_FIELD::Rotate(), DIMENSION_BASE::Rotate(), SCH_TEXT::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(), SCH_COMPONENT::SetRef(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), SCH_COMPONENT::UpdateFields(), DIALOG_EDIT_ONE_FIELD::updateText(), ALIGNED_DIMENSION::updateText(), and ORTHOGONAL_DIMENSION::updateText().
|
inline |
Definition at line 244 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(), dummy(), KIGFX::dummy(), EDA_TEXT(), ALTIUM_PCB::HelperParseDimensions6Leader(), ALTIUM_PCB::HelperParseDimensions6Linear(), LIB_TEXT::LIB_TEXT(), SCH_LEGACY_PLUGIN::loadComponent(), SCH_LEGACY_PLUGIN_CACHE::loadField(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), SCH_EAGLE_PLUGIN::loadFrame(), LEGACY_PLUGIN::loadMODULE_TEXT(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances(), SCH_LEGACY_PLUGIN::loadSheet(), SCH_LEGACY_PLUGIN_CACHE::loadText(), SCH_EAGLE_PLUGIN::loadTextAttributes(), DIALOG_SYMBOL_PROPERTIES::OnAddField(), DIALOG_LIB_SYMBOL_PROPERTIES::OnAddField(), DIALOG_FOOTPRINT_FP_EDITOR::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(), DIMENSION_BASE::SetTextSize(), PCAD2KICAD::SetTextSizeFromStrokeFontHeight(), PCAD2KICAD::SetTextSizeFromTrueTypeFontHeight(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_EDIT_TEXT::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LABEL_EDITOR::TransferDataFromWindow(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_GLOBALLABEL::UpdateIntersheetRefProps(), and DIALOG_EDIT_ONE_FIELD::updateText().
|
inline |
The TextThickness is that set by the user.
The EffectiveTextPenWidth also factors in bold text and thickness clamping.
Definition at line 166 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::HelperParseDimensions6Leader(), ALTIUM_PCB::HelperParseDimensions6Linear(), CADSTAR_SCH_ARCHIVE_LOADER::loadDocumentationSymbols(), FABMASTER::loadFootprints(), LEGACY_PLUGIN::loadMODULE_TEXT(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), SCH_EAGLE_PLUGIN::loadTextAttributes(), DIALOG_FOOTPRINT_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(), FP_TEXT_GRID_TABLE::SetValue(), LIB_TEXT::SetWidth(), LIB_FIELD::SetWidth(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LABEL_EDITOR::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), and SCH_GLOBALLABEL::UpdateIntersheetRefProps().
|
inline |
Definition at line 247 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(), FABMASTER::loadFootprints(), FP_TEXT_GRID_TABLE::SetValue(), and DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog().
|
inline |
Definition at line 256 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::SetEdge().
|
inline |
Definition at line 257 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::SetEdge().
|
inline |
Definition at line 209 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::HelperParseDimensions6Leader(), AUTOPLACER::justifyField(), SCH_LEGACY_PLUGIN::loadComponent(), SCH_LEGACY_PLUGIN_CACHE::loadField(), SCH_EAGLE_PLUGIN::loadFieldAttributes(), LEGACY_PLUGIN::loadMODULE_TEXT(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), SCH_LEGACY_PLUGIN_CACHE::loadText(), SCH_EDIT_TOOL::Mirror(), LIB_TEXT::MirrorHorizontal(), LIB_TEXT::MirrorVertical(), EAGLE_PLUGIN::orientFPText(), EAGLE_PLUGIN::packageText(), SCH_ALTIUM_PLUGIN::ParseDesignator(), SCH_SEXPR_PARSER::parseEDA_TEXT(), PCB_PARSER::parseEDA_TEXT(), SCH_ALTIUM_PLUGIN::ParseFileName(), SCH_ALTIUM_PLUGIN::ParseSheetName(), ALTIUM_PCB::ParseTexts6Data(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), LIB_TEXT::Rotate(), SetEdaTextJustification(), SCH_TEXT::SetLabelSpinStyle(), SCH_HIERLABEL::SetLabelSpinStyle(), PCAD2KICAD::SetTextJustify(), DS_DATA_ITEM_TEXT::SyncDrawItems(), DIALOG_LIB_EDIT_TEXT::TransferDataFromWindow(), and DIALOG_EDIT_ONE_FIELD::updateText().
|
inline |
Definition at line 192 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(), CADSTAR_SCH_ARCHIVE_LOADER::applyToLibraryFieldAttribute(), SCH_EDITOR_CONTROL::AssignFootprints(), PCB_BASE_FRAME::CreateNewFootprint(), EDA_TEXT_DESC::EDA_TEXT_DESC(), LIB_FIELD::Init(), CADSTAR_SCH_ARCHIVE_LOADER::loadBusses(), CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets(), SCH_LEGACY_PLUGIN::loadComponent(), 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(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymbolFieldAttribute(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary(), SCH_LEGACY_PLUGIN_CACHE::loadText(), 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_EDIT_FRAME::RecomputeIntersheetRefs(), SCH_SEXPR_PLUGIN_CACHE::saveDcmInfoAsFields(), SCH_FIELD::SCH_FIELD(), FP_TEXT_GRID_TABLE::SetValueAsBool(), SCH_EDIT_FRAME::ShowAllIntersheetRefs(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow(), and DIALOG_EDIT_ONE_FIELD::updateText().
wxString EDA_TEXT::ShortenedShownText | ( | ) | const |
Returns a shortened version (max 15 characters) of the shown text.
Definition at line 202 of file eda_text.cpp.
References GetShownText().
Referenced by LIB_TEXT::GetSelectMenuText(), PCB_TEXT::GetSelectMenuText(), SCH_FIELD::GetSelectMenuText(), LIB_FIELD::GetSelectMenuText(), SCH_SHEET_PIN::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 151 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 143 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.
Definition at line 376 of file eda_text.cpp.
References EDA_RECT::Contains(), GetTextAngle(), GetTextBox(), GetTextPos(), EDA_RECT::Inflate(), and RotatePoint().
Referenced by LIB_TEXT::HitTest(), PCB_TEXT::HitTest(), LIB_FIELD::HitTest(), DIMENSION_BASE::HitTest(), and DS_DRAW_ITEM_TEXT::HitTest().
|
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.
Definition at line 388 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 353 of file board_items_to_polygon_shape_transform.cpp.
References SHAPE_POLY_SET::Append(), DEFAULT_TEXT_WIDTH, EDA_RECT::GetBottom(), EDA_RECT::GetOrigin(), EDA_RECT::GetRight(), GetText(), GetTextAngle(), GetTextBox(), GetTextPos(), EDA_RECT::Inflate(), Millimeter2iu(), SHAPE_POLY_SET::NewOutline(), and RotatePoint().
Referenced by PCB_TEXT::TransformShapeWithClearanceToPolygon(), and FP_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 584 of file eda_text.cpp.
References addTextSegmToBuffer(), BLACK, color, GetDrawRotation(), GetHorizJustify(), GetLinePositions(), GetShownText(), GetTextPos(), GetTextSize(), GetVertJustify(), GRText(), IsItalic(), IsMirrored(), IsMultilineAllowed(), NULL, and wxStringSplit().
Referenced by GetEffectiveTextShape(), and PNS_KICAD_IFACE_BASE::syncTextItem().
|
private |
Definition at line 393 of file eda_text.h.
Referenced by 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 390 of file eda_text.h.
Referenced by CopyText(), EDA_TEXT(), GetShownText(), Replace(), SetText(), and SwapText().
|
private |
Definition at line 391 of file eda_text.h.
Referenced by CopyText(), EDA_TEXT(), GetShownText(), Replace(), SetText(), and SwapText().
|
private |
Definition at line 389 of file eda_text.h.
Referenced by CopyText(), EDA_TEXT(), Empty(), GetText(), Replace(), SetText(), and SwapText().