mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Update Scene.get_image to resize window if needed
This commit is contained in:
parent
1dda706335
commit
b99b88fd25
1 changed files with 9 additions and 1 deletions
|
@ -289,7 +289,15 @@ class Scene(object):
|
|||
# Only these methods should touch the camera
|
||||
|
||||
def get_image(self) -> Image:
|
||||
return self.camera.get_image()
|
||||
if self.window is not None:
|
||||
self.window.size = self.camera.get_pixel_shape()
|
||||
self.window.swap_buffers()
|
||||
self.update_frame()
|
||||
self.window.swap_buffers()
|
||||
image = self.camera.get_image()
|
||||
if self.window is not None:
|
||||
self.window.to_default_position()
|
||||
return image
|
||||
|
||||
def show(self) -> None:
|
||||
self.update_frame(ignore_skipping=True)
|
||||
|
|
Loading…
Add table
Reference in a new issue