1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:28:11 +00:00

WindowServer: Add Optional<Gfx::IntRect> argument to get_screen_bitmap()

This way, we can optionally specify a region of the display to capture.
Defaults to entire screen if no rectangle is given.
This commit is contained in:
Valtteri Koskivuori 2021-05-09 22:26:02 +03:00 committed by Linus Groh
parent cb74f7992a
commit 4864ef9440
4 changed files with 10 additions and 4 deletions

View file

@ -34,7 +34,7 @@ int main(int argc, char** argv)
auto app = GUI::Application::construct(argc, argv);
sleep(delay);
auto shared_bitmap = GUI::WindowServerConnection::the().get_screen_bitmap();
auto shared_bitmap = GUI::WindowServerConnection::the().get_screen_bitmap({});
auto* bitmap = shared_bitmap.bitmap();
if (!bitmap) {