mirror of
https://gitlab.com/smart-pattern/valentina.git
synced 2024-10-04 14:21:34 +02:00
parent
5ebcd1caba
commit
c989124772
|
@ -509,7 +509,7 @@ void MainWindowsNoGUI::SvgFile(const QString &name, int i) const
|
||||||
painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthHairLine()), Qt::SolidLine, Qt::RoundCap,
|
painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthHairLine()), Qt::SolidLine, Qt::RoundCap,
|
||||||
Qt::RoundJoin));
|
Qt::RoundJoin));
|
||||||
painter.setBrush ( QBrush ( Qt::NoBrush ) );
|
painter.setBrush ( QBrush ( Qt::NoBrush ) );
|
||||||
scenes.at(i)->render(&painter);
|
scenes.at(i)->render(&painter, paper->rect(), paper->rect(), Qt::IgnoreAspectRatio);
|
||||||
painter.end();
|
painter.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -526,7 +526,7 @@ void MainWindowsNoGUI::PngFile(const QString &name, int i) const
|
||||||
{
|
{
|
||||||
const QRectF r = paper->rect();
|
const QRectF r = paper->rect();
|
||||||
// Create the image with the exact size of the shrunk scene
|
// Create the image with the exact size of the shrunk scene
|
||||||
QImage image(QSize(static_cast<qint32>(r.width()), static_cast<qint32>(r.height())), QImage::Format_ARGB32);
|
QImage image(r.size().toSize(), QImage::Format_ARGB32);
|
||||||
image.fill(Qt::transparent); // Start all pixels transparent
|
image.fill(Qt::transparent); // Start all pixels transparent
|
||||||
QPainter painter(&image);
|
QPainter painter(&image);
|
||||||
painter.setFont( QFont( "Arial", 8, QFont::Normal ) );
|
painter.setFont( QFont( "Arial", 8, QFont::Normal ) );
|
||||||
|
@ -534,7 +534,7 @@ void MainWindowsNoGUI::PngFile(const QString &name, int i) const
|
||||||
painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthMainLine()), Qt::SolidLine, Qt::RoundCap,
|
painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthMainLine()), Qt::SolidLine, Qt::RoundCap,
|
||||||
Qt::RoundJoin));
|
Qt::RoundJoin));
|
||||||
painter.setBrush ( QBrush ( Qt::NoBrush ) );
|
painter.setBrush ( QBrush ( Qt::NoBrush ) );
|
||||||
scenes.at(i)->render(&painter, r, r);
|
scenes.at(i)->render(&painter, r, r, Qt::IgnoreAspectRatio);
|
||||||
image.save(name);
|
image.save(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -578,7 +578,7 @@ void MainWindowsNoGUI::PdfFile(const QString &name, int i) const
|
||||||
painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthMainLine()), Qt::SolidLine, Qt::RoundCap,
|
painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthMainLine()), Qt::SolidLine, Qt::RoundCap,
|
||||||
Qt::RoundJoin));
|
Qt::RoundJoin));
|
||||||
painter.setBrush ( QBrush ( Qt::NoBrush ) );
|
painter.setBrush ( QBrush ( Qt::NoBrush ) );
|
||||||
scenes.at(i)->render(&painter);
|
scenes.at(i)->render(&painter, r, r, Qt::IgnoreAspectRatio);
|
||||||
painter.end();
|
painter.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -654,7 +654,7 @@ void MainWindowsNoGUI::ObjFile(const QString &name, int i) const
|
||||||
generator.setResolution(static_cast<int>(qApp->PrintDPI));
|
generator.setResolution(static_cast<int>(qApp->PrintDPI));
|
||||||
QPainter painter;
|
QPainter painter;
|
||||||
painter.begin(&generator);
|
painter.begin(&generator);
|
||||||
scenes.at(i)->render(&painter);
|
scenes.at(i)->render(&painter, paper->rect(), paper->rect(), Qt::IgnoreAspectRatio);
|
||||||
painter.end();
|
painter.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue