c64_painter.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:Pythonista-C64-Painter 作者: superrune 项目源码 文件源码
def preview_drawPixels(self):
        zoomPixels = self.position_pixels()    
        old_img = self.unfilteredPreview
        with ui.ImageContext(Settings.width, Settings.height) as ctx:
            old_img.draw(0,0,Settings.width, Settings.height)
            for i in zoomPixels:
                p = self.pixels[i]
                ui.set_color(p.color)
                pixel_path = ui.Path.rect(p.position[0]*Settings.pixelSize,p.position[1],1*Settings.pixelSize,2)
                pixel_path.line_width = 0.5
                pixel_path.fill()
                #pixel_path.stroke()
            #self.superview['preview'].image = ctx.get_image()
            self.preview_putimg(ctx.get_image())
            return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号