GenerateSvg: Corrected view:
Some checks failed
Auto-build doxygen docs / doxygen (push) Failing after 2m28s
Auto-build doxygen docs / deploy (push) Has been skipped

The contents of svg export is not correctly centered within the exported
area, thanks Tom
https://qelectrotech.org/forum/viewtopic.php?pid=22781#p22781
This commit is contained in:
Laurent Trinques
2026-04-23 09:49:42 +02:00
parent 145810f33a
commit 416ec501fe

View File

@@ -418,7 +418,8 @@ void ExportDialog::generateSvg(
// "joue" la QPicture sur un QSvgGenerator
QSvgGenerator svg_engine;
svg_engine.setSize(QSize((width*9/16), (height*9/16)));
svg_engine.setSize(QSize(width, height));
svg_engine.setViewBox(QRect(0, 0, width*0.75, height*0.75));
svg_engine.setOutputDevice(&io_device);
QPainter svg_painter(&svg_engine);
picture.play(&svg_painter);