mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
LibDraw: Store emojis in a HashMap<u32, RefPtr<GraphicsBitmap>>
Get rid of the dedicated Emoji class to make it easier to store a null value signifying a failed lookup. This allows us to remember failed lookups, making subsequent failures for the same codepoint much faster. :^)
This commit is contained in:
parent
b3a63e1d50
commit
0d8aaaaa44
5 changed files with 19 additions and 29 deletions
|
@ -36,7 +36,7 @@ public:
|
|||
void draw_text(const Rect&, const StringView&, TextAlignment = TextAlignment::TopLeft, Color = Color::Black, TextElision = TextElision::None);
|
||||
void draw_glyph(const Point&, char, Color);
|
||||
void draw_glyph(const Point&, char, const Font&, Color);
|
||||
void draw_emoji(const Point&, const Emoji&, const Font&);
|
||||
void draw_emoji(const Point&, const GraphicsBitmap&, const Font&);
|
||||
void draw_glyph_or_emoji(const Point&, u32 codepoint, const Font&, Color);
|
||||
|
||||
const Font& font() const { return *state().font; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue