mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
LibGUI: Use new Bitmap::minimum_pitch method
Also, make sure that the painter actually draws on a RGB(A) bitmap. Closes #3460.
This commit is contained in:
parent
568d53c9b1
commit
e3101c74c6
2 changed files with 2 additions and 1 deletions
|
@ -68,6 +68,7 @@ ALWAYS_INLINE Color get_pixel(const Gfx::Bitmap& bitmap, int x, int y)
|
|||
Painter::Painter(Gfx::Bitmap& bitmap)
|
||||
: m_target(bitmap)
|
||||
{
|
||||
ASSERT(bitmap.format() == Gfx::BitmapFormat::RGB32 || bitmap.format() == Gfx::BitmapFormat::RGBA32);
|
||||
m_state_stack.append(State());
|
||||
state().font = &Font::default_font();
|
||||
state().clip_rect = { { 0, 0 }, bitmap.size() };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue