SVG_PLOTTER: fix incorrect bitmaps position is some cases

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22326

Cherry picked by hand.
This commit is contained in:
jean-pierre charras
2025-12-14 14:10:18 +01:00
parent 5071295d34
commit 12d1f5bdd9
+2 -2
View File
@@ -683,10 +683,10 @@ void SVG_PLOTTER::PlotImage( const wxImage& aImage, const VECTOR2I& aPos, double
img_stream.CopyTo( buffer.data(), buffer.size() );
base64::encode( buffer, encoded );
VECTOR2D pos = userToDeviceCoordinates( start );
fprintf( m_outputFile,
"<image x=\"%f\" y=\"%f\" xlink:href=\"data:image/png;base64,",
userToDeviceSize( start.x ),
userToDeviceSize( start.y ) );
pos.x, pos.y );
for( size_t i = 0; i < encoded.size(); i++ )
{