mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
GraphicsBitmap: Add non-const overload of bits().
This is clearly useful, I don't know why I thought it wasn't.
This commit is contained in:
parent
61e3ecec79
commit
cb3e150983
1 changed files with 6 additions and 0 deletions
|
@ -23,6 +23,7 @@ public:
|
|||
RGBA32* scanline(int y);
|
||||
const RGBA32* scanline(int y) const;
|
||||
|
||||
byte* bits(int y);
|
||||
const byte* bits(int y) const;
|
||||
|
||||
Rect rect() const { return { {}, m_size }; }
|
||||
|
@ -86,3 +87,8 @@ inline const byte* GraphicsBitmap::bits(int y) const
|
|||
{
|
||||
return reinterpret_cast<const byte*>(scanline(y));
|
||||
}
|
||||
|
||||
inline byte* GraphicsBitmap::bits(int y)
|
||||
{
|
||||
return reinterpret_cast<byte*>(scanline(y));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue