diff options
author | Nico Weber <thakis@chromium.org> | 2021-01-17 09:46:55 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-17 16:10:21 +0100 |
commit | 1382bbfc57abfc6d3e89d53c837ffefc0f72b13d (patch) | |
tree | 0703b5ae5e17ed30667d88f19fdeb54c25b993cb /Userland/Demos | |
parent | 7a0bc2fdb8be089c6b2fe31ed0859876470becc4 (diff) | |
download | serenity-1382bbfc57abfc6d3e89d53c837ffefc0f72b13d.zip |
LibGfx: Make Painter take the scale factor as constructor argument
I want to give Bitmap an intrinsic scale factor and this is a step
in that direction.
No behavior change.
Diffstat (limited to 'Userland/Demos')
-rw-r--r-- | Userland/Demos/LibGfxScaleDemo/main.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Demos/LibGfxScaleDemo/main.cpp b/Userland/Demos/LibGfxScaleDemo/main.cpp index 0a8ff72975..a12a509fbf 100644 --- a/Userland/Demos/LibGfxScaleDemo/main.cpp +++ b/Userland/Demos/LibGfxScaleDemo/main.cpp @@ -60,11 +60,10 @@ Canvas::Canvas() m_bitmap_1x = Gfx::Bitmap::create(Gfx::BitmapFormat::RGB32, { WIDTH, HEIGHT }); m_bitmap_2x = Gfx::Bitmap::create(Gfx::BitmapFormat::RGB32, { WIDTH * 2, HEIGHT * 2 }); - Gfx::Painter painter_1x(*m_bitmap_1x); + Gfx::Painter painter_1x(*m_bitmap_1x, 1); draw(painter_1x); - Gfx::Painter painter_2x(*m_bitmap_2x); - painter_2x.scale(2); + Gfx::Painter painter_2x(*m_bitmap_2x, 2); draw(painter_2x); update(); |