SVG_PLOTTER: fix incorrect bitmaps position is some cases

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22326
This commit is contained in:
jean-pierre charras
2025-12-14 12:44:21 +01:00
parent 03f37589b9
commit f27a14b424
+2 -3
View File
@@ -685,10 +685,9 @@ 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 );
fmt::print( m_outputFile,
"<image x=\"{:f}\" y=\"{:f}\" xlink:href=\"data:image/png;base64,",
userToDeviceSize( start.x ),
userToDeviceSize( start.y ) );
"<image x=\"{:f}\" y=\"{:f}\" xlink:href=\"data:image/png;base64,", pos.x, pos.y );
for( size_t i = 0; i < encoded.size(); i++ )
{