Fix Eagle plugin board free text rotation import bug.
When using angle's other than 90, 180, and 270, the Eagle plugin did not correctly set the text angle.
This commit is contained in:
parent
c4ea54227e
commit
a208ba6566
|
@ -1510,6 +1510,26 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics )
|
|||
pcbtxt->SetTextAngle( sign * 90 * 10 );
|
||||
align = ETEXT::TOP_RIGHT;
|
||||
}
|
||||
else // Ok so text is not at 90,180 or 270 so do some funny stuf to get placement right
|
||||
{
|
||||
if( ( degrees > 0 ) && ( degrees < 90 ) )
|
||||
pcbtxt->SetTextAngle( sign * t.rot->degrees * 10 );
|
||||
else if( ( degrees > 90 ) && ( degrees < 180 ) )
|
||||
{
|
||||
pcbtxt->SetTextAngle( sign * ( t.rot->degrees + 180 ) * 10 );
|
||||
align = ETEXT::TOP_RIGHT;
|
||||
}
|
||||
else if( ( degrees > 180 ) && ( degrees < 270 ) )
|
||||
{
|
||||
pcbtxt->SetTextAngle( sign * ( t.rot->degrees - 180 ) * 10 );
|
||||
align = ETEXT::TOP_RIGHT;
|
||||
}
|
||||
else if( ( degrees > 270 ) && ( degrees < 360 ) )
|
||||
{
|
||||
pcbtxt->SetTextAngle( sign * t.rot->degrees * 10 );
|
||||
align = ETEXT::BOTTOM_LEFT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch( align )
|
||||
|
|
Loading…
Reference in New Issue