Mirror hidden text in SVG plotter
We output a 0 opacity text in the SVG plotter to allow searching. When
this text is changed to 100 opacity, it can show up on the user screen
and so needs to be mirrored to match the stroke font output
Fixes https://gitlab.com/kicad/code/kicad/issues/5001
(cherry picked from commit b650e4568b
)
This commit is contained in:
parent
77d7d21130
commit
bce8fb31ab
|
@ -796,10 +796,15 @@ void SVG_PLOTTER::Text( const wxPoint& aPos,
|
|||
}
|
||||
|
||||
fprintf( outputFile,
|
||||
"<text x=\"%g\" y=\"%g\"\n"
|
||||
"<text x=\"%g\" y=\"%g\"\n", text_pos_dev.x, text_pos_dev.y );
|
||||
|
||||
/// If the text is mirrored, we should also mirror the hidden text to match
|
||||
if( aSize.x < 0 )
|
||||
fprintf( outputFile, "transform=\"scale(-1 1) translate(%f 0)\"\n", -2 * text_pos_dev.x );
|
||||
|
||||
fprintf( outputFile,
|
||||
"textLength=\"%g\" font-size=\"%g\" lengthAdjust=\"spacingAndGlyphs\"\n"
|
||||
"text-anchor=\"%s\" opacity=\"0\">%s</text>\n",
|
||||
text_pos_dev.x, text_pos_dev.y,
|
||||
sz_dev.x, sz_dev.y,
|
||||
hjust, TO_UTF8( XmlEsc( aText ) ) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue