altium: it is always a good idea to test rotation with non 90° angles
This commit is contained in:
parent
aaa3f9eb74
commit
a4fd993a4b
|
@ -280,6 +280,11 @@ ACOMPONENT6::ACOMPONENT6( ALTIUM_PARSER& aReader )
|
||||||
sourcelibreference =
|
sourcelibreference =
|
||||||
ALTIUM_PARSER::PropertiesReadString( properties, "SOURCELIBREFERENCE", "" );
|
ALTIUM_PARSER::PropertiesReadString( properties, "SOURCELIBREFERENCE", "" );
|
||||||
|
|
||||||
|
nameautoposition = static_cast<ALTIUM_TEXT_POSITION>(
|
||||||
|
ALTIUM_PARSER::PropertiesReadInt( properties, "NAMEAUTOPOSITION", 0 ) );
|
||||||
|
commentautoposition = static_cast<ALTIUM_TEXT_POSITION>(
|
||||||
|
ALTIUM_PARSER::PropertiesReadInt( properties, "COMMENTAUTOPOSITION", 0 ) );
|
||||||
|
|
||||||
if( aReader.HasParsingError() )
|
if( aReader.HasParsingError() )
|
||||||
{
|
{
|
||||||
THROW_IO_ERROR( "Components6 stream was not parsed correctly" );
|
THROW_IO_ERROR( "Components6 stream was not parsed correctly" );
|
||||||
|
|
|
@ -170,6 +170,7 @@ enum class ALTIUM_POLYGON_HATCHSTYLE
|
||||||
|
|
||||||
enum class ALTIUM_TEXT_POSITION
|
enum class ALTIUM_TEXT_POSITION
|
||||||
{
|
{
|
||||||
|
MANUAL = 0, // only relevant for NAMEAUTOPOSITION and COMMENTAUTOPOSITION
|
||||||
LEFT_TOP = 1,
|
LEFT_TOP = 1,
|
||||||
LEFT_CENTER = 2,
|
LEFT_CENTER = 2,
|
||||||
LEFT_BOTTOM = 3,
|
LEFT_BOTTOM = 3,
|
||||||
|
@ -358,6 +359,10 @@ struct ACOMPONENT6
|
||||||
wxString sourcefootprintlibrary;
|
wxString sourcefootprintlibrary;
|
||||||
wxString sourcecomponentlibrary;
|
wxString sourcecomponentlibrary;
|
||||||
wxString sourcelibreference;
|
wxString sourcelibreference;
|
||||||
|
|
||||||
|
ALTIUM_TEXT_POSITION nameautoposition;
|
||||||
|
ALTIUM_TEXT_POSITION commentautoposition;
|
||||||
|
|
||||||
explicit ACOMPONENT6( ALTIUM_PARSER& aReader );
|
explicit ACOMPONENT6( ALTIUM_PARSER& aReader );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2061,7 +2061,7 @@ void ALTIUM_PCB::ParseTexts6Data(
|
||||||
{
|
{
|
||||||
double orientation =
|
double orientation =
|
||||||
static_cast<const MODULE*>( txm->GetParent() )->GetOrientation();
|
static_cast<const MODULE*>( txm->GetParent() )->GetOrientation();
|
||||||
txm->SetTextAngle( orientation + txm->GetTextAngle() );
|
txm->SetTextAngle( txm->GetTextAngle() - orientation );
|
||||||
txm->SetLocalCoord();
|
txm->SetLocalCoord();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue