P-E-R-R-Y
Utilitaires, contrats et vendors du moteur, en une seule doc
Loading...
Searching...
No Matches
SdlFont Class Reference

Une police ouverte a une taille donnee. More...

#include <SdlFont.hpp>

Inheritance diagram for SdlFont:
Collaboration diagram for SdlFont:

Public Member Functions

 SdlFont (std::string path)
 ~SdlFont ()
bool isReady () const override
 notice if the font is ready
TTF_Font * handle (unsigned size) const
 La police, recalee sur size si besoin.
 SdlFont (std::string path)
 ~SdlFont ()
bool isReady () const override
 notice if the font is ready
TTF_Font * handle (unsigned size) const
 La police, recalee sur size si besoin.
Public Member Functions inherited from graphic::IFont
virtual ~IFont ()=default

Detailed Description

Une police ouverte a une taille donnee.

SDL_ttf n'a pas la notion de police independante du corps : une TTF_Font EST une taille. handle(size) recale la taille avant de rendre, ce qui laisse deux SdlText de corps differents partager la meme police - chacun la remet a la sienne juste avant de tracer.

Constructor & Destructor Documentation

◆ SdlFont() [1/2]

SdlFont::SdlFont ( std::string path)
inline

◆ ~SdlFont() [1/2]

SdlFont::~SdlFont ( )
inline

◆ SdlFont() [2/2]

SdlFont::SdlFont ( std::string path)
inline

◆ ~SdlFont() [2/2]

SdlFont::~SdlFont ( )
inline

Member Function Documentation

◆ handle() [1/2]

TTF_Font * SdlFont::handle ( unsigned size) const
inline

La police, recalee sur size si besoin.

◆ handle() [2/2]

TTF_Font * SdlFont::handle ( unsigned size) const
inline

La police, recalee sur size si besoin.

◆ isReady() [1/2]

bool SdlFont::isReady ( ) const
inlineoverridevirtual

notice if the font is ready

Returns
bool

Implements graphic::IFont.

◆ isReady() [2/2]

bool SdlFont::isReady ( ) const
inlineoverridevirtual

notice if the font is ready

Returns
bool

Implements graphic::IFont.


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