camera.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:sappho 作者: lily-mayfield 项目源码 文件源码
def __init__(self, source_resolution, output_resolution,
                 view_resolution, behavior=None):

        """Create a Camera!

        Arguments:
            view_resolution (tuple[int, int]): used to create
                view_rect attribute.

        """

        super(Camera, self).__init__(output_resolution)

        self.source_surface = pygame.surface.Surface(source_resolution,
                                                     pygame.SRCALPHA)
        self.source_resolution = source_resolution
        self.output_resolution = output_resolution
        self.view_rect = pygame.Rect((0, 0), view_resolution)
        self.behavior = behavior or CameraBehavior()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号