PCAD: Handle mirrored text
Mirrored text rotates clockwise in the mirror, so we need to invert the
sign for aligning mirrored PCAD text
Fixes https://gitlab.com/kicad/code/kicad/issues/3992
(cherry picked from commit 058fb3afa1
)
This commit is contained in:
parent
ce2c5d6528
commit
a60c339f85
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2008 Lubo Racko <developer@lura.sk>
|
* Copyright (C) 2007, 2008 Lubo Racko <developer@lura.sk>
|
||||||
* Copyright (C) 2007, 2008, 2012 Alexander Lunev <al.lunev@yahoo.com>
|
* Copyright (C) 2007, 2008, 2012 Alexander Lunev <al.lunev@yahoo.com>
|
||||||
* Copyright (C) 2012 KiCad Developers, see CHANGELOG.TXT for contributors.
|
* Copyright (C) 2012-2020 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -117,7 +117,6 @@ void PCB_TEXT::AddToBoard()
|
||||||
|
|
||||||
pcbtxt->SetItalic( m_name.isItalic );
|
pcbtxt->SetItalic( m_name.isItalic );
|
||||||
pcbtxt->SetThickness( m_name.textstrokeWidth );
|
pcbtxt->SetThickness( m_name.textstrokeWidth );
|
||||||
pcbtxt->SetTextAngle( m_name.textRotation );
|
|
||||||
|
|
||||||
SetTextJustify( pcbtxt, m_name.justify );
|
SetTextJustify( pcbtxt, m_name.justify );
|
||||||
pcbtxt->SetTextPos( wxPoint( m_name.textPositionX,
|
pcbtxt->SetTextPos( wxPoint( m_name.textPositionX,
|
||||||
|
@ -126,6 +125,11 @@ void PCB_TEXT::AddToBoard()
|
||||||
pcbtxt->SetMirrored( m_name.mirror );
|
pcbtxt->SetMirrored( m_name.mirror );
|
||||||
pcbtxt->SetTimeStamp( 0 );
|
pcbtxt->SetTimeStamp( 0 );
|
||||||
|
|
||||||
|
if( pcbtxt->IsMirrored() )
|
||||||
|
pcbtxt->SetTextAngle( 3600.0 - m_name.textRotation );
|
||||||
|
else
|
||||||
|
pcbtxt->SetTextAngle( m_name.textRotation );
|
||||||
|
|
||||||
pcbtxt->SetLayer( m_KiCadLayer );
|
pcbtxt->SetLayer( m_KiCadLayer );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue