mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
Make a SharedGraphics directory for classes shared between Kernel and LibGUI.
This commit is contained in:
parent
b75ee4aacb
commit
7e5b81fe48
31 changed files with 49 additions and 41 deletions
24
SharedGraphics/CharacterBitmap.h
Normal file
24
SharedGraphics/CharacterBitmap.h
Normal file
|
@ -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> create_from_ascii(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;
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue