vdr  2.7.6
Public Member Functions | List of all members
cCursesFont Class Reference

Public Member Functions

virtual int Width (void) const override
 
virtual int Width (uint c) const override
 
virtual int Width (const char *s) const override
 
virtual int Height (void) const override
 
virtual void DrawText (cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const override
 
virtual void DrawText (cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const override
 
- Public Member Functions inherited from cFont
virtual ~cFont ()
 
virtual const char * FontName (void) const
 
virtual int Size (void) const
 
int Height (const char *s) const
 

Additional Inherited Members

- Static Public Member Functions inherited from cFont
static void SetFont (eDvbFont Font, const char *Name, int CharHeight)
 
static const cFontGetFont (eDvbFont Font)
 
static cFontCreateFont (const char *Name, int CharHeight, int CharWidth=0)
 
static bool GetAvailableFontNames (cStringList *FontNames, bool Monospaced=false)
 
static cString GetFontFileName (const char *FontName)
 

Detailed Description

Definition at line 21 of file skincurses.c.

Member Function Documentation

◆ DrawText() [1/2]

virtual void cCursesFont::DrawText ( cBitmap Bitmap,
int  x,
int  y,
const char *  s,
tColor  ColorFg,
tColor  ColorBg,
int  Width 
) const
inlineoverridevirtual

Draws the given text into the Bitmap at position (x, y) with the given colors.

The text will not exceed the given Width (if > 0), and will end with a complete character.

Implements cFont.

Definition at line 27 of file skincurses.c.

Referenced by cPixmapMemory::DrawText(), and cBitmap::DrawText().

◆ DrawText() [2/2]

virtual void cCursesFont::DrawText ( cPixmap Pixmap,
int  x,
int  y,
const char *  s,
tColor  ColorFg,
tColor  ColorBg,
int  Width 
) const
inlineoverridevirtual

Reimplemented from cFont.

Definition at line 28 of file skincurses.c.

◆ Height()

virtual int cCursesFont::Height ( void  ) const
inlineoverridevirtual

Returns the height of this font in pixel (all characters have the same height).

If the font contains descenders, its total height may be higher than the character height specified during creation.

Implements cFont.

Definition at line 26 of file skincurses.c.

Referenced by cTrueColorDemo::CreateTextPixmap(), cPictureControl::DisplayCaption(), cPixmapMemory::DrawText(), cBitmap::DrawText(), cHdffOsd::DrawText(), and cCursesOsd::DrawText().

◆ Width() [1/3]

virtual int cCursesFont::Width ( const char *  s) const
inlineoverridevirtual

Returns the width of the given string in pixel.

Implements cFont.

Definition at line 25 of file skincurses.c.

References Utf8StrLen().

◆ Width() [2/3]

virtual int cCursesFont::Width ( uint  c) const
inlineoverridevirtual

Returns the width of the given character in pixel.

Implements cFont.

Definition at line 24 of file skincurses.c.

◆ Width() [3/3]

virtual int cCursesFont::Width ( void  ) const
inlineoverridevirtual

Returns the original character width as requested when the font was created, or 0 if the default width is used.

Implements cFont.

Definition at line 23 of file skincurses.c.

Referenced by cTrueColorDemo::CreateTextPixmap(), cSkinCursesDisplayTracks::cSkinCursesDisplayTracks(), cPictureControl::DisplayCaption(), cPixmapMemory::DrawText(), cBitmap::DrawText(), cHdffOsd::DrawText(), cCursesOsd::DrawText(), and cTextWrapper::Set().


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