def preview_init(self):
path = ui.Path.rect(0, 0, Settings.width, Settings.height)
with ui.ImageContext(Settings.width, Settings.height) as ctx:
ui.set_color((0, 0, 0, 1))
path.fill()
self.superview['preview'].image = ctx.get_image()
return True
评论列表
文章目录