Font interface. More...
#include <IGUIFont.h>
Font interface.
Definition at line 39 of file IGUIFont.h.
virtual void irr::gui::IGUIFont::draw | ( | const core::stringw & | text, |
const core::rect< s32 > & | position, | ||
video::SColor | color, | ||
bool | hcenter = false , |
||
bool | vcenter = false , |
||
const core::rect< s32 > * | clip = 0 |
||
) | [pure virtual] |
Draws some text and clips it to the specified rectangle if wanted.
text,: | Text to draw |
position,: | Rectangle specifying position where to draw the text. |
color,: | Color of the text |
hcenter,: | Specifies if the text should be centered horizontally into the rectangle. |
vcenter,: | Specifies if the text should be centered vertically into the rectangle. |
clip,: | Optional pointer to a rectangle against which the text will be clipped. If the pointer is null, no clipping will be done. |
virtual s32 irr::gui::IGUIFont::getCharacterFromPos | ( | const wchar_t * | text, |
s32 | pixel_x | ||
) | const [pure virtual] |
Calculates the index of the character in the text which is on a specific position.
text,: | Text string. |
pixel_x,: | X pixel position of which the index of the character will be returned. |
virtual core::dimension2d<u32> irr::gui::IGUIFont::getDimension | ( | const wchar_t * | text | ) | const [pure virtual] |
Calculates the width and height of a given string of text.
virtual s32 irr::gui::IGUIFont::getKerningHeight | ( | ) | const [pure virtual] |
Returns the distance between letters.
virtual s32 irr::gui::IGUIFont::getKerningWidth | ( | const wchar_t * | thisLetter = 0 , |
const wchar_t * | previousLetter = 0 |
||
) | const [pure virtual] |
Gets kerning values (distance between letters) for the font. If no parameters are provided,.
the global kerning distance is returned.
thisLetter,: | If 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. |
previousLetter,: | If provided, kerning is calculated for both letters and added to the global kerning value. For example, in a font which supports kerning pairs a string such as 'Wo' may have the 'o' tucked neatly under the 'W'. |
Implemented in irr::gui::IGUIFontBitmap.
virtual EGUI_FONT_TYPE irr::gui::IGUIFont::getType | ( | ) | const [inline, virtual] |
Returns the type of this font.
Reimplemented in irr::gui::IGUIFontBitmap.
Definition at line 68 of file IGUIFont.h.
References irr::gui::EGFT_CUSTOM.
virtual void irr::gui::IGUIFont::setInvisibleCharacters | ( | const wchar_t * | s | ) | [pure virtual] |
Define which characters should not be drawn by the font.
For example " " would not draw any space which is usually blank in most fonts.
s | String of symbols which are not send down to the videodriver |
virtual void irr::gui::IGUIFont::setKerningHeight | ( | s32 | kerning | ) | [pure virtual] |
Sets global kerning height for the font.
virtual void irr::gui::IGUIFont::setKerningWidth | ( | s32 | kerning | ) | [pure virtual] |
Sets global kerning width for the font.