def __init__(self,n):
sur = cairo.ImageSurface(cairo.FORMAT_ARGB32,n,n)
ctx = cairo.Context(sur)
ctx.scale(n,n)
ctx.set_source_rgb(BACK,BACK,BACK)
ctx.rectangle(0,0,1,1)
ctx.fill()
self.sur = sur
self.ctx = ctx
self.colors = ((0,0,0))
self.ncolors = 1
评论列表
文章目录