HOG2
Public Member Functions | Private Member Functions | List of all members
MonoFont Class Reference

#include <MonoFont.h>

Public Member Functions

void DrawText (Graphics::Display &display, Graphics::point location, const char *text, float height, const rgbColor &color=Colors::black, Graphics::textAlign align=Graphics::textAlignLeft, Graphics::textBaseline base=Graphics::textBaselineBottom)
 
void GetTextLines (std::vector< Graphics::Display::lineInfo > &lines, Graphics::point location, const char *text, float height, const rgbColor &color=Colors::black, Graphics::textAlign align=Graphics::textAlignLeft, Graphics::textBaseline base=Graphics::textBaselineBottom)
 

Private Member Functions

void DrawLine (Graphics::Display &display, point3d where, int startx, int starty, int offsetx, int offsety, float scale, rgbColor color)
 
void DrawChar (Graphics::Display &display, char c, point3d where, float height, rgbColor color)
 
void DrawLine (std::vector< Graphics::Display::lineInfo > &lines, point3d where, int startx, int starty, int offsetx, int offsety, float scale, rgbColor color)
 
void DrawChar (std::vector< Graphics::Display::lineInfo > &lines, char c, point3d where, float height, rgbColor color)
 
uint32_t GetBitmap (char c)
 

Detailed Description

Definition at line 21 of file MonoFont.h.

Member Function Documentation

◆ DrawChar() [1/2]

void MonoFont::DrawChar ( Graphics::Display display,
char  c,
point3d  where,
float  height,
rgbColor  color 
)
private

Definition at line 128 of file MonoFont.cpp.

References DrawLine(), GetBitmap(), and height.

Referenced by DrawText(), and GetTextLines().

◆ DrawChar() [2/2]

void MonoFont::DrawChar ( std::vector< Graphics::Display::lineInfo > &  lines,
char  c,
point3d  where,
float  height,
rgbColor  color 
)
private

Definition at line 172 of file MonoFont.cpp.

References DrawLine(), GetBitmap(), and height.

◆ DrawLine() [1/2]

void MonoFont::DrawLine ( Graphics::Display display,
point3d  where,
int  startx,
int  starty,
int  offsetx,
int  offsety,
float  scale,
rgbColor  color 
)
private
Parameters
whereThe top left corner of the text
scaleThe height of the text

Definition at line 392 of file MonoFont.cpp.

References Graphics::Display::DrawLine().

Referenced by DrawChar().

◆ DrawLine() [2/2]

void MonoFont::DrawLine ( std::vector< Graphics::Display::lineInfo > &  lines,
point3d  where,
int  startx,
int  starty,
int  offsetx,
int  offsety,
float  scale,
rgbColor  color 
)
private

Definition at line 417 of file MonoFont.cpp.

◆ DrawText()

void MonoFont::DrawText ( Graphics::Display display,
Graphics::point  location,
const char *  text,
float  height,
const rgbColor color = Colors::black,
Graphics::textAlign  align = Graphics::textAlignLeft,
Graphics::textBaseline  base = Graphics::textBaselineBottom 
)
Parameters
heightHeight of the text
locationWhere to draw the text; depends on the alignment and baseline
textThe text to draw

Definition at line 73 of file MonoFont.cpp.

References DrawChar(), height, Graphics::textAlignCenter, Graphics::textAlignLeft, Graphics::textAlignRight, Graphics::textBaselineBottom, Graphics::textBaselineMiddle, Graphics::textBaselineTop, loc::x, and loc::y.

◆ GetBitmap()

uint32_t MonoFont::GetBitmap ( char  c)
private

Definition at line 216 of file MonoFont.cpp.

Referenced by DrawChar().

◆ GetTextLines()

void MonoFont::GetTextLines ( std::vector< Graphics::Display::lineInfo > &  lines,
Graphics::point  location,
const char *  text,
float  height,
const rgbColor color = Colors::black,
Graphics::textAlign  align = Graphics::textAlignLeft,
Graphics::textBaseline  base = Graphics::textBaselineBottom 
)
Parameters
heightHeight of the text
locationWhere to draw the text; depends on the alignment and baseline
textThe text to draw

Definition at line 20 of file MonoFont.cpp.

References DrawChar(), height, Graphics::textAlignCenter, Graphics::textAlignLeft, Graphics::textAlignRight, Graphics::textBaselineBottom, Graphics::textBaselineMiddle, Graphics::textBaselineTop, loc::x, and loc::y.

Referenced by DrawGraphics().


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