mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 02:35:22 +08:00
Refactoring how Camera frame height and width are handled
This commit is contained in:
@ -25,15 +25,14 @@ class MultiCamera(MovingCamera):
|
||||
def update_sub_cameras(self):
|
||||
""" Reshape sub_camera pixel_arrays """
|
||||
for imfc in self.image_mobjects_from_cameras:
|
||||
frame_height, frame_width = self.frame_shape
|
||||
pixel_height, pixel_width = self.get_pixel_array().shape[:2]
|
||||
imfc.camera.frame_shape = (
|
||||
imfc.camera.frame.get_height(),
|
||||
imfc.camera.frame.get_width(),
|
||||
)
|
||||
imfc.camera.reset_pixel_shape((
|
||||
int(pixel_height * imfc.get_height() / frame_height),
|
||||
int(pixel_width * imfc.get_width() / frame_width),
|
||||
int(pixel_height * imfc.get_height() / self.get_frame_height()),
|
||||
int(pixel_width * imfc.get_width() / self.get_frame_width()),
|
||||
))
|
||||
|
||||
def reset(self):
|
||||
|
Reference in New Issue
Block a user