<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Irrlicht Engine: irr::gui::IGUIFont Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table class="irrlicht" > <tr valign="middle"> <td><font size="2"><a class="qindex" href="index.html"><font color="#FFFFFF">Home</font></a> | <a class="qindex" href="namespaces.html"><font color="#FFFFFF">Namespaces</font></a> | <a class="qindex" href="hierarchy.html"><font color="#FFFFFF">Hierarchy</font></a> | <a class="qindex" href="classes.html"><font color="#FFFFFF">Alphabetical List</font></a> | <a class="qindex" href="annotated.html"><font color="#FFFFFF"> Class list</font></a> | <a class="qindex" href="files.html"><font color="#FFFFFF">Files</font></a> | <a class="qindex" href="namespacemembers.html"><font color="#FFFFFF"> Namespace Members</font></a> | <a class="qindex" href="functions.html"><font color="#FFFFFF">Class members</font></a> | <a class="qindex" href="globals.html"><font color="#FFFFFF">File members</font></a> | <a class="qindex" href="pages.html"><font color="#FFFFFF">Tutorials</font></a></font> </td> </tr> </table> <!-- Generated by Doxygen 1.5.6 --> <div class="navpath"><a class="el" href="namespaceirr.html">irr</a>::<a class="el" href="namespaceirr_1_1gui.html">gui</a>::<a class="el" href="classirr_1_1gui_1_1_i_g_u_i_font.html">IGUIFont</a> </div> <div class="contents"> <h1>irr::gui::IGUIFont Class Reference</h1><!-- doxytag: class="irr::gui::IGUIFont" --><!-- doxytag: inherits="irr::IReferenceCounted" -->Font interface. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="_i_g_u_i_font_8h-source.html">IGUIFont.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for irr::gui::IGUIFont:</div> <div class="dynsection"> <p><center><img src="classirr_1_1gui_1_1_i_g_u_i_font.png" usemap="#irr::gui::IGUIFont_map" border="0" alt=""></center> <map name="irr::gui::IGUIFont_map"> <area href="classirr_1_1_i_reference_counted.html" alt="irr::IReferenceCounted" shape="rect" coords="0,0,140,24"> <area href="classirr_1_1gui_1_1_i_g_u_i_font_bitmap.html" alt="irr::gui::IGUIFontBitmap" shape="rect" coords="0,112,140,136"> </map> </div> <p> <a href="classirr_1_1gui_1_1_i_g_u_i_font-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_font.html#f5627e546c474f31260fe671c24f9a33">draw</a> (const <a class="el" href="classirr_1_1core_1_1string.html">core::stringw</a> &text, const <a class="el" href="classirr_1_1core_1_1rect.html">core::rect</a>< <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> > &position, <a class="el" href="classirr_1_1video_1_1_s_color.html">video::SColor</a> color, bool hcenter=false, bool vcenter=false, const <a class="el" href="classirr_1_1core_1_1rect.html">core::rect</a>< <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> > *clip=0)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Draws some text and clips it to the specified rectangle if wanted. <a href="#f5627e546c474f31260fe671c24f9a33"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_font.html#60d4d0465deedd811cd0fecd11b4329f">getCharacterFromPos</a> (const wchar_t *text, <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> pixel_x) const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates the index of the character in the text which is on a specific position. <a href="#60d4d0465deedd811cd0fecd11b4329f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classirr_1_1core_1_1dimension2d.html">core::dimension2d</a>< <a class="el" href="namespaceirr.html#0416a53257075833e7002efd0a18e804">u32</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_font.html#a7612db0c9dc2837b44a1a2fa5668797">getDimension</a> (const wchar_t *text) const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates the width and height of a given string of text. <a href="#a7612db0c9dc2837b44a1a2fa5668797"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_font.html#1f1a760be155fc0f6a632b457154a5d8">getKerningHeight</a> () const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the distance between letters. <a href="#1f1a760be155fc0f6a632b457154a5d8"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_font.html#7de0b25d3d1dbdcc9036e5d788e2d9ab">getKerningWidth</a> (const wchar_t *thisLetter=0, const wchar_t *previousLetter=0) const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Gets kerning values (distance between letters) for the font. If no parameters are provided,. <a href="#7de0b25d3d1dbdcc9036e5d788e2d9ab"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceirr_1_1gui.html#3c818a164486f43300260327c5420a2f">EGUI_FONT_TYPE</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_font.html#2a3e4c757c1fccb9f96d48aa1cf63be2">getType</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the type of this font. <a href="#2a3e4c757c1fccb9f96d48aa1cf63be2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_font.html#cff05412dc954845add611c5f71cef49">setInvisibleCharacters</a> (const wchar_t *s)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Define which characters should not be drawn by the font. <a href="#cff05412dc954845add611c5f71cef49"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_font.html#9545ecfae06592acd47508f6824bb386">setKerningHeight</a> (<a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> kerning)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets global kerning height for the font. <a href="#9545ecfae06592acd47508f6824bb386"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_font.html#a683bb2535776b7f81adc050931d9b17">setKerningWidth</a> (<a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> kerning)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets global kerning width for the font. <a href="#a683bb2535776b7f81adc050931d9b17"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Font interface. <p>Definition at line <a class="el" href="_i_g_u_i_font_8h-source.html#l00039">39</a> of file <a class="el" href="_i_g_u_i_font_8h-source.html">IGUIFont.h</a>.</p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="f5627e546c474f31260fe671c24f9a33"></a><!-- doxytag: member="irr::gui::IGUIFont::draw" ref="f5627e546c474f31260fe671c24f9a33" args="(const core::stringw &text, const core::rect< s32 > &position, video::SColor color, bool hcenter=false, bool vcenter=false, const core::rect< s32 > *clip=0)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void irr::gui::IGUIFont::draw </td> <td>(</td> <td class="paramtype">const <a class="el" href="classirr_1_1core_1_1string.html">core::stringw</a> & </td> <td class="paramname"> <em>text</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classirr_1_1core_1_1rect.html">core::rect</a>< <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> > & </td> <td class="paramname"> <em>position</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classirr_1_1video_1_1_s_color.html">video::SColor</a> </td> <td class="paramname"> <em>color</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>hcenter</em> = <code>false</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>vcenter</em> = <code>false</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classirr_1_1core_1_1rect.html">core::rect</a>< <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> > * </td> <td class="paramname"> <em>clip</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Draws some text and clips it to the specified rectangle if wanted. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>text,:</em> </td><td>Text to draw </td></tr> <tr><td valign="top"></td><td valign="top"><em>position,:</em> </td><td>Rectangle specifying position where to draw the text. </td></tr> <tr><td valign="top"></td><td valign="top"><em>color,:</em> </td><td>Color of the text </td></tr> <tr><td valign="top"></td><td valign="top"><em>hcenter,:</em> </td><td>Specifiies if the text should be centered horizontally into the rectangle. </td></tr> <tr><td valign="top"></td><td valign="top"><em>vcenter,:</em> </td><td>Specifies if the text should be centered vertically into the rectangle. </td></tr> <tr><td valign="top"></td><td valign="top"><em>clip,:</em> </td><td>Optional pointer to a rectangle against which the text will be clipped. If the pointer is null, no clipping will be done. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="60d4d0465deedd811cd0fecd11b4329f"></a><!-- doxytag: member="irr::gui::IGUIFont::getCharacterFromPos" ref="60d4d0465deedd811cd0fecd11b4329f" args="(const wchar_t *text, s32 pixel_x) const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> irr::gui::IGUIFont::getCharacterFromPos </td> <td>(</td> <td class="paramtype">const wchar_t * </td> <td class="paramname"> <em>text</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> </td> <td class="paramname"> <em>pixel_x</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Calculates the index of the character in the text which is on a specific position. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>text,:</em> </td><td>Text string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pixel_x,:</em> </td><td>X pixel position of which the index of the character will be returned. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns zero based index of the character in the text, and -1 if no no character is on this position. (=the text is too short). </dd></dl> </div> </div><p> <a class="anchor" name="a7612db0c9dc2837b44a1a2fa5668797"></a><!-- doxytag: member="irr::gui::IGUIFont::getDimension" ref="a7612db0c9dc2837b44a1a2fa5668797" args="(const wchar_t *text) const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classirr_1_1core_1_1dimension2d.html">core::dimension2d</a><<a class="el" href="namespaceirr.html#0416a53257075833e7002efd0a18e804">u32</a>> irr::gui::IGUIFont::getDimension </td> <td>(</td> <td class="paramtype">const wchar_t * </td> <td class="paramname"> <em>text</em> </td> <td> ) </td> <td> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Calculates the width and height of a given string of text. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns width and height of the area covered by the text if it would be drawn. </dd></dl> </div> </div><p> <a class="anchor" name="1f1a760be155fc0f6a632b457154a5d8"></a><!-- doxytag: member="irr::gui::IGUIFont::getKerningHeight" ref="1f1a760be155fc0f6a632b457154a5d8" args="() const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> irr::gui::IGUIFont::getKerningHeight </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the distance between letters. <p> </div> </div><p> <a class="anchor" name="7de0b25d3d1dbdcc9036e5d788e2d9ab"></a><!-- doxytag: member="irr::gui::IGUIFont::getKerningWidth" ref="7de0b25d3d1dbdcc9036e5d788e2d9ab" args="(const wchar_t *thisLetter=0, const wchar_t *previousLetter=0) const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> irr::gui::IGUIFont::getKerningWidth </td> <td>(</td> <td class="paramtype">const wchar_t * </td> <td class="paramname"> <em>thisLetter</em> = <code>0</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const wchar_t * </td> <td class="paramname"> <em>previousLetter</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Gets kerning values (distance between letters) for the font. If no parameters are provided,. <p> the global kerning distance is returned. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>thisLetter,:</em> </td><td>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. </td></tr> <tr><td valign="top"></td><td valign="top"><em>previousLetter,:</em> </td><td>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'. </td></tr> </table> </dl> <p>Implemented in <a class="el" href="classirr_1_1gui_1_1_i_g_u_i_font_bitmap.html#7bdeaea45745a10e09f7769ec3b95a12">irr::gui::IGUIFontBitmap</a>.</p> </div> </div><p> <a class="anchor" name="2a3e4c757c1fccb9f96d48aa1cf63be2"></a><!-- doxytag: member="irr::gui::IGUIFont::getType" ref="2a3e4c757c1fccb9f96d48aa1cf63be2" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="namespaceirr_1_1gui.html#3c818a164486f43300260327c5420a2f">EGUI_FONT_TYPE</a> irr::gui::IGUIFont::getType </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the type of this font. <p> <p>Reimplemented in <a class="el" href="classirr_1_1gui_1_1_i_g_u_i_font_bitmap.html#7ce4af45916eec15da74380b90b6d6ec">irr::gui::IGUIFontBitmap</a>.</p> <p>Definition at line <a class="el" href="_i_g_u_i_font_8h-source.html#l00068">68</a> of file <a class="el" href="_i_g_u_i_font_8h-source.html">IGUIFont.h</a>.</p> <p>References <a class="el" href="_i_g_u_i_font_8h-source.html#l00035">irr::gui::EGFT_CUSTOM</a>.</p> </div> </div><p> <a class="anchor" name="cff05412dc954845add611c5f71cef49"></a><!-- doxytag: member="irr::gui::IGUIFont::setInvisibleCharacters" ref="cff05412dc954845add611c5f71cef49" args="(const wchar_t *s)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void irr::gui::IGUIFont::setInvisibleCharacters </td> <td>(</td> <td class="paramtype">const wchar_t * </td> <td class="paramname"> <em>s</em> </td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Define which characters should not be drawn by the font. <p> For example " " would not draw any space which is usually blank in most fonts. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>s</em> </td><td>String of symbols which are not send down to the videodriver </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="9545ecfae06592acd47508f6824bb386"></a><!-- doxytag: member="irr::gui::IGUIFont::setKerningHeight" ref="9545ecfae06592acd47508f6824bb386" args="(s32 kerning)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void irr::gui::IGUIFont::setKerningHeight </td> <td>(</td> <td class="paramtype"><a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> </td> <td class="paramname"> <em>kerning</em> </td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Sets global kerning height for the font. <p> </div> </div><p> <a class="anchor" name="a683bb2535776b7f81adc050931d9b17"></a><!-- doxytag: member="irr::gui::IGUIFont::setKerningWidth" ref="a683bb2535776b7f81adc050931d9b17" args="(s32 kerning)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void irr::gui::IGUIFont::setKerningWidth </td> <td>(</td> <td class="paramtype"><a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> </td> <td class="paramname"> <em>kerning</em> </td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Sets global kerning width for the font. <p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="_i_g_u_i_font_8h-source.html">IGUIFont.h</a></ul> </div> <hr size="1"> <address style="align: right;"> <small> </small> </address> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td width="0"> <div align="left"><small><a href="http://irrlicht.sourceforge.net" target="_blank"><img src="irrlicht.png" alt="The Irrlicht Engine" align="middle" border=0 width=88 height=31></a></small></div></td> <td> <div align="left"><small><em><font size="2">The <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht Engine</a> Documentation © 2003-2009 by Nikolaus Gebhardt. Generated on Sun Jan 10 09:24:10 2010 by <a href="http://www.doxygen.org" target="_blank">Doxygen</a> (1.5.6)</font></em></small></div></td> </tr> </table> <address style="align: right;"> </address> </body> </html>