Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
dcpp::gui::IGUIFontBitmap Class Referenceabstract

Font interface. More...

#include <duckcpp/core/engine/IGUIFontBitmap.hpp>

Inheritance diagram for dcpp::gui::IGUIFontBitmap:
Inheritance graph
Collaboration diagram for dcpp::gui::IGUIFontBitmap:
Collaboration graph

Public Member Functions

virtual EGUI_FONT_TYPE getType () const override
 Returns the type of this font.
 
virtual IGUISpriteBankgetSpriteBank () const =0
 returns the parsed Symbol Information
 
virtual dcpp::uint32_kt getSpriteNoFromChar (const wchar_t *c) const =0
 returns the sprite number from a given character
 
virtual dcpp::int32_kt getKerningWidth (const wchar_t *thisLetter=0, const wchar_t *previousLetter=0) const override=0
 Gets kerning values (distance between letters) for the font. If no parameters are provided,.
 
- Public Member Functions inherited from dcpp::gui::IGUIFont
virtual void draw (const dcpp::nub::wstring &text, const dcpp::nub::recti &position, dcpp::video::SColor color, bool hcenter=false, bool vcenter=false, const dcpp::nub::recti *clip=0)=0
 Draws some text and clips it to the specified rectangle if wanted.
 
virtual dcpp::nub::dimension2du getDimension (const wchar_t *text) const =0
 Calculates the width and height of a given string of text.
 
virtual dcpp::int32_kt getCharacterFromPos (const wchar_t *text, dcpp::int32_kt pixel_x) const =0
 Calculates the index of the character in the text which is on a specific position.
 
virtual void setKerningWidth (dcpp::int32_kt kerning)=0
 Sets global kerning width for the font.
 
virtual void setKerningHeight (dcpp::int32_kt kerning)=0
 Sets global kerning height for the font.
 
virtual dcpp::int32_kt getKerningHeight () const =0
 Returns the distance between letters.
 
virtual void setInvisibleCharacters (const wchar_t *s)=0
 Define which characters should not be drawn by the font.
 
- Public Member Functions inherited from dcpp::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
dcpp::int32_kt getReferenceCount () const
 Get the reference count.
 
const dcpp::char_ktgetDebugName () const
 Returns the debug name of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from dcpp::IReferenceCounted
void setDebugName (const dcpp::char_kt *newName)
 Sets the debug name of the object.
 

Detailed Description

Font interface.

Member Function Documentation

◆ getKerningWidth()

virtual dcpp::int32_kt dcpp::gui::IGUIFontBitmap::getKerningWidth ( const wchar_t *  thisLetter = 0,
const wchar_t *  previousLetter = 0 
) const
overridepure virtual

Gets kerning values (distance between letters) for the font. If no parameters are provided,.

the global kerning distance is returned.

Parameters
thisLetterIf this parameter is provided, the left side kerning for this letter is added to the global kerning value. For example, a space might only be one pixel wide, but it may be displayed as several pixels.
previousLetterIf provided, kerning is calculated for both letters and added to the global kerning value. For example, EGFT_BITMAP will add the right kerning value of previousLetter to the left side kerning value of thisLetter, then add the global value.

Implements dcpp::gui::IGUIFont.

◆ getType()

virtual EGUI_FONT_TYPE dcpp::gui::IGUIFontBitmap::getType ( ) const
inlineoverridevirtual

Returns the type of this font.

Reimplemented from dcpp::gui::IGUIFont.


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

Duckcpp    @cppfx.xyz