Esempio n. 1
0
 def __init__(self, *cameras_with_start_positions, **kwargs):
     self.shifted_cameras = [
         DictAsObject(
             {
                 "camera": camera_with_start_positions[0],
                 "start_x": camera_with_start_positions[1][1],
                 "start_y": camera_with_start_positions[1][0],
                 "end_x": camera_with_start_positions[1][1] + camera_with_start_positions[0].get_pixel_width(),
                 "end_y": camera_with_start_positions[1][0] + camera_with_start_positions[0].get_pixel_height(),
             })
         for camera_with_start_positions in cameras_with_start_positions
     ]
     Camera.__init__(self, **kwargs)
Esempio n. 2
0
 def __init__(self, frame=None, **kwargs):
     """
     frame is a Mobject, (should almost certainly be a rectangle)
     determining which region of space the camera displys
     """
     digest_config(self, kwargs)
     if frame is None:
         frame = ScreenRectangle(height=FRAME_HEIGHT)
         frame.set_stroke(
             self.default_frame_stroke_color,
             self.default_frame_stroke_width,
         )
     self.frame = frame
     Camera.__init__(self, **kwargs)
Esempio n. 3
0
 def __init__(self, *cameras_with_start_positions, **kwargs):
     self.shifted_cameras = [
         DictAsObject({
             "camera":
             camera_with_start_positions[0],
             "start_x":
             camera_with_start_positions[1][1],
             "start_y":
             camera_with_start_positions[1][0],
             "end_x":
             camera_with_start_positions[1][1] +
             camera_with_start_positions[0].get_pixel_width(),
             "end_y":
             camera_with_start_positions[1][0] +
             camera_with_start_positions[0].get_pixel_height(),
         }) for camera_with_start_positions in cameras_with_start_positions
     ]
     Camera.__init__(self, **kwargs)
 def __init__(self, frame_retrieval, index=0, manager=None):
     Camera.__init__(self, frame_retrieval)
     self.index = index
     self.manager = manager