funcs_any_win.py 文件源码

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

项目:petronia 作者: groboclown 项目源码 文件源码
def paint__draw_rect(hdc, pos_x, pos_y, width, height, color):
    rect = wintypes.RECT()
    rect.left = pos_x
    rect.top = pos_y
    rect.right = pos_x + width
    rect.bottom = pos_y + height
    fill_rgb = wintypes.RGB((color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff)
    fill_brush = None
    try:
        fill_brush = windll.gdi32.CreateSolidBrush(fill_rgb)
        windll.user32.FillRect(hdc, byref(rect), fill_brush)
    finally:
        if fill_brush is not None:
            _delete_gdi_object(fill_brush)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号