1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:07:35 +00:00

LibAccelGfx+LibWeb: Implement SetClipRect and ClearClipRect commands

This commit is contained in:
Aliaksandr Kalenik 2023-11-13 18:34:55 +01:00 committed by Andreas Kling
parent 9e4d697d23
commit 01d938c77b
5 changed files with 32 additions and 3 deletions

View file

@ -417,6 +417,16 @@ void Painter::restore()
m_state_stack.take_last();
}
void Painter::set_clip_rect(Gfx::IntRect rect)
{
GL::enable_scissor_test(rect);
}
void Painter::clear_clip_rect()
{
GL::disable_scissor_test();
}
void Painter::set_target_bitmap(Gfx::Bitmap& bitmap)
{
if (m_target_framebuffer.has_value()) {