Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
gui::CGUITTGlyphPage Class Reference

Holds a sheet of glyphs. More...

#include <CGUITTFont.h>

+ Collaboration diagram for gui::CGUITTGlyphPage:

Public Member Functions

 CGUITTGlyphPage (video::IVideoDriver *Driver, const io::path &texture_name)
 
 ~CGUITTGlyphPage ()
 
bool createPageTexture (u8 pixel_mode, core::dimension2du texture_size)
 Create the actual page texture,.
 
void pushGlyphToBePaged (const SGUITTGlyph *glyph, video::IImage *surface)
 Add the glyph to a list of glyphs to be paged.
 
bool isDirty () const
 
void updateTexture ()
 Updates the texture atlas with new glyphs.
 

Public Attributes

video::ITexture * texture
 
u32 available_slots
 
u32 used_slots
 
std::vector< core::vector2di > render_positions
 
std::vector< core::recti > render_source_rects
 
std::vector< video::SColor > render_colors
 

Private Attributes

std::vector< SGUITTGlyphPendingglyph_to_be_paged
 
video::IVideoDriver * driver
 
io::path name
 

Detailed Description

Holds a sheet of glyphs.

Constructor & Destructor Documentation

◆ CGUITTGlyphPage()

gui::CGUITTGlyphPage::CGUITTGlyphPage ( video::IVideoDriver * Driver,
const io::path & texture_name )
inline

◆ ~CGUITTGlyphPage()

gui::CGUITTGlyphPage::~CGUITTGlyphPage ( )
inline

References driver, and texture.

Member Function Documentation

◆ createPageTexture()

bool gui::CGUITTGlyphPage::createPageTexture ( u8 pixel_mode,
core::dimension2du texture_size )

Create the actual page texture,.

References driver, name, and texture.

Referenced by gui::CGUITTFont::createGlyphPage().

+ Here is the caller graph for this function:

◆ isDirty()

bool gui::CGUITTGlyphPage::isDirty ( ) const
inline

References glyph_to_be_paged.

Referenced by updateTexture().

+ Here is the caller graph for this function:

◆ pushGlyphToBePaged()

void gui::CGUITTGlyphPage::pushGlyphToBePaged ( const SGUITTGlyph * glyph,
video::IImage * surface )
inline

Add the glyph to a list of glyphs to be paged.

This collection will be cleared after updateTexture is called.

References glyph_to_be_paged.

◆ updateTexture()

void gui::CGUITTGlyphPage::updateTexture ( )

Updates the texture atlas with new glyphs.

References driver, glyph_to_be_paged, isDirty(), and texture.

+ Here is the call graph for this function:

Member Data Documentation

◆ available_slots

u32 gui::CGUITTGlyphPage::available_slots

◆ driver

video::IVideoDriver* gui::CGUITTGlyphPage::driver
private

◆ glyph_to_be_paged

std::vector<SGUITTGlyphPending> gui::CGUITTGlyphPage::glyph_to_be_paged
private

◆ name

io::path gui::CGUITTGlyphPage::name
private

Referenced by createPageTexture().

◆ render_colors

std::vector<video::SColor> gui::CGUITTGlyphPage::render_colors

Referenced by gui::CGUITTFont::draw().

◆ render_positions

std::vector<core::vector2di> gui::CGUITTGlyphPage::render_positions

Referenced by gui::CGUITTFont::draw().

◆ render_source_rects

std::vector<core::recti> gui::CGUITTGlyphPage::render_source_rects

Referenced by gui::CGUITTFont::draw().

◆ texture

video::ITexture* gui::CGUITTGlyphPage::texture

◆ used_slots

u32 gui::CGUITTGlyphPage::used_slots

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