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

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -