GlyphData contains the metrics for an individual rendered glyph and its bitmap.
More...
#include <kanzi/core.ui/font/font_file.hpp>
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.
◆ DataFormat
Specifies the data format of the glyph.
- Since
- Kanzi 4.0.0
| Enumerator |
|---|
| ALPHA8 | Glyph data encoded with GraphicsFormatALPHA8_UNORM.
|
| B8G8R8A8 | Glyph data encoded with GraphicsFormatB8G8R8A8_UNORM.
|
| R8G8B8A8_VerticallyFlipped | Glyph data encoded with GraphicsFormatR8G8B8A8_UNORM and vertically flipped.
|
◆ GlyphData() [1/2]
| kanzi::FontFile::GlyphData::GlyphData |
( |
size_t | width, |
|
|
size_t | height, |
|
|
const byte * | bitmap ) |
|
explicit |
Constructor.
- Parameters
-
| width | Width of the bitmap. |
| height | Height of the bitmap. |
| bitmap | Pointer to the bitmap data. |
- Since
- Kanzi 4.0.0 changed the type of the width and height parameters to size_t.
◆ GlyphData() [2/2]
| kanzi::FontFile::GlyphData::GlyphData |
( |
size_t | width, |
|
|
size_t | height, |
|
|
const byte * | bitmap, |
|
|
DataFormat | dataFormat ) |
|
explicit |
Constructor.
- Parameters
-
| width | Width of the bitmap. |
| height | Height of the bitmap. |
| bitmap | Pointer to the bitmap data. |
| dataFormat | Data format of the glyph bitmap. |
- Since
- Kanzi 4.0.0
◆ ~GlyphData()
| virtual kanzi::FontFile::GlyphData::~GlyphData |
( |
| ) |
|
|
virtual |
◆ getWidth()
| size_t kanzi::FontFile::GlyphData::getWidth |
( |
| ) |
const |
Returns the width of a bitmap.
- Returns
- Width of the bitmap.
◆ getHeight()
| size_t 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.
◆ getDataFormat()
| DataFormat kanzi::FontFile::GlyphData::getDataFormat |
( |
| ) |
const |
Returns the data format of the glyph bitmap.
- Returns
- Data format of the glyph bitmap.
- Since
- Kanzi 4.0.0
◆ getColorFormat()
Returns the color format of the glyph bitmap data.
- Returns
- Color format of the glyph bitmap data.
- Since
- Kanzi 4.0.0
The documentation for this class was generated from the following file: