gui.py 文件源码

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

项目:python-sense-emu 作者: RPi-Distro 项目源码 文件源码
def drawn(self, widget, cr):
        if self._draw_image is None:
            return
        with self._size_lock:
            img = self._draw_image
            if self._show_orientation:
                img = img.copy()
                self._orient_scaled.composite(
                    img, 0, 0, img.props.width, img.props.height, 0, 0, 1, 1,
                    GdkPixbuf.InterpType.NEAREST, 215)
        img = img.rotate_simple(self._rotation)
        rect = self.get_allocation()
        Gdk.cairo_set_source_pixbuf(cr, img,
            (rect.width - img.props.width) // 2,
            (rect.height - img.props.height) // 2)
        cr.paint()
        self._draw_pending.clear()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号