+ support of arbitrary background colors in snapshot function

This commit is contained in:
wmayer
2014-11-08 18:23:41 +01:00
parent a6b918b276
commit 303f00a06d
7 changed files with 56 additions and 120 deletions

View File

@@ -518,7 +518,8 @@ void View3DInventor::print(QPrinter* printer)
ps = SoVectorizeAction::A4;
break;
}
_viewer->saveGraphic(ps,View3DInventorViewer::White,&action);
QColor c = Qt::white;
_viewer->saveGraphic(ps,c,&action);
out->closeFile();
QSvgRenderer svg;
if (svg.load(QString::fromUtf8(tmp.c_str()))) {
@@ -537,7 +538,7 @@ void View3DInventor::print(QPrinter* printer)
}
else {
try {
_viewer->savePicture(rect.width(), rect.height(), View3DInventorViewer::White, img);
_viewer->savePicture(rect.width(), rect.height(), QColor(Qt::white), img);
}
catch (...) {
previewFromFramebuffer(rect, img);