From f50bbc798e27ffcab17fc1a4e8551d930b08cf06 Mon Sep 17 00:00:00 2001 From: ohyzha Date: Wed, 22 Jan 2025 17:06:03 +0200 Subject: [PATCH] add helper functions to FontAtlasType --- openVulkanoCpp/Scene/Text/FontAtlasType.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openVulkanoCpp/Scene/Text/FontAtlasType.hpp b/openVulkanoCpp/Scene/Text/FontAtlasType.hpp index dc95833..33d9323 100644 --- a/openVulkanoCpp/Scene/Text/FontAtlasType.hpp +++ b/openVulkanoCpp/Scene/Text/FontAtlasType.hpp @@ -40,6 +40,10 @@ namespace OpenVulkano::Scene [[nodiscard]] constexpr uint32_t GetChannelCount() const { return CHANNEL_COUNT[static_cast(m_type)]; } + [[nodiscard]] constexpr bool IsSDF() const { return m_type == SDF || m_type == MSDF; } + + [[nodiscard]] constexpr bool IsBitmap() const { return m_type == BITMAP || m_type == BITMAP_SUBPIXEL; } + [[nodiscard]] constexpr operator Type() const { return m_type; } [[nodiscard]] constexpr auto operator<=>(const FontAtlasType rhs) const { return m_type <=> rhs.m_type; }