def draw(self):
self.scr_height = self.height
self.scr_width = self.width
path = ui.Path.rect(0, 0, self.scr_width, self.scr_height)
ui.set_color(self.color)
path.fill()
self.x_off = (self.scr_width - (self.img_width*self.ratio/self.scr_cor)) / 2
self.y_off = (self.scr_height - (self.img_height*self.ratio/self.scr_cor)) / 2
self.img.draw(self.x_off,self.y_off,self.img_width*self.ratio/self.scr_cor,self.img_height*self.ratio/self.scr_cor)
评论列表
文章目录