Use current background to save to image when not using color gradient
This commit is contained in:
parent
76ff41ee17
commit
9548d347a4
|
@ -525,9 +525,14 @@ void View3DInventorViewer::savePicture(const char* filename, int w, int h,
|
|||
// if we use transparency then we must not set a background color
|
||||
switch(eBackgroundType){
|
||||
case Current:
|
||||
useBackground = true;
|
||||
cb = new SoCallback;
|
||||
cb->setCallback(clearBuffer);
|
||||
if (backgroundroot->findChild(pcBackGround) == -1) {
|
||||
renderer.setBackgroundColor(this->getBackgroundColor());
|
||||
}
|
||||
else {
|
||||
useBackground = true;
|
||||
cb = new SoCallback;
|
||||
cb->setCallback(clearBuffer);
|
||||
}
|
||||
break;
|
||||
case White:
|
||||
renderer.setBackgroundColor( SbColor(1.0, 1.0, 1.0) );
|
||||
|
@ -595,9 +600,14 @@ void View3DInventorViewer::savePicture(int w, int h, int eBackgroundType, QImage
|
|||
// if we use transparency then we must not set a background color
|
||||
switch(eBackgroundType){
|
||||
case Current:
|
||||
useBackground = true;
|
||||
cb = new SoCallback;
|
||||
cb->setCallback(clearBuffer);
|
||||
if (backgroundroot->findChild(pcBackGround) == -1) {
|
||||
renderer.setBackgroundColor(this->getBackgroundColor());
|
||||
}
|
||||
else {
|
||||
useBackground = true;
|
||||
cb = new SoCallback;
|
||||
cb->setCallback(clearBuffer);
|
||||
}
|
||||
break;
|
||||
case White:
|
||||
renderer.setBackgroundColor( SbColor(1.0, 1.0, 1.0) );
|
||||
|
|
Loading…
Reference in New Issue
Block a user