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
This commit is contained in:
parent
0417a6b409
commit
058fb3afa1
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2007, 2008 Lubo Racko <developer@lura.sk>
|
||||
* 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
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -116,7 +116,6 @@ void PCB_TEXT::AddToBoard()
|
|||
|
||||
pcbtxt->SetItalic( m_name.isItalic );
|
||||
pcbtxt->SetThickness( m_name.textstrokeWidth );
|
||||
pcbtxt->SetTextAngle( m_name.textRotation );
|
||||
|
||||
SetTextJustify( pcbtxt, m_name.justify );
|
||||
pcbtxt->SetTextPos( wxPoint( m_name.textPositionX,
|
||||
|
@ -124,6 +123,11 @@ void PCB_TEXT::AddToBoard()
|
|||
|
||||
pcbtxt->SetMirrored( m_name.mirror );
|
||||
|
||||
if( pcbtxt->IsMirrored() )
|
||||
pcbtxt->SetTextAngle( 3600.0 - m_name.textRotation );
|
||||
else
|
||||
pcbtxt->SetTextAngle( m_name.textRotation );
|
||||
|
||||
pcbtxt->SetLayer( m_KiCadLayer );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue