📄 classwgui_1_1crenderedstring.html
字号:
<!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>wGui::CRenderedString class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> </center><hr><h1>wGui::CRenderedString Class Reference</h1><code>#include <<a class="el" href="wg__renderedstring_8h-source.html">wg_renderedstring.h</a>></code><p><h2>Public Types</h2><ul><li>enum <a class="el" href="classwGui_1_1CRenderedString.html#s7">EVAlign</a> { <a class="el" href="classwGui_1_1CRenderedString.html#s7s0">VALIGN_NORMAL</a>, <a class="el" href="classwGui_1_1CRenderedString.html#s7s1">VALIGN_CENTER</a>, <a class="el" href="classwGui_1_1CRenderedString.html#s7s2">VALIGN_TOP</a>, <a class="el" href="classwGui_1_1CRenderedString.html#s7s3">VALIGN_BOTTOM</a> }<dl class="el"><dd><font size=-1><em>The vertical alignment of the text.</em> <a href="#s7">More...</a><em><br><br></em></font></dl><li>enum <a class="el" href="classwGui_1_1CRenderedString.html#s8">EHAlign</a> { <a class="el" href="classwGui_1_1CRenderedString.html#s8s4">HALIGN_LEFT</a>, <a class="el" href="classwGui_1_1CRenderedString.html#s8s5">HALIGN_CENTER</a>, <a class="el" href="classwGui_1_1CRenderedString.html#s8s6">HALIGN_RIGHT</a> }<dl class="el"><dd><font size=-1><em>The horizontal alignment of the text.</em> <a href="#s8">More...</a><em><br><br></em></font></dl></ul><h2>Public Methods</h2><ul><li><a class="el" href="classwGui_1_1CRenderedString.html#a0">CRenderedString</a> (<a class="el" href="classwGui_1_1CFontEngine.html">CFontEngine</a> *pFontEngine, const std::string &sString, <a class="el" href="classwGui_1_1CRenderedString.html#s7">EVAlign</a> eVertAlign=VALIGN_NORMAL, <a class="el" href="classwGui_1_1CRenderedString.html#s8">EHAlign</a> eHorzAlign=HALIGN_LEFT)<li>void <a class="el" href="classwGui_1_1CRenderedString.html#a1">Draw</a> (SDL_Surface *pSurface, const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &BoundingRect, const <a class="el" href="classwGui_1_1CPoint.html">CPoint</a> &OriginPoint, const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &FontColor=DEFAULT_LINE_COLOR) const<li>void <a class="el" href="classwGui_1_1CRenderedString.html#a2">GetMetrics</a> (<a class="el" href="classwGui_1_1CPoint.html">CPoint</a> *pBoundedDimensions, <a class="el" href="classwGui_1_1CPoint.html">CPoint</a> *pOriginOffset, std::vector< <a class="el" href="classwGui_1_1CRect.html">CRect</a> > *pCharacterRects=0) const<li>unsigned int <a class="el" href="classwGui_1_1CRenderedString.html#a3">GetLength</a> () const<li>unsigned int <a class="el" href="classwGui_1_1CRenderedString.html#a4">GetMaxFontHeight</a> ()<li>void <a class="el" href="classwGui_1_1CRenderedString.html#a5">SetMaskChar</a> (char MaskChar)</ul><h2>Protected Attributes</h2><ul><li><a name="n0" doxytag="wGui::CRenderedString::m_pFontEngine"></a><a class="el" href="classwGui_1_1CFontEngine.html">CFontEngine</a> * <a class="el" href="classwGui_1_1CRenderedString.html#n0">m_pFontEngine</a><dl class="el"><dd><font size=-1><em>A pointer to the font engine.<br><br></em></font></dl><li><a name="n1" doxytag="wGui::CRenderedString::m_sString"></a>std::string <a class="el" href="classwGui_1_1CRenderedString.html#n1">m_sString</a><dl class="el"><dd><font size=-1><em>The string to be rendered.<br><br></em></font></dl><li><a name="n2" doxytag="wGui::CRenderedString::m_MaskChar"></a>char <a class="el" href="classwGui_1_1CRenderedString.html#n2">m_MaskChar</a><dl class="el"><dd><font size=-1><em>Character tp use as the mask, used for passwords and such.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>For drawing a string to the screen Optimized for strings that don't often change <p><p>Definition at line <a class="el" href="wg__renderedstring_8h-source.html#l00047">47</a> of file <a class="el" href="wg__renderedstring_8h-source.html">wg_renderedstring.h</a>.<hr><h2>Member Enumeration Documentation</h2><a name="s8" doxytag="wGui::CRenderedString::EHAlign"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> enum wGui::CRenderedString::EHAlign </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>The horizontal alignment of the text.<p><dl compact><dt><b>Enumeration values: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em><a name="s8s4" doxytag="HALIGN_LEFT"></a><em>HALIGN_LEFT</em></em> </td><td>Align the text to the left of the drawing area.</td></tr><tr><td valign=top><em><a name="s8s5" doxytag="HALIGN_CENTER"></a><em>HALIGN_CENTER</em></em> </td><td>Align the text with the center of the drawing area.</td></tr><tr><td valign=top><em><a name="s8s6" doxytag="HALIGN_RIGHT"></a><em>HALIGN_RIGHT</em></em> </td><td>Align the text with the right of the drawing area.</td></tr></table></dl><p>Definition at line <a class="el" href="wg__renderedstring_8h-source.html#l00060">60</a> of file <a class="el" href="wg__renderedstring_8h-source.html">wg_renderedstring.h</a>. </td> </tr></table><a name="s7" doxytag="wGui::CRenderedString::EVAlign"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> enum wGui::CRenderedString::EVAlign </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>The vertical alignment of the text.<p><dl compact><dt><b>Enumeration values: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em><a name="s7s0" doxytag="VALIGN_NORMAL"></a><em>VALIGN_NORMAL</em></em> </td><td>Align the text so that the baseline is the bottom.</td></tr><tr><td valign=top><em><a name="s7s1" doxytag="VALIGN_CENTER"></a><em>VALIGN_CENTER</em></em> </td><td>Align the text in the center of the drawing area.</td></tr><tr><td valign=top><em><a name="s7s2" doxytag="VALIGN_TOP"></a><em>VALIGN_TOP</em></em> </td><td>Align the top of the tallest character with the top of the drawing area.</td></tr><tr><td valign=top><em><a name="s7s3" doxytag="VALIGN_BOTTOM"></a><em>VALIGN_BOTTOM</em></em> </td><td>Align the bottom of the lowest character with the bottom of the drawing area.</td></tr></table></dl><p>Definition at line <a class="el" href="wg__renderedstring_8h-source.html#l00051">51</a> of file <a class="el" href="wg__renderedstring_8h-source.html">wg_renderedstring.h</a>. </td> </tr></table><hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="wGui::CRenderedString::CRenderedString"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> wGui::CRenderedString::CRenderedString </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classwGui_1_1CFontEngine.html">CFontEngine</a> * </td> <td class="mdname" nowrap> <em>pFontEngine</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const std::string & </td> <td class="mdname" nowrap> <em>sString</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classwGui_1_1CRenderedString.html#s7">EVAlign</a> </td> <td class="mdname" nowrap> <em>eVertAlign</em> = VALIGN_NORMAL, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classwGui_1_1CRenderedString.html#s8">EHAlign</a> </td> <td class="mdname" nowrap> <em>eHorzAlign</em> = HALIGN_LEFT</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Construct a new <a class="el" href="classwGui_1_1CRenderedString.html">CRenderedString</a> object <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>pFontEngine</em> </td><td>A pointer to a <a class="el" href="classwGui_1_1CFontEngine.html">CFontEngine</a> object which is used to render the string </td></tr><tr><td valign=top><em>sString</em> </td><td>The string to render </td></tr><tr><td valign=top><em>eVertAlign</em> </td><td>The vertical alignment </td></tr><tr><td valign=top><em>eHorzAlign</em> </td><td>The horizontal alignment </td></tr></table></dl><p>Definition at line <a class="el" href="wg__renderedstring_8cpp-source.html#l00034">34</a> of file <a class="el" href="wg__renderedstring_8cpp-source.html">wg_renderedstring.cpp</a>.<p>References <a class="el" href="wg__renderedstring_8h-source.html#l00101">m_pFontEngine</a>. </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a1" doxytag="wGui::CRenderedString::Draw"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void wGui::CRenderedString::Draw </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">SDL_Surface * </td> <td class="mdname" nowrap> <em>pSurface</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classwGui_1_1CRect.html">CRect</a> & </td> <td class="mdname" nowrap> <em>BoundingRect</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classwGui_1_1CPoint.html">CPoint</a> & </td> <td class="mdname" nowrap> <em>OriginPoint</em>, </td> </tr> <tr> <td></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -