SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
vtfpp::VBF Class Reference

#include <VBF.h>

Collaboration diagram for vtfpp::VBF:

Classes

struct  Glyph

Public Types

enum  Flags : uint16_t {
  FLAG_NONE = 0 , FLAG_BOLD = 1 << 0 , FLAG_ITALIC = 1 << 1 , FLAG_OUTLINE = 1 << 2 ,
  FLAG_DROP_SHADOW = 1 << 3 , FLAG_BLUR = 1 << 4 , FLAG_SCANLINE = 1 << 5 , FLAG_ANTIALIASED = 1 << 6 ,
  FLAG_CUSTOM = 1 << 7
}

Public Member Functions

 VBF (std::span< const std::byte > vbfData)
 VBF (const std::filesystem::path &vbfPath)
 operator bool () const
sourcepp::math::Vec2ui16 getPageSize () const
sourcepp::math::Vec2ui16 getMaxGlyphSize () const
Flags getFlags () const
uint16_t getAscent () const
const std::array< Glyph, 256 > & getGlyphs () const

Protected Attributes

uint32_t version = 0
sourcepp::math::Vec2ui16 pageSize {}
sourcepp::math::Vec2ui16 maxGlyphSize {}
Flags flags = FLAG_NONE
uint16_t ascent = 0
std::array< Glyph, 256 > glyphs {}

Detailed Description

Definition at line 14 of file VBF.h.

Member Enumeration Documentation

◆ Flags

enum vtfpp::VBF::Flags : uint16_t
Enumerator
FLAG_NONE 
FLAG_BOLD 
FLAG_ITALIC 
FLAG_OUTLINE 
FLAG_DROP_SHADOW 
FLAG_BLUR 
FLAG_SCANLINE 
FLAG_ANTIALIASED 
FLAG_CUSTOM 

Definition at line 16 of file VBF.h.

Constructor & Destructor Documentation

◆ VBF() [1/2]

VBF::VBF ( std::span< const std::byte > vbfData)
explicit

Definition at line 11 of file VBF.cpp.

◆ VBF() [2/2]

VBF::VBF ( const std::filesystem::path & vbfPath)
explicit

Definition at line 44 of file VBF.cpp.

Member Function Documentation

◆ getAscent()

uint16_t VBF::getAscent ( ) const
nodiscard

Definition at line 63 of file VBF.cpp.

◆ getFlags()

VBF::Flags VBF::getFlags ( ) const
nodiscard

Definition at line 59 of file VBF.cpp.

◆ getGlyphs()

const std::array< VBF::Glyph, 256 > & VBF::getGlyphs ( ) const
nodiscard

Definition at line 67 of file VBF.cpp.

◆ getMaxGlyphSize()

math::Vec2ui16 VBF::getMaxGlyphSize ( ) const
nodiscard

Definition at line 55 of file VBF.cpp.

◆ getPageSize()

math::Vec2ui16 VBF::getPageSize ( ) const
nodiscard

Definition at line 51 of file VBF.cpp.

◆ operator bool()

VBF::operator bool ( ) const
explicitnodiscard

Definition at line 47 of file VBF.cpp.

Member Data Documentation

◆ ascent

uint16_t vtfpp::VBF::ascent = 0
protected

Definition at line 55 of file VBF.h.

◆ flags

Flags vtfpp::VBF::flags = FLAG_NONE
protected

Definition at line 54 of file VBF.h.

◆ glyphs

std::array<Glyph, 256> vtfpp::VBF::glyphs {}
protected

Definition at line 56 of file VBF.h.

◆ maxGlyphSize

sourcepp::math::Vec2ui16 vtfpp::VBF::maxGlyphSize {}
protected

Definition at line 53 of file VBF.h.

◆ pageSize

sourcepp::math::Vec2ui16 vtfpp::VBF::pageSize {}
protected

Definition at line 52 of file VBF.h.

◆ version

uint32_t vtfpp::VBF::version = 0
protected

Definition at line 51 of file VBF.h.


The documentation for this class was generated from the following files: