c++ - How to use grabWindow to take a screenshot of only a certain region of a window? -
i using following code take screenshot of window (handle type hwnd):
qpixmap::grabwindow((wid) handle).save("haystack.png", "png"); however, need take screenshot of region (rectange) of window.
in case, rectangle has following vertices:
top-left corner: (536, 535)
bottom-right corner: (778, 592)
right documentation:
qpixmap qpixmap::grabwindow( wid window, int x = 0, int y = 0, int width = -1, int height = -1 );
Comments
Post a Comment