utils.py 文件源码

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

项目:draobpilc 作者: awamper 项目源码 文件源码
def get_widget_screenshot(widget):
    window = widget.get_window()
    if not window: return None

    allocation = widget.get_allocation()
    pixbuf = Gdk.pixbuf_get_from_window(
        window,
        allocation.x,
        allocation.y,
        allocation.width,
        allocation.height
    )

    if not pixbuf:
        return None
    else:
        return pixbuf
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号