mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
GraphicsBitmap: Add a fill(Color) helper.
This only works for RGB32 and RGBA32 bitmaps at the moment, since it's not obvious what should happen in an Indexed8 bitmap.
This commit is contained in:
parent
d599544890
commit
6aa4cb6740
2 changed files with 11 additions and 0 deletions
|
@ -39,6 +39,8 @@ public:
|
|||
size_t pitch() const { return m_pitch; }
|
||||
int shared_buffer_id() const { return m_shared_buffer ? m_shared_buffer->shared_buffer_id() : -1; }
|
||||
|
||||
void fill(Color);
|
||||
|
||||
bool has_alpha_channel() const { return m_format == Format::RGBA32; }
|
||||
Format format() const { return m_format; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue