Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cFont16F Class Reference

#include <cFont.h>

Inheritance diagram for GrayLib::cFont16F:
GrayLib::cFontBase Gray::cRefBase IUnknown

Public Member Functions

 cFont16F ()
 
 ~cFont16F ()
 
PIXELS_t get_FontHeight () const noexcept override
 
virtual HRESULT DrawLetter (cSurfaceDC *pSurfDC, PIXELS_t x, PIXELS_t y, wchar_t ch) override
 
- Public Member Functions inherited from Gray::cRefBase
 cRefBase (int iRefCount=0) noexcept
 
virtual ~cRefBase ()
 
int get_RefCount () const noexcept
 
HASHCODE_t get_HashCode () const noexcept
 
 STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept
 
virtual void onFinalRelease ()
 
bool isValidObj () const noexcept
 
 STDMETHOD_ (ULONG, AddRef)(void) override
 
 STDMETHOD_ (ULONG, Release)(void) override
 
STDMETHOD() QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
 
void IncRefCount ()
 
void DecRefCount ()
 
bool isStaticConstruct () const noexcept
 
void StaticConstruct ()
 
void StaticDestruct ()
 
bool isDestructing () noexcept
 
void SetDestructing ()
 

Public Attributes

cSurface m_Image
 Source 16*16 matrix of 16*16 (default) pixel characters. 4 bytes per char as b/w image. More...
 

Static Public Attributes

static const PIXELS_t k_Width = 16
 
static const PIXELS_t k_Height = 16
 

Detailed Description

A basic 16x16 pixel fixed width font.

Constructor & Destructor Documentation

◆ cFont16F()

GrayLib::cFont16F::cFont16F ( )

◆ ~cFont16F()

GrayLib::cFont16F::~cFont16F ( )

Member Function Documentation

◆ DrawLetter()

HRESULT GrayLib::cFont16F::DrawLetter ( cSurfaceDC pSurfDC,
PIXELS_t  x,
PIXELS_t  y,
wchar_t  ch 
)
overridevirtual

Draw a letter on the cSurfaceDC from the internal 16 pixel fixed width font.

  • x,y = upper left of the rectangle to draw the text. get m_ColorFore, m_ColorBack from cSurfaceDC rSurfDC
    Note
    Requires the raster base image to get letters from. e.g. cFont16.gif
    Returns
    width in pixels. or <0 = error.

Implements GrayLib::cFontBase.

◆ get_FontHeight()

PIXELS_t GrayLib::cFont16F::get_FontHeight ( ) const
inlineoverridevirtualnoexcept

Implements GrayLib::cFontBase.

Member Data Documentation

◆ k_Height

const PIXELS_t GrayLib::cFont16F::k_Height = 16
static

◆ k_Width

const PIXELS_t GrayLib::cFont16F::k_Width = 16
static

◆ m_Image

cSurface GrayLib::cFont16F::m_Image

Source 16*16 matrix of 16*16 (default) pixel characters. 4 bytes per char as b/w image.


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