Beispiel #1
0
 def setup_zoomed_camera(self):
     self.little_rectangle = self.big_rectangle.copy()
     self.little_rectangle.scale(1. / self.zoom_factor)
     self.little_rectangle.move_to(self.little_rectangle_start_position)
     self.zoomed_camera = MovingCamera(
         self.little_rectangle,
         pixel_shape=self.zoomed_canvas_pixel_shape,
         background=self.zoomed_camera_background)
     self.add(self.little_rectangle)
     #TODO, is there a better way to hanld this?
     self.zoomed_camera.adjusted_thickness = lambda x: x
Beispiel #2
0
 def setup(self):
     self.camera_frame = ScreenRectangle(height=2 * SPACE_HEIGHT)
     self.camera_frame.set_stroke(width=0)
     self.camera = MovingCamera(self.camera_frame, **self.camera_config)
     return self