def drawTrace(self):
data = np.zeros((256, 256), dtype=np.uint8)
surface = cairo.ImageSurface.create_for_data(data,cairo.FORMAT_A8,256,256)
context = cairo.Context(surface)
t = [np.zeros((256,256))]
for l in self.lines:
l.draw(context)
t.append(np.flip(data, 0)/255.0)
return t
评论列表
文章目录