diff --git a/common/eda_text.cpp b/common/eda_text.cpp index 31bd477af6..e31cadb7ab 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -344,7 +344,7 @@ void EDA_TEXT::SetLineSpacing( double aLineSpacing ) } -void EDA_TEXT::SetTextSize( const wxSize& aNewSize ) +void EDA_TEXT::SetTextSize( const VECTOR2I& aNewSize ) { m_attributes.m_Size = aNewSize; ClearRenderCache(); diff --git a/eeschema/fields_grid_table.cpp b/eeschema/fields_grid_table.cpp index 2018e8664c..252155ac9f 100644 --- a/eeschema/fields_grid_table.cpp +++ b/eeschema/fields_grid_table.cpp @@ -530,7 +530,7 @@ wxString FIELDS_GRID_TABLE::GetValue( int aRow, int aCol ) return StringFromBool( field.IsBold() ); case FDC_TEXT_SIZE: - return StringFromValue( m_frame->GetUserUnits(), field.GetTextSize().GetHeight(), true ); + return StringFromValue( m_frame->GetUserUnits(), field.GetTextHeight(), true ); case FDC_ORIENTATION: if( field.GetTextAngle().IsHorizontal() ) diff --git a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp index e2f0abfc4d..2acf744561 100644 --- a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp +++ b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp @@ -2827,9 +2827,9 @@ LIB_SYMBOL* CADSTAR_SCH_ARCHIVE_LOADER::getScaledLibPart( const LIB_SYMBOL* aSym }; auto scaleSize = - [&]( wxSize aSize ) -> wxSize + [&]( VECTOR2I aSize ) -> VECTOR2I { - return wxSize( scaleLen( aSize.x ), scaleLen( aSize.y ) ); + return VECTOR2I( scaleLen( aSize.x ), scaleLen( aSize.y ) ); }; LIB_ITEMS_CONTAINER& items = retval->GetDrawItems(); diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index 2a582a3b01..1ca99d3a2a 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -569,9 +569,9 @@ int SCH_SHEET::GetPenWidth() const void SCH_SHEET::AutoplaceFields( SCH_SCREEN* aScreen, bool aManual ) { - wxSize textSize = m_fields[ SHEETNAME ].GetTextSize(); - int borderMargin = KiROUND( GetPenWidth() / 2.0 ) + 4; - int margin = borderMargin + KiROUND( std::max( textSize.x, textSize.y ) * 0.5 ); + VECTOR2I textSize = m_fields[SHEETNAME].GetTextSize(); + int borderMargin = KiROUND( GetPenWidth() / 2.0 ) + 4; + int margin = borderMargin + KiROUND( std::max( textSize.x, textSize.y ) * 0.5 ); if( IsVerticalOrientation() ) { diff --git a/include/eda_text.h b/include/eda_text.h index fc147d13fc..9c0ed98bc5 100644 --- a/include/eda_text.h +++ b/include/eda_text.h @@ -192,9 +192,8 @@ public: void SetLineSpacing( double aLineSpacing ); double GetLineSpacing() const { return m_attributes.m_LineSpacing; } - void SetTextSize( const wxSize& aNewSize ); - wxSize GetTextSize() const { return wxSize( m_attributes.m_Size.x, - m_attributes.m_Size.y ); } + void SetTextSize( const VECTOR2I& aNewSize ); + VECTOR2I GetTextSize() const { return m_attributes.m_Size; } void SetTextWidth( int aWidth ); int GetTextWidth() const { return m_attributes.m_Size.x; } diff --git a/include/font/text_attributes.h b/include/font/text_attributes.h index 1410885b2a..7a43820dab 100644 --- a/include/font/text_attributes.h +++ b/include/font/text_attributes.h @@ -76,7 +76,7 @@ public: bool m_Visible = true; bool m_Mirrored = false; bool m_Multiline = true; - VECTOR2D m_Size; + VECTOR2I m_Size; /** * If true, keep rotation angle between -90...90 degrees for readability diff --git a/pcbnew/plugins/eagle/eagle_plugin.cpp b/pcbnew/plugins/eagle/eagle_plugin.cpp index dd22a26bd8..96a0da47f5 100644 --- a/pcbnew/plugins/eagle/eagle_plugin.cpp +++ b/pcbnew/plugins/eagle/eagle_plugin.cpp @@ -1678,8 +1678,8 @@ void EAGLE_PLUGIN::orientFPText( FOOTPRINT* aFootprint, const EELEMENT& e, FP_TE if( a.ratio ) ratio = *a.ratio; - wxSize fontz = aFPText->GetTextSize(); - int textThickness = KiROUND( fontz.y * ratio / 100 ); + VECTOR2I fontz = aFPText->GetTextSize(); + int textThickness = KiROUND( fontz.y * ratio / 100 ); aFPText->SetTextThickness( textThickness ); if( a.size )