Skip to content

Commit 9ab7ac8

Browse files
bruyeretfinetjul
authored andcommitted
fix(RenderWindow): Fix screenshots with scaling or size argument
1 parent fdfa437 commit 9ab7ac8

File tree

1 file changed

+2
-1
lines changed
  • Sources/Rendering/OpenGL/RenderWindow

1 file changed

+2
-1
lines changed

Sources/Rendering/OpenGL/RenderWindow/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ function vtkOpenGLRenderWindow(publicAPI, model) {
598598
// remember the main canvas original size, then resize it
599599
model._screenshot.originalSize = model.size;
600600
model.size = model._screenshot.size;
601+
model.rootOpenGLRenderWindow?.resizeFromChildRenderWindows();
601602
model._screenshot.size = null;
602603

603604
// process the resize
@@ -1075,10 +1076,10 @@ function vtkOpenGLRenderWindow(publicAPI, model) {
10751076
model.renderPasses[index].traverse(publicAPI, null);
10761077
}
10771078
}
1079+
publicAPI.copyParentContent();
10781080
if (model.notifyStartCaptureImage) {
10791081
getCanvasDataURL();
10801082
}
1081-
publicAPI.copyParentContent();
10821083
const childrenRW = model.renderable.getChildRenderWindowsByReference();
10831084
for (let i = 0; i < childrenRW.length; ++i) {
10841085
publicAPI.getViewNodeFor(childrenRW[i])?.traverseAllPasses();

0 commit comments

Comments
 (0)