summaryrefslogtreecommitdiff
path: root/Userland/Demos/LibGfxDemo/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Demos/LibGfxDemo/main.cpp')
-rw-r--r--Userland/Demos/LibGfxDemo/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Demos/LibGfxDemo/main.cpp b/Userland/Demos/LibGfxDemo/main.cpp
index 0077855bea..34acadd7f4 100644
--- a/Userland/Demos/LibGfxDemo/main.cpp
+++ b/Userland/Demos/LibGfxDemo/main.cpp
@@ -47,7 +47,8 @@ Canvas::~Canvas()
void Canvas::paint_event(GUI::PaintEvent& event)
{
GUI::Painter painter(*this);
- painter.draw_scaled_bitmap(event.rect(), *m_bitmap, m_bitmap->rect());
+ painter.add_clip_rect(event.rect());
+ painter.draw_scaled_bitmap(rect(), *m_bitmap, m_bitmap->rect());
}
void Canvas::draw()