summaryrefslogtreecommitdiff
path: root/Widgets/CharacterBitmap.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-10 05:41:49 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-10 05:41:49 +0100
commite180e2553ab70b0f5cac252ecb28b41c1c4bae81 (patch)
treec3a706684698da14e6218a40b3b84007793ec2a3 /Widgets/CharacterBitmap.h
parent305aa25aaea63a1516094992d48f800a58a7715b (diff)
downloadserenity-e180e2553ab70b0f5cac252ecb28b41c1c4bae81.zip
Rename CBitmap to CharacterBitmap.
Diffstat (limited to 'Widgets/CharacterBitmap.h')
-rw-r--r--Widgets/CharacterBitmap.h24
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;
+};
+