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
This commit is contained in:
parent
0c774aa163
commit
b650e4568b
|
@ -841,10 +841,15 @@ void SVG_PLOTTER::Text( const wxPoint& aPos,
|
|||
}
|
||||
|
||||
fprintf( outputFile,
|
||||
"<text x=\"%f\" y=\"%f\"\n"
|
||||
"<text x=\"%f\" y=\"%f\"\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=\"%f\" font-size=\"%f\" 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