TTF font rasterization and image overlay rendering using CUDA.
More...
#include <cudaFont.h>
|
| ~cudaFont () |
| Destructor. More...
|
|
bool | OverlayText (float4 *image, uint32_t width, uint32_t height, const char *str, int x, int y, const float4 &color=make_float4(0, 0, 0, 255), const float4 &background=make_float4(0, 0, 0, 0), int backgroundPadding=5) |
| Render text overlay onto image. More...
|
|
bool | OverlayText (float4 *image, uint32_t width, uint32_t height, const std::vector< std::pair< std::string, int2 > > &text, const float4 &color=make_float4(0, 0, 0, 255), const float4 &background=make_float4(0, 0, 0, 0), int backgroundPadding=5) |
| Render text overlay onto image. More...
|
|
|
static cudaFont * | Create (float size=32.0f) |
| Create new CUDA font overlay object using baked fonts. More...
|
|
static cudaFont * | Create (const char *font, float size) |
| Create new CUDA font overlay object using baked fonts. More...
|
|
static cudaFont * | Create (const std::vector< std::string > &fonts, float size) |
| Create new CUDA font overlay object using baked fonts. More...
|
|
TTF font rasterization and image overlay rendering using CUDA.
◆ ~cudaFont()
◆ cudaFont()
◆ Create() [1/3]
static cudaFont* cudaFont::Create |
( |
float |
size = 32.0f | ) |
|
|
static |
Create new CUDA font overlay object using baked fonts.
- Parameters
-
size | The desired height of the font, in pixels. |
◆ Create() [2/3]
static cudaFont* cudaFont::Create |
( |
const char * |
font, |
|
|
float |
size |
|
) |
| |
|
static |
Create new CUDA font overlay object using baked fonts.
- Parameters
-
font | The name of the TTF font to use. |
size | The desired height of the font, in pixels. |
◆ Create() [3/3]
static cudaFont* cudaFont::Create |
( |
const std::vector< std::string > & |
fonts, |
|
|
float |
size |
|
) |
| |
|
static |
Create new CUDA font overlay object using baked fonts.
- Parameters
-
font | A list of font names that are acceptable to use. If the first font isn't found on the system, then the next font from the list will be tried. |
size | The desired height of the font, in pixels. |
◆ init()
bool cudaFont::init |
( |
const char * |
font, |
|
|
float |
size |
|
) |
| |
|
protected |
◆ OverlayText() [1/2]
bool cudaFont::OverlayText |
( |
float4 * |
image, |
|
|
uint32_t |
width, |
|
|
uint32_t |
height, |
|
|
const char * |
str, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const float4 & |
color = make_float4(0, 0, 0, 255) , |
|
|
const float4 & |
background = make_float4(0, 0, 0, 0) , |
|
|
int |
backgroundPadding = 5 |
|
) |
| |
Render text overlay onto image.
◆ OverlayText() [2/2]
bool cudaFont::OverlayText |
( |
float4 * |
image, |
|
|
uint32_t |
width, |
|
|
uint32_t |
height, |
|
|
const std::vector< std::pair< std::string, int2 > > & |
text, |
|
|
const float4 & |
color = make_float4(0, 0, 0, 255) , |
|
|
const float4 & |
background = make_float4(0, 0, 0, 0) , |
|
|
int |
backgroundPadding = 5 |
|
) |
| |
Render text overlay onto image.
◆ FirstGlyph
const uint32_t cudaFont::FirstGlyph = 32 |
|
staticprotected |
◆ LastGlyph
const uint32_t cudaFont::LastGlyph = 255 |
|
staticprotected |
◆ MaxCommands
const uint32_t cudaFont::MaxCommands = 1024 |
|
staticprotected |
◆ mCmdIndex
◆ mCommandCPU
void* cudaFont::mCommandCPU |
|
protected |
◆ mCommandGPU
void* cudaFont::mCommandGPU |
|
protected |
◆ mFontMapCPU
uint8_t* cudaFont::mFontMapCPU |
|
protected |
◆ mFontMapGPU
uint8_t* cudaFont::mFontMapGPU |
|
protected |
◆ mFontMapHeight
int cudaFont::mFontMapHeight |
|
protected |
◆ mFontMapWidth
int cudaFont::mFontMapWidth |
|
protected |
◆ mGlyphInfo
◆ mRectIndex
◆ mRectsCPU
float4* cudaFont::mRectsCPU |
|
protected |
◆ mRectsGPU
float4* cudaFont::mRectsGPU |
|
protected |
◆ NumGlyphs
The documentation for this class was generated from the following file: