Kanzi 3.9.16
kanzi::FontFile::GlyphData Class Reference

GlyphData contains the metrics for an individual rendered glyph and its bitmap. More...

#include <kanzi/core.ui/font/font_file.hpp>

Inheritance diagram for kanzi::FontFile::GlyphData:
[legend]

Public Member Functions

const byte * getBitmapData () const
 Returns the pointer to bitmap data.
 
unsigned int getBytesPerPixel () const
 Bytes per pixel for getBitmapData(): 4 when isColor(), otherwise 1.
 
unsigned int getHeight () const
 Returns the height of a bitmap.
 
unsigned int getWidth () const
 Returns the width of a bitmap.
 
 GlyphData (unsigned int width, unsigned int height, const byte *bitmap)
 Constructor.
 
bool isColor () const
 Returns whether this glyph bitmap is color (RGBA8) rather than grayscale coverage.
 
virtual ~GlyphData ()
 Destructor.
 

Protected Member Functions

void markColor (bool isColor)
 Marks this glyph as RGBA color data (used by FreeType color emoji path).
 

Detailed Description

GlyphData contains the metrics for an individual rendered glyph and its bitmap.

On destruction the derived GlyphData classes release the data resources held by their rasterizer.

Constructor & Destructor Documentation

◆ GlyphData()

kanzi::FontFile::GlyphData::GlyphData ( unsigned int width,
unsigned int height,
const byte * bitmap )
explicit

Constructor.

Parameters
widthWidth of the bitmap.
heightHeight of the bitmap.
bitmapPointer to the bitmap data.

◆ ~GlyphData()

virtual kanzi::FontFile::GlyphData::~GlyphData ( )
virtual

Destructor.

Member Function Documentation

◆ getWidth()

unsigned int kanzi::FontFile::GlyphData::getWidth ( ) const

Returns the width of a bitmap.

Returns
Width of the bitmap.

◆ getHeight()

unsigned int kanzi::FontFile::GlyphData::getHeight ( ) const

Returns the height of a bitmap.

Returns
Height of the bitmap.

◆ getBitmapData()

const byte * kanzi::FontFile::GlyphData::getBitmapData ( ) const

Returns the pointer to bitmap data.

Returns
Pointer to the bitmap data.

◆ isColor()

bool kanzi::FontFile::GlyphData::isColor ( ) const
inline

Returns whether this glyph bitmap is color (RGBA8) rather than grayscale coverage.

◆ getBytesPerPixel()

unsigned int kanzi::FontFile::GlyphData::getBytesPerPixel ( ) const
inline

Bytes per pixel for getBitmapData(): 4 when isColor(), otherwise 1.

◆ markColor()

void kanzi::FontFile::GlyphData::markColor ( bool isColor)
inlineprotected

Marks this glyph as RGBA color data (used by FreeType color emoji path).


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