SVG plotter: fix hidden text orientation when plot is mirrored.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15422
This commit is contained in:
parent
ea65a5a80b
commit
556120554e
|
@ -828,16 +828,16 @@ void SVG_PLOTTER::Text( const VECTOR2I& aPos,
|
||||||
|
|
||||||
if( !aOrient.IsZero() )
|
if( !aOrient.IsZero() )
|
||||||
{
|
{
|
||||||
fprintf( m_outputFile,
|
fprintf( m_outputFile, "<g transform=\"rotate(%f %.*f %.*f)\">\n",
|
||||||
"<g transform=\"rotate(%f %.*f %.*f)\">\n",
|
m_plotMirror ? aOrient.AsDegrees() : -aOrient.AsDegrees(), m_precision,
|
||||||
- aOrient.AsDegrees(), m_precision, anchor_pos_dev.x, m_precision, anchor_pos_dev.y );
|
anchor_pos_dev.x, m_precision, anchor_pos_dev.y );
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf( m_outputFile, "<text x=\"%.*f\" y=\"%.*f\"\n",
|
fprintf( m_outputFile, "<text x=\"%.*f\" y=\"%.*f\"\n",
|
||||||
m_precision, text_pos_dev.x, m_precision, text_pos_dev.y );
|
m_precision, text_pos_dev.x, m_precision, text_pos_dev.y );
|
||||||
|
|
||||||
/// If the text is mirrored, we should also mirror the hidden text to match
|
/// If the text is mirrored, we should also mirror the hidden text to match
|
||||||
if( aSize.x < 0 )
|
if( m_plotMirror != ( aSize.x < 0 ) )
|
||||||
fprintf( m_outputFile, "transform=\"scale(-1 1) translate(%f 0)\"\n", -2 * text_pos_dev.x );
|
fprintf( m_outputFile, "transform=\"scale(-1 1) translate(%f 0)\"\n", -2 * text_pos_dev.x );
|
||||||
|
|
||||||
fprintf( m_outputFile,
|
fprintf( m_outputFile,
|
||||||
|
|
Loading…
Reference in New Issue