diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-01-10 05:41:49 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-01-10 05:41:49 +0100 |
commit | e180e2553ab70b0f5cac252ecb28b41c1c4bae81 (patch) | |
tree | c3a706684698da14e6218a40b3b84007793ec2a3 /Widgets/CharacterBitmap.h | |
parent | 305aa25aaea63a1516094992d48f800a58a7715b (diff) | |
download | serenity-e180e2553ab70b0f5cac252ecb28b41c1c4bae81.zip |
Rename CBitmap to CharacterBitmap.
Diffstat (limited to 'Widgets/CharacterBitmap.h')
-rw-r--r-- | Widgets/CharacterBitmap.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Widgets/CharacterBitmap.h b/Widgets/CharacterBitmap.h new file mode 100644 index 0000000000..8c9f9e3d3e --- /dev/null +++ b/Widgets/CharacterBitmap.h @@ -0,0 +1,24 @@ +#pragma once + +#include "Size.h" +#include <AK/Retainable.h> +#include <AK/RetainPtr.h> + +class CharacterBitmap : public Retainable<CharacterBitmap> { +public: + static RetainPtr<CharacterBitmap> createFromASCII(const char* asciiData, unsigned width, unsigned height); + ~CharacterBitmap(); + + const char* bits() const { return m_bits; } + + Size size() const { return m_size; } + unsigned width() const { return m_size.width(); } + unsigned height() const { return m_size.height(); } + +private: + CharacterBitmap(const char* b, unsigned w, unsigned h); + + const char* m_bits { nullptr }; + Size m_size; +}; + |