From f985673dc37f04787305523fc0c53e008d49097e Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 27 Nov 2024 13:29:42 +0200 Subject: [PATCH] LibGUI: Add API to retrieve Window's underlying framebuffer --- userspace/libraries/LibGUI/include/LibGUI/Window.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/userspace/libraries/LibGUI/include/LibGUI/Window.h b/userspace/libraries/LibGUI/include/LibGUI/Window.h index e27bd0a61d..4348c64769 100644 --- a/userspace/libraries/LibGUI/include/LibGUI/Window.h +++ b/userspace/libraries/LibGUI/include/LibGUI/Window.h @@ -43,6 +43,8 @@ namespace LibGUI return m_framebuffer[y * m_width + x]; } + BAN::Span pixels() { return m_framebuffer.span(); } + void fill_rect(int32_t x, int32_t y, uint32_t width, uint32_t height, uint32_t color); void fill(uint32_t color) { return fill_rect(0, 0, width(), height(), color); }