graphics.py 文件源码

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

项目:The-Last-Caturai 作者: geekandtechgirls 项目源码 文件源码
def load_image(path, transparent):
    try: image = pygame.image.load(path)
    # Manages error if image cannot be loaded
    except (pygame.error) as message:
        raise(message)
    # Converting to inner pygame format (more efficient)
    image = image.convert()
    if transparent:
        color = image.get_at((0, 0))
        image.set_colorkey(color, pygame.RLEACCEL)
    return image

# Function to manage texts
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号