Inkscape view size objects in svg file wrong if don't set viewbox attribute.
--HG-- branch : develop
This commit is contained in:
parent
e3e449f68e
commit
87f2621037
|
@ -425,6 +425,7 @@ void TableWindow::SvgFile(const QString &name) const
|
||||||
QSvgGenerator generator;
|
QSvgGenerator generator;
|
||||||
generator.setFileName(name);
|
generator.setFileName(name);
|
||||||
generator.setSize(paper->rect().size().toSize());
|
generator.setSize(paper->rect().size().toSize());
|
||||||
|
generator.setViewBox(paper->rect());
|
||||||
generator.setTitle("Valentina pattern");
|
generator.setTitle("Valentina pattern");
|
||||||
generator.setDescription(description);
|
generator.setDescription(description);
|
||||||
generator.setResolution(PrintDPI);
|
generator.setResolution(PrintDPI);
|
||||||
|
@ -432,7 +433,7 @@ void TableWindow::SvgFile(const QString &name) const
|
||||||
painter.begin(&generator);
|
painter.begin(&generator);
|
||||||
painter.setFont( QFont( "Arial", 8, QFont::Normal ) );
|
painter.setFont( QFont( "Arial", 8, QFont::Normal ) );
|
||||||
painter.setRenderHint(QPainter::Antialiasing, true);
|
painter.setRenderHint(QPainter::Antialiasing, true);
|
||||||
painter.setPen(QPen(Qt::black, 1.2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
painter.setPen(QPen(Qt::black, toPixel(widthHairLine), Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||||
painter.setBrush ( QBrush ( Qt::NoBrush ) );
|
painter.setBrush ( QBrush ( Qt::NoBrush ) );
|
||||||
tableScene->render(&painter);
|
tableScene->render(&painter);
|
||||||
painter.end();
|
painter.end();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user