def Render(self, filename, width=256, height=256):
     canvas = Canvas.LibraryCanvas()
     surface = canvas.Render(self.parent, width, height)
     surface.write_to_png(filename)
Exemplo n.º 2
0
 def Render(self, filename, width=256, height=256):
     canvas = Canvas.LibraryCanvas()
     canvas.Origin(width / 2, height / 2)
     canvas.Viewport(width, height)
     surface = canvas.RenderFit(self.parent)
     surface.write_to_png(filename)