diff --git a/eeschema/sch_plugins/altium/altium_parser_sch.cpp b/eeschema/sch_plugins/altium/altium_parser_sch.cpp index 6cf220ec3a..811825f58b 100644 --- a/eeschema/sch_plugins/altium/altium_parser_sch.cpp +++ b/eeschema/sch_plugins/altium/altium_parser_sch.cpp @@ -299,8 +299,8 @@ ASCH_TEXT_FRAME::ASCH_TEXT_FRAME( const std::map& aProps ) : Location = VECTOR2I( ReadKiCadUnitFrac( aProps, "LOCATION.X" ), -ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) ); - Size = wxSize( ReadKiCadUnitFrac( aProps, "CORNER.X" ) - Location.x, - -ReadKiCadUnitFrac( aProps, "CORNER.Y" ) - Location.y ); + Size = VECTOR2I( ReadKiCadUnitFrac( aProps, "CORNER.X" ) - Location.x, + -ReadKiCadUnitFrac( aProps, "CORNER.Y" ) - Location.y ); Text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" ); Text.Replace( "~1", "\n", true ); @@ -405,7 +405,7 @@ ASCH_ROUND_RECTANGLE::ASCH_ROUND_RECTANGLE( const std::map& TopRight = VECTOR2I( ReadKiCadUnitFrac( aProps, "CORNER.X" ), -ReadKiCadUnitFrac( aProps, "CORNER.Y" ) ); - CornerRadius = wxSize( ReadKiCadUnitFrac( aProps, "CORNERXRADIUS" ), + CornerRadius = VECTOR2I( ReadKiCadUnitFrac( aProps, "CORNERXRADIUS" ), -ReadKiCadUnitFrac( aProps, "CORNERYRADIUS" ) ); } diff --git a/eeschema/sch_plugins/altium/altium_parser_sch.h b/eeschema/sch_plugins/altium/altium_parser_sch.h index ba4ada22d1..6546d1a9dc 100644 --- a/eeschema/sch_plugins/altium/altium_parser_sch.h +++ b/eeschema/sch_plugins/altium/altium_parser_sch.h @@ -382,7 +382,7 @@ struct ASCH_HYPERLINK : ASCH_LABEL struct ASCH_TEXT_FRAME : ASCH_OWNER_INTERFACE { VECTOR2I Location; - wxSize Size; + VECTOR2I Size; // have both coordinates, for convenience VECTOR2I BottomLeft; @@ -464,7 +464,7 @@ struct ASCH_ROUND_RECTANGLE : ASCH_OWNER_INTERFACE, ASCH_FILL_INTERFACE, ASCH_BO VECTOR2I BottomLeft; VECTOR2I TopRight; - wxSize CornerRadius; + VECTOR2I CornerRadius; bool IsTransparent; diff --git a/eeschema/sch_plugins/altium/sch_altium_plugin.cpp b/eeschema/sch_plugins/altium/sch_altium_plugin.cpp index ce46e3381a..aaafd27f2e 100644 --- a/eeschema/sch_plugins/altium/sch_altium_plugin.cpp +++ b/eeschema/sch_plugins/altium/sch_altium_plugin.cpp @@ -1804,14 +1804,14 @@ void SCH_ALTIUM_PLUGIN::ParseRoundRectangle( const std::map& LIB_SHAPE* rect = nullptr; // If it is a circle, make it a circle - if( std::abs( elem.CornerRadius.GetX() ) + if( std::abs( elem.CornerRadius.x ) >= std::abs( elem.TopRight.x - elem.BottomLeft.x ) / 2 - && std::abs( elem.CornerRadius.GetY() ) + && std::abs( elem.CornerRadius.y ) >= std::abs( elem.TopRight.y - elem.BottomLeft.y ) / 2 ) { rect = new LIB_SHAPE( symbol, SHAPE_T::CIRCLE ); rect->SetPosition( GetLibEditPosition( ( sheetTopRight + sheetBottomLeft ) / 2 ) ); - rect->SetEnd( VECTOR2I( rect->GetPosition().x + std::abs( elem.CornerRadius.GetX() ), + rect->SetEnd( VECTOR2I( rect->GetPosition().x + std::abs( elem.CornerRadius.x ), rect->GetPosition().y ) ); }