mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-03 03:49:59 +02:00
GenerateSvg: Corrected view:
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user