parent
796cd7079e
commit
1e1488e290
|
@ -328,7 +328,7 @@ void TableWindow::SvgFile(const QString &name, int i) const
|
|||
painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthHairLine()), Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin));
|
||||
painter.setBrush ( QBrush ( Qt::NoBrush ) );
|
||||
scenes.at(i)->render(&painter);
|
||||
scenes.at(i)->render(&painter, paper->rect(), paper->rect(), Qt::IgnoreAspectRatio);
|
||||
painter.end();
|
||||
}
|
||||
}
|
||||
|
@ -345,7 +345,7 @@ void TableWindow::PngFile(const QString &name, int i) const
|
|||
{
|
||||
const QRectF r = paper->rect();
|
||||
// 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
|
||||
QPainter painter(&image);
|
||||
painter.setFont( QFont( "Arial", 8, QFont::Normal ) );
|
||||
|
@ -353,7 +353,7 @@ void TableWindow::PngFile(const QString &name, int i) const
|
|||
painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthMainLine()), Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin));
|
||||
painter.setBrush ( QBrush ( Qt::NoBrush ) );
|
||||
scenes.at(i)->render(&painter, r, r);
|
||||
scenes.at(i)->render(&painter, r, r, Qt::IgnoreAspectRatio);
|
||||
image.save(name);
|
||||
}
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ void TableWindow::PdfFile(const QString &name, int i) const
|
|||
painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthMainLine()), Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin));
|
||||
painter.setBrush ( QBrush ( Qt::NoBrush ) );
|
||||
scenes.at(i)->render(&painter);
|
||||
scenes.at(i)->render(&painter, r, r, Qt::IgnoreAspectRatio);
|
||||
painter.end();
|
||||
}
|
||||
}
|
||||
|
@ -462,7 +462,7 @@ void TableWindow::ObjFile(const QString &name, int i) const
|
|||
generator.setResolution(static_cast<int>(qApp->PrintDPI));
|
||||
QPainter painter;
|
||||
painter.begin(&generator);
|
||||
scenes.at(i)->render(&painter);
|
||||
scenes.at(i)->render(&painter, paper->rect(), paper->rect(), Qt::IgnoreAspectRatio);
|
||||
painter.end();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user