mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17:35 +00:00
LibDraw: Introduce an Emoji class
This class can locate and load emojis, which are expected to be stored as regular PNG images at /res/emoji/U+XXXX.png, where XXXX is the character codepoint. https://github.com/SerenityOS/serenity/issues/490
This commit is contained in:
parent
55197ed4ef
commit
9d64c60e01
3 changed files with 48 additions and 1 deletions
19
Libraries/LibDraw/Emoji.h
Normal file
19
Libraries/LibDraw/Emoji.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
|
||||
class GraphicsBitmap;
|
||||
|
||||
class Emoji {
|
||||
public:
|
||||
~Emoji() {}
|
||||
|
||||
static const Emoji* emoji_for_codepoint(u32 codepoint);
|
||||
const GraphicsBitmap& bitmap() const { return m_bitmap; }
|
||||
|
||||
private:
|
||||
explicit Emoji(NonnullRefPtr<GraphicsBitmap>);
|
||||
|
||||
NonnullRefPtr<GraphicsBitmap> m_bitmap;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue