Rise
The Vieneo Province
Loading...
Searching...
No Matches
Rendering::Font11 Class Reference

#include <Font11.h>

Collaboration diagram for Rendering::Font11:
[legend]

Classes

struct  Run
struct  Line
struct  Glyph

Public Member Functions

 Font11 ()=default
 Font11 (const Font11 &)=delete
Font11 & operator= (const Font11 &)=delete
 ~Font11 ()
HRESULT Initialize (ID3D11Device *device, const LOGFONTW &description)
int Draw (Sprite11 *sprite, const wchar_t *text, int count, RECT *rectangle, UINT format, uint32_t color)
int DrawFixed (Sprite11 *sprite, const wchar_t *text, int count, RECT *rectangle, UINT format, uint32_t color)
int DrawAnsi (Sprite11 *sprite, const char *text, int count, RECT *rectangle, UINT format, uint32_t color)
HDC DC () const
bool Metrics (TEXTMETRICW &result) const
void Reset ()
size_t CachedBytes () const
size_t CachedRuns () const
size_t FixedAtlasBytes () const

Private Member Functions

bool Words (const std::wstring &text, std::vector< Line > &words)
int Layout (const std::wstring &text, LONG width, LONG height, UINT format, std::vector< Line > &lines, RECT &bounds)
HRESULT Rasterize (Run &run)
bool PrepareFixedAtlas ()

Private Attributes

std::array< Glyph, 95 > fixedGlyphs {}
std::bitset< 95 *95 > fixedPairOverlap
Microsoft::WRL::ComPtr< ID3D11ShaderResourceView > fixedAtlas
LONG fixedAdvance =0
LONG fixedHeight =0
size_t fixedBytes =0
bool fixedAttempted =false
Microsoft::WRL::ComPtr< ID3D11Device > device
HDC dc =nullptr
HFONT font =nullptr
HGDIOBJ previousFont =nullptr
std::list< Run > runs
size_t cachedBytes =0

Static Private Attributes

static constexpr size_t CacheLimit =16*1024*1024

Detailed Description

Definition at line 11 of file Font11.h.

Constructor & Destructor Documentation

◆ Font11() [1/2]

Rendering::Font11::Font11 ( )
default
Here is the caller graph for this function:

◆ Font11() [2/2]

Rendering::Font11::Font11 ( const Font11 & )
delete
Here is the call graph for this function:

◆ ~Font11()

Rendering::Font11::~Font11 ( )
inline

Definition at line 17 of file Font11.h.

Here is the call graph for this function:

Member Function Documentation

◆ CachedBytes()

size_t Rendering::Font11::CachedBytes ( ) const
inline

Definition at line 27 of file Font11.h.

◆ CachedRuns()

size_t Rendering::Font11::CachedRuns ( ) const
inline

Definition at line 28 of file Font11.h.

◆ DC()

HDC Rendering::Font11::DC ( ) const
inline

Definition at line 24 of file Font11.h.

Here is the caller graph for this function:

◆ Draw()

int Rendering::Font11::Draw ( Sprite11 * sprite,
const wchar_t * text,
int count,
RECT * rectangle,
UINT format,
uint32_t color )

Definition at line 215 of file Font11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawAnsi()

int Rendering::Font11::DrawAnsi ( Sprite11 * sprite,
const char * text,
int count,
RECT * rectangle,
UINT format,
uint32_t color )

Definition at line 383 of file Font11.cpp.

Here is the call graph for this function:

◆ DrawFixed()

int Rendering::Font11::DrawFixed ( Sprite11 * sprite,
const wchar_t * text,
int count,
RECT * rectangle,
UINT format,
uint32_t color )

Definition at line 346 of file Font11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FixedAtlasBytes()

size_t Rendering::Font11::FixedAtlasBytes ( ) const
inline

Definition at line 29 of file Font11.h.

◆ Initialize()

HRESULT Rendering::Font11::Initialize ( ID3D11Device * device,
const LOGFONTW & description )

Definition at line 22 of file Font11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Layout()

int Rendering::Font11::Layout ( const std::wstring & text,
LONG width,
LONG height,
UINT format,
std::vector< Line > & lines,
RECT & bounds )
private

Definition at line 55 of file Font11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Metrics()

bool Rendering::Font11::Metrics ( TEXTMETRICW & result) const
inline

Definition at line 25 of file Font11.h.

Here is the caller graph for this function:

◆ operator=()

Font11 & Rendering::Font11::operator= ( const Font11 & )
delete
Here is the call graph for this function:

◆ PrepareFixedAtlas()

bool Rendering::Font11::PrepareFixedAtlas ( )
private

Definition at line 254 of file Font11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Rasterize()

HRESULT Rendering::Font11::Rasterize ( Run & run)
private

Definition at line 129 of file Font11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Reset()

void Rendering::Font11::Reset ( )

Definition at line 11 of file Font11.cpp.

Here is the caller graph for this function:

◆ Words()

bool Rendering::Font11::Words ( const std::wstring & text,
std::vector< Line > & words )
private

Definition at line 33 of file Font11.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ cachedBytes

size_t Rendering::Font11::cachedBytes =0
private

Definition at line 59 of file Font11.h.

◆ CacheLimit

size_t Rendering::Font11::CacheLimit =16*1024*1024
staticconstexprprivate

Definition at line 60 of file Font11.h.

◆ dc

HDC Rendering::Font11::dc =nullptr
private

Definition at line 55 of file Font11.h.

◆ device

Microsoft::WRL::ComPtr<ID3D11Device> Rendering::Font11::device
private

Definition at line 54 of file Font11.h.

◆ fixedAdvance

LONG Rendering::Font11::fixedAdvance =0
private

Definition at line 51 of file Font11.h.

◆ fixedAtlas

Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> Rendering::Font11::fixedAtlas
private

Definition at line 50 of file Font11.h.

◆ fixedAttempted

bool Rendering::Font11::fixedAttempted =false
private

Definition at line 53 of file Font11.h.

◆ fixedBytes

size_t Rendering::Font11::fixedBytes =0
private

Definition at line 52 of file Font11.h.

◆ fixedGlyphs

std::array<Glyph,95> Rendering::Font11::fixedGlyphs {}
private

Definition at line 48 of file Font11.h.

◆ fixedHeight

LONG Rendering::Font11::fixedHeight =0
private

Definition at line 51 of file Font11.h.

◆ fixedPairOverlap

std::bitset<95*95> Rendering::Font11::fixedPairOverlap
private

Definition at line 49 of file Font11.h.

◆ font

HFONT Rendering::Font11::font =nullptr
private

Definition at line 56 of file Font11.h.

◆ previousFont

HGDIOBJ Rendering::Font11::previousFont =nullptr
private

Definition at line 57 of file Font11.h.

◆ runs

std::list<Run> Rendering::Font11::runs
private

Definition at line 58 of file Font11.h.


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