1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 12:37:44 +00:00
serenity/Widgets/GraphicsBitmap.h
Andreas Kling 4775fd88e3 More window management work.
- Fix inverted mouse event hit test z-ordering.
- Let the RootWidget backing store simply be the display framebuffer.
2019-01-09 03:51:34 +01:00

26 lines
649 B
C++

#pragma once
#include "Size.h"
#include <AK/Retainable.h>
#include <AK/RetainPtr.h>
class GraphicsBitmap : public Retainable<GraphicsBitmap> {
public:
static RetainPtr<GraphicsBitmap> create(const Size&);
static RetainPtr<GraphicsBitmap> create_wrapper(const Size&, byte*);
~GraphicsBitmap();
dword* scanline(int y);
Size size() const { return m_size; }
int width() const { return m_size.width(); }
int height() const { return m_size.height(); }
private:
explicit GraphicsBitmap(const Size&);
GraphicsBitmap(const Size&, byte*);
Size m_size;
byte* m_data { nullptr };
bool m_owned { false };
};