render.py 文件源码

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

项目:py-graphart 作者: dandydarcy 项目源码 文件源码
def _init_cairo(self):
        '''
        Initialize context and image
        '''
        sur = cairo.ImageSurface(cairo.FORMAT_ARGB32, SIZE, SIZE)
        ctx = cairo.Context(sur)
        ctx.scale(SIZE, SIZE)
        ctx.set_source_rgb(BACK, BACK, BACK)
        ctx.rectangle(0, 0, 1, 1)
        ctx.fill()

        self.sur = sur
        self.ctx = ctx
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号