Skip to content

Commit

Permalink
fix(RenderWindow): Fix screenshots with scaling or size argument
Browse files Browse the repository at this point in the history
  • Loading branch information
bruyeret authored and finetjul committed Oct 4, 2024
1 parent fdfa437 commit 9ab7ac8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/Rendering/OpenGL/RenderWindow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ function vtkOpenGLRenderWindow(publicAPI, model) {
// remember the main canvas original size, then resize it
model._screenshot.originalSize = model.size;
model.size = model._screenshot.size;
model.rootOpenGLRenderWindow?.resizeFromChildRenderWindows();
model._screenshot.size = null;

// process the resize
Expand Down Expand Up @@ -1075,10 +1076,10 @@ function vtkOpenGLRenderWindow(publicAPI, model) {
model.renderPasses[index].traverse(publicAPI, null);
}
}
publicAPI.copyParentContent();
if (model.notifyStartCaptureImage) {
getCanvasDataURL();
}
publicAPI.copyParentContent();
const childrenRW = model.renderable.getChildRenderWindowsByReference();
for (let i = 0; i < childrenRW.length; ++i) {
publicAPI.getViewNodeFor(childrenRW[i])?.traverseAllPasses();
Expand Down

0 comments on commit 9ab7ac8

Please sign in to comment.