SerpentAI / D3DShot

Extremely fast and robust screen capture on Windows with the Desktop Duplication API
MIT License
323 stars 73 forks source link

Can you help me understand region? #9

Closed rlewkowicz closed 4 years ago

rlewkowicz commented 4 years ago

@nbrochu I'm trying to wrap my head around region and clearly failing. mss has something like:

{"top": 332, "left": 752, "width": 416, "height": 416}

I have a 416 by 416 block offset top by 332 and left by 752. This gives me a 416 by 416 block dead center of the screen.

I cannot get the same thing using this project. Could you give me a pointer, im sure I'm just being dumb

rlewkowicz commented 4 years ago

I figured it. If you have a 1920x1080 screen and you want a 416 by 416 block, your region is: 752, 332, 1168, 748

You're like building a region and then chopping parts of it off. It's a negative or something. Idk, I did it and am somehow still confused.