From 8a7d89b52ffd0e9eb76686ea1bb758f9e24811a7 Mon Sep 17 00:00:00 2001 From: superp00t Date: Wed, 16 Aug 2023 19:24:24 -0400 Subject: [PATCH] feat(gx): implement GxuFontClearBatch --- src/gx/Font.cpp | 10 ++++++++++ src/gx/Font.hpp | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/gx/Font.cpp b/src/gx/Font.cpp index c6542cf..6212c34 100644 --- a/src/gx/Font.cpp +++ b/src/gx/Font.cpp @@ -337,6 +337,16 @@ int32_t GxuFontDestroyBatch(CGxStringBatch* batch) { return 1; } +int32_t GxuFontClearBatch(CGxStringBatch* batch) { + if (!batch) { + return 0; + } + + batch->m_fontBatch.Clear(); + + return batch != 0; +} + void GxuFontDestroyFont(CGxFont*& font) { if (font) { g_fonts.DeleteNode(font); diff --git a/src/gx/Font.hpp b/src/gx/Font.hpp index 7a6acee..1b060ba 100644 --- a/src/gx/Font.hpp +++ b/src/gx/Font.hpp @@ -67,6 +67,8 @@ int32_t GxuFontCreateString(CGxFont*, const char*, float, const C3Vector&, float int32_t GxuFontDestroyBatch(CGxStringBatch*); +int32_t GxuFontClearBatch(CGxStringBatch* batch); + void GxuFontDestroyFont(CGxFont*& font); void GxuFontDestroyString(CGxString*&);