<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Measurement commands</title> <link href="quesoglc.css" rel="stylesheet" type="text/css"> </head><body> <table> <tr valign="top"> <td width="190" align="center"> <table class="qmenu" cellspacing="0"> <tr> <td class="qglobal"> <ul class="qmenu"> <li class="mainmenu"><a href="index.html" >Main</a></li> </ul> </td> </tr> <tr> <td class="qtitle">Tutorials</td> </tr> <tr> <td class="qglobal"> <ul class="qmenu"> <li class="mainmenu"><a href="tutorial.html">First Steps</a></li> <li class="mainmenu"><a href="tutorial2.html">Measurement</a></li> </ul> </td> </tr> <tr> <td class="qtitle">Documentation</td> </tr> <tr> <td class="qglobal"> <ul class="qmenu"> <li class="mainmenu"><a href="overview.html">Overview</a></li> <li class="mainmenu"><a href="glyph.html">Glyph conventions</a></li> <li class="mainmenu"><a href="machinedef.html">Machine definition</a></li> <li class="mainmenu"><a href="group__context.html">Context State</a></li> <li class="mainmenu"><a href="group__font.html">Fonts</a></li> <li class="mainmenu"><a href="group__global.html">Global</a></li> <li class="mainmenu"><a href="group__master.html">Master</a></li> <li class="mainmenu"><a href="group__transform.html">Transformation</a></li> <li class="mainmenu"><a href="group__render.html">Render</a></li> <li class="mainmenu"><a href="group__measure.html">Measurement</a></li> </ul> </td> </tr> </table> </td> <td> <table> <tr> <td class="main"> <!-- Generated by Doxygen 1.8.14 --> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">Measurement commands</div> </div> </div><!--header--> <div class="contents"> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ga0662d416bafc192517b0155ebba66579"><td class="memItemLeft" align="right" valign="top">GLfloat * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__measure.html#ga0662d416bafc192517b0155ebba66579">glcGetCharMetric</a> (GLint inCode, GLCenum inMetric, GLfloat *outVec)</td></tr> <tr class="separator:ga0662d416bafc192517b0155ebba66579"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga276d73d0aec98703a8aa3c05dc121ae5"><td class="memItemLeft" align="right" valign="top">GLfloat * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__measure.html#ga276d73d0aec98703a8aa3c05dc121ae5">glcGetMaxCharMetric</a> (GLCenum inMetric, GLfloat *outVec)</td></tr> <tr class="separator:ga276d73d0aec98703a8aa3c05dc121ae5"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gae8107460e2698b76de25b15f70df92da"><td class="memItemLeft" align="right" valign="top">GLfloat * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__measure.html#gae8107460e2698b76de25b15f70df92da">glcGetStringCharMetric</a> (GLint inIndex, GLCenum inMetric, GLfloat *outVec)</td></tr> <tr class="separator:gae8107460e2698b76de25b15f70df92da"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga9722aac509be8927b5fb2d10584b74db"><td class="memItemLeft" align="right" valign="top">GLfloat * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__measure.html#ga9722aac509be8927b5fb2d10584b74db">glcGetStringMetric</a> (GLCenum inMetric, GLfloat *outVec)</td></tr> <tr class="separator:ga9722aac509be8927b5fb2d10584b74db"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gad777f38686fef6e1e471ad46c4c4d578"><td class="memItemLeft" align="right" valign="top">GLint </td><td class="memItemRight" valign="bottom"><a class="el" href="group__measure.html#gad777f38686fef6e1e471ad46c4c4d578">glcMeasureCountedString</a> (GLboolean inMeasureChars, GLint inCount, const GLCchar *inString)</td></tr> <tr class="separator:gad777f38686fef6e1e471ad46c4c4d578"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga8c17cf3164f9b45d293704dd511b5e94"><td class="memItemLeft" align="right" valign="top">GLint </td><td class="memItemRight" valign="bottom"><a class="el" href="group__measure.html#ga8c17cf3164f9b45d293704dd511b5e94">glcMeasureString</a> (GLboolean inMeasureChars, const GLCchar *inString)</td></tr> <tr class="separator:ga8c17cf3164f9b45d293704dd511b5e94"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <p>Those commands returns metrics (bounding box, baseline) of character or string layouts. </p> <p>Glyphs coordinates are defined in <em>em units</em> and are transformed during rendering to produce the desired mapping of the glyph shape into the GL window coordinate system. Moreover, GLC can return some metrics for a character and string layouts. The table below lists the metrics that are available : </p><center> <a class="anchor" id=""></a> <table class="doxtable"> <caption>Metrics for character and string layout</caption> <tr> <td>Name </td><td>Enumerant </td><td>Vector </td></tr> <tr> <td><b>GLC_BASELINE</b> </td><td>0x0030 </td><td>[ x<sub>l</sub> y<sub>l</sub> x<sub>r</sub> y<sub>r</sub> ] </td></tr> <tr> <td><b>GLC_BOUNDS</b> </td><td>0x0031 </td><td>[ x<sub>lb</sub> y<sub>lb</sub> x<sub>rb</sub> y<sub>rb</sub> x<sub>rt</sub> y<sub>rt</sub> x<sub>lt</sub> y<sub>lt</sub> ] </td></tr> </table> </center><p> <br /> <b>GLC_BASELINE</b> is the line segment from the origin of the layout to the origin of the following layout. <b>GLC_BOUNDS</b> is the bounding box of the layout.</p> <div class="image"> <img src="measure.png" alt="measure.png"/> <div class="caption"> Baseline and bounds</div></div> <br /> Each point <em>(x,y)</em> is computed in em coordinates, with the origin of a layout at <em>(0,0)</em>. If the value of the variable <b>GLC_RENDER_STYLE</b> is <b>GLC_BITMAP</b>, each point is transformed by the 2x2 <b>GLC_BITMAP_MATRIX</b>. </p> <h2 class="groupheader">Function Documentation</h2> <a id="ga0662d416bafc192517b0155ebba66579"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga0662d416bafc192517b0155ebba66579">◆ </a></span>glcGetCharMetric()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GLfloat* glcGetCharMetric </td> <td>(</td> <td class="paramtype">GLint </td> <td class="paramname"><em>inCode</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GLCenum </td> <td class="paramname"><em>inMetric</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GLfloat * </td> <td class="paramname"><em>outVec</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>This command is identical to the command <a class="el" href="group__render.html#gaa638920e1dedb09ef4085cffa86d0643" title="This command renders the character that inCode is mapped to. ">glcRenderChar()</a>, except that instead of rendering the character that <em>inCode</em> is mapped to, the command measures the resulting layout and stores in <em>outVec</em> the value of the metric identified by <em>inMetric</em>. </p> <p>If the command does not raise an error, its return value is <em>outVec</em>.</p> <p>The command raises <b>GLC_PARAMETER_ERROR</b> if <em>outVec</em> is NULL. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">inCode</td><td>The character to measure. </td></tr> <tr><td class="paramname">inMetric</td><td>The metric to measure, either <b>GLC_BASELINE</b> or <b>GLC_BOUNDS</b>. </td></tr> <tr><td class="paramname">outVec</td><td>A vector in which to store value of <em>inMetric</em> for specified character. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd><em>outVec</em> if the command succeeds, <b>NULL</b> otherwise. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__measure.html#ga276d73d0aec98703a8aa3c05dc121ae5" title="This command measures the layout that would result from rendering all mapped characters at the same o...">glcGetMaxCharMetric()</a> </dd> <dd> <a class="el" href="group__measure.html#gae8107460e2698b76de25b15f70df92da" title="This command retrieves a character metric from the GLC measurement buffer and stores it in outVec...">glcGetStringCharMetric()</a> </dd> <dd> <a class="el" href="group__measure.html#gad777f38686fef6e1e471ad46c4c4d578" title="This command is identical to the command glcRenderCountedString(), except that instead of rendering a...">glcMeasureCountedString()</a> </dd> <dd> <a class="el" href="group__measure.html#ga8c17cf3164f9b45d293704dd511b5e94" title="This command measures the layout that would result from rendering a string and stores the measurement...">glcMeasureString()</a> </dd></dl> </div> </div> <a id="ga276d73d0aec98703a8aa3c05dc121ae5"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga276d73d0aec98703a8aa3c05dc121ae5">◆ </a></span>glcGetMaxCharMetric()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GLfloat* glcGetMaxCharMetric </td> <td>(</td> <td class="paramtype">GLCenum </td> <td class="paramname"><em>inMetric</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GLfloat * </td> <td class="paramname"><em>outVec</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>This command measures the layout that would result from rendering all mapped characters at the same origin. </p> <p>This contrast with <a class="el" href="group__measure.html#gae8107460e2698b76de25b15f70df92da" title="This command retrieves a character metric from the GLC measurement buffer and stores it in outVec...">glcGetStringCharMetric()</a>, which measures characters as part of a string, that is, influenced by kerning, ligatures, and so on.</p> <p>This command evaluates the metrics of every fonts in the <b>GLC_CURRENT_FONT_LIST</b>. Fonts that are not listed in <b>GLC_CURRENT_FONT_LIST</b> are ignored.</p> <p>The command stores in <em>outVec</em> the value of the metric identified by <em>inMetric</em>. If the command does not raise an error, its return value is <em>outVec</em>.</p> <p>The command raises <b>GLC_PARAMETER_ERROR</b> if <em>outVec</em> is NULL. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">inMetric</td><td>The metric to measure, either <b>GLC_BASELINE</b> or <b>GLC_BOUNDS</b>. </td></tr> <tr><td class="paramname">outVec</td><td>A vector in which to store value of <em>inMetric</em> for all mapped character. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd><em>outVec</em> if the command succeeds, <b>NULL</b> otherwise. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__measure.html#ga0662d416bafc192517b0155ebba66579" title="This command is identical to the command glcRenderChar(), except that instead of rendering the charac...">glcGetCharMetric()</a> </dd> <dd> <a class="el" href="group__measure.html#gae8107460e2698b76de25b15f70df92da" title="This command retrieves a character metric from the GLC measurement buffer and stores it in outVec...">glcGetStringCharMetric()</a> </dd> <dd> <a class="el" href="group__measure.html#gad777f38686fef6e1e471ad46c4c4d578" title="This command is identical to the command glcRenderCountedString(), except that instead of rendering a...">glcMeasureCountedString()</a> </dd> <dd> <a class="el" href="group__measure.html#ga8c17cf3164f9b45d293704dd511b5e94" title="This command measures the layout that would result from rendering a string and stores the measurement...">glcMeasureString()</a> </dd></dl> </div> </div> <a id="gae8107460e2698b76de25b15f70df92da"></a> <h2 class="memtitle"><span class="permalink"><a href="#gae8107460e2698b76de25b15f70df92da">◆ </a></span>glcGetStringCharMetric()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GLfloat* glcGetStringCharMetric </td> <td>(</td> <td class="paramtype">GLint </td> <td class="paramname"><em>inIndex</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GLCenum </td> <td class="paramname"><em>inMetric</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GLfloat * </td> <td class="paramname"><em>outVec</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>This command retrieves a character metric from the GLC measurement buffer and stores it in <em>outVec</em>. </p> <p>To store a string in the measurement buffer, call <a class="el" href="group__measure.html#gad777f38686fef6e1e471ad46c4c4d578" title="This command is identical to the command glcRenderCountedString(), except that instead of rendering a...">glcMeasureCountedString()</a> or <a class="el" href="group__measure.html#ga8c17cf3164f9b45d293704dd511b5e94" title="This command measures the layout that would result from rendering a string and stores the measurement...">glcMeasureString()</a>.</p> <p>The character is identified by <em>inIndex</em>, and the metric is identified by <em>inMetric</em>.</p> <p>The command raises <b>GLC_PARAMETER_ERROR</b> if <em>inIndex</em> is less than zero or is greater than or equal to the value of the variable <b>GLC_MEASURED_CHAR_COUNT</b> or <em>outVec</em> is NULL. If the command does not raise an error, its return value is outVec. </p><dl class="section user"><dt>Example:</dt><dd>The following example first calls <a class="el" href="group__measure.html#ga8c17cf3164f9b45d293704dd511b5e94" title="This command measures the layout that would result from rendering a string and stores the measurement...">glcMeasureString()</a> to store the string "hello" in the measurement buffer. It then retrieves both the baseline and the bounding box for the whole string, then for each individual character.</dd></dl> <div class="fragment"><div class="line">GLfloat overallBaseline[4];</div><div class="line">GLfloat overallBoundingBox[8];</div><div class="line"></div><div class="line">GLfloat charBaslines[5][4];</div><div class="line">GLfloat charBoundingBoxes[5][8];</div><div class="line"></div><div class="line">GLint i;</div><div class="line"></div><div class="line"><a class="code" href="group__measure.html#ga8c17cf3164f9b45d293704dd511b5e94">glcMeasureString</a>(GL_TRUE, <span class="stringliteral">"hello"</span>);</div><div class="line"></div><div class="line"><a class="code" href="group__measure.html#ga9722aac509be8927b5fb2d10584b74db">glcGetStringMetric</a>(GLC_BASELINE, overallBaseline);</div><div class="line"><a class="code" href="group__measure.html#ga9722aac509be8927b5fb2d10584b74db">glcGetStringMetric</a>(GLC_BOUNDS, overallBoundingBox);</div><div class="line"></div><div class="line"><span class="keywordflow">for</span> (i = 0; i < 5; i++) {</div><div class="line"> <a class="code" href="group__measure.html#gae8107460e2698b76de25b15f70df92da">glcGetStringCharMetric</a>(i, GLC_BASELINE, charBaselines[i]);</div><div class="line"> <a class="code" href="group__measure.html#gae8107460e2698b76de25b15f70df92da">glcGetStringCharMetric</a>(i, GLC_BOUNDS, charBoundingBoxes[i]);</div><div class="line">}</div></div><!-- fragment --> <dl class="section note"><dt>Note</dt><dd><em>glcGetStringCharMetric</em> is useful if you're interested in the metrics of a character as it appears in a string, that is, influenced by kerning, ligatures, and so on. To measure a character as if it started at the origin, call <a class="el" href="group__measure.html#ga0662d416bafc192517b0155ebba66579" title="This command is identical to the command glcRenderChar(), except that instead of rendering the charac...">glcGetCharMetric()</a>. </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">inIndex</td><td>Specifies which element in the string to measure. </td></tr> <tr><td class="paramname">inMetric</td><td>The metric to measure, either <b>GLC_BASELINE</b> or <b>GLC_BOUNDS</b>. </td></tr> <tr><td class="paramname">outVec</td><td>A vector in which to store value of <em>inMetric</em> for the character identified by <em>inIndex</em>. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd><em>outVec</em> if the command succeeds, <b>NULL</b> otherwise. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__measure.html#ga0662d416bafc192517b0155ebba66579" title="This command is identical to the command glcRenderChar(), except that instead of rendering the charac...">glcGetCharMetric()</a> </dd> <dd> <a class="el" href="group__measure.html#ga276d73d0aec98703a8aa3c05dc121ae5" title="This command measures the layout that would result from rendering all mapped characters at the same o...">glcGetMaxCharMetric()</a> </dd> <dd> <a class="el" href="group__measure.html#gad777f38686fef6e1e471ad46c4c4d578" title="This command is identical to the command glcRenderCountedString(), except that instead of rendering a...">glcMeasureCountedString()</a> </dd> <dd> <a class="el" href="group__measure.html#ga8c17cf3164f9b45d293704dd511b5e94" title="This command measures the layout that would result from rendering a string and stores the measurement...">glcMeasureString()</a> </dd></dl> </div> </div> <a id="ga9722aac509be8927b5fb2d10584b74db"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga9722aac509be8927b5fb2d10584b74db">◆ </a></span>glcGetStringMetric()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GLfloat* glcGetStringMetric </td> <td>(</td> <td class="paramtype">GLCenum </td> <td class="paramname"><em>inMetric</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GLfloat * </td> <td class="paramname"><em>outVec</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>This command retrieves a string metric from the GLC measurement buffer and stores it in <em>outVec</em>. </p> <p>The metric is identified by <em>inMetric</em>. To store a string from the GLC measurement buffer, call <a class="el" href="group__measure.html#gad777f38686fef6e1e471ad46c4c4d578" title="This command is identical to the command glcRenderCountedString(), except that instead of rendering a...">glcMeasureCountedString()</a> or <a class="el" href="group__measure.html#ga8c17cf3164f9b45d293704dd511b5e94" title="This command measures the layout that would result from rendering a string and stores the measurement...">glcMeasureString()</a>.</p> <p>The command raises <b>GLC_PARAMETER_ERROR</b> if <em>outVec</em> is <b>GLC_NONE</b> </p> <p>If the command does not raise an error, its return value is <em>outVec</em>. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">inMetric</td><td>The metric to measure, either <b>GLC_BASELINE</b> or <b>GLC_BOUNDS</b>. </td></tr> <tr><td class="paramname">outVec</td><td>A vector in which to store value of <em>inMetric</em> for the character identified by <em>inIndex</em>. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd><em>outVec</em> if the command succeeds, <b>NULL</b> otherwise. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__measure.html#ga0662d416bafc192517b0155ebba66579" title="This command is identical to the command glcRenderChar(), except that instead of rendering the charac...">glcGetCharMetric()</a> </dd> <dd> <a class="el" href="group__measure.html#ga276d73d0aec98703a8aa3c05dc121ae5" title="This command measures the layout that would result from rendering all mapped characters at the same o...">glcGetMaxCharMetric()</a> </dd> <dd> <a class="el" href="group__measure.html#gae8107460e2698b76de25b15f70df92da" title="This command retrieves a character metric from the GLC measurement buffer and stores it in outVec...">glcGetStringCharMetric()</a> </dd> <dd> <a class="el" href="group__measure.html#gad777f38686fef6e1e471ad46c4c4d578" title="This command is identical to the command glcRenderCountedString(), except that instead of rendering a...">glcMeasureCountedString()</a> </dd> <dd> <a class="el" href="group__measure.html#ga8c17cf3164f9b45d293704dd511b5e94" title="This command measures the layout that would result from rendering a string and stores the measurement...">glcMeasureString()</a> </dd></dl> </div> </div> <a id="gad777f38686fef6e1e471ad46c4c4d578"></a> <h2 class="memtitle"><span class="permalink"><a href="#gad777f38686fef6e1e471ad46c4c4d578">◆ </a></span>glcMeasureCountedString()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GLint glcMeasureCountedString </td> <td>(</td> <td class="paramtype">GLboolean </td> <td class="paramname"><em>inMeasureChars</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GLint </td> <td class="paramname"><em>inCount</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const GLCchar * </td> <td class="paramname"><em>inString</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>This command is identical to the command <a class="el" href="group__render.html#gac3f777a9c566a0e203d30a889d61a2d4" title="This command is identical to the command glcRenderChar(), except that it renders a string of characte...">glcRenderCountedString()</a>, except that instead of rendering a string, the command measures the resulting layout and stores the measurement in the GLC measurement buffer. </p> <p>The string comprises the first <em>inCount</em> elements of the array <em>inString</em>, which need not be followed by a zero element.</p> <p>If the value <em>inMeasureChars</em> is nonzero, the command computes metrics for each character and for the overall string, and it assigns the value <em>inCount</em> to the variable <b>GLC_MEASURED_CHARACTER_COUNT</b>. Otherwise, the command computes metrics only for the overall string, and it assigns the value zero to the variable <b>GLC_MEASURED_CHARACTER_COUNT</b>.</p> <p>If the command does not raise an error, its return value is the value of the variable <b>GLC_MEASURED_CHARACTER_COUNT</b>.</p> <p>The command raises <b>GLC_PARAMETER_ERROR</b> if <em>inCount</em> is less than zero. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">inMeasureChars</td><td>Specifies whether to compute metrics only for the string or for the characters as well. </td></tr> <tr><td class="paramname">inCount</td><td>The number of elements to measure, starting at the first element. </td></tr> <tr><td class="paramname">inString</td><td>The string to be measured. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The variable <b>GLC_MEASURED_CHARACTER_COUNT</b> if the command succeeds, zero otherwise. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__context.html#gad9d771a80cebb0d5e346066d2636bca0" title="This command returns the value of the integer variable or constant identified by inAttrib. ">glcGeti()</a> with argument GLC_MEASURED_CHAR_COUNT </dd> <dd> <a class="el" href="group__measure.html#gae8107460e2698b76de25b15f70df92da" title="This command retrieves a character metric from the GLC measurement buffer and stores it in outVec...">glcGetStringCharMetric()</a> </dd> <dd> <a class="el" href="group__measure.html#ga9722aac509be8927b5fb2d10584b74db" title="This command retrieves a string metric from the GLC measurement buffer and stores it in outVec...">glcGetStringMetric()</a> </dd></dl> </div> </div> <a id="ga8c17cf3164f9b45d293704dd511b5e94"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga8c17cf3164f9b45d293704dd511b5e94">◆ </a></span>glcMeasureString()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GLint glcMeasureString </td> <td>(</td> <td class="paramtype">GLboolean </td> <td class="paramname"><em>inMeasureChars</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const GLCchar * </td> <td class="paramname"><em>inString</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>This command measures the layout that would result from rendering a string and stores the measurements in the GLC measurement buffer. </p> <p>This command is identical to the command <a class="el" href="group__measure.html#gad777f38686fef6e1e471ad46c4c4d578" title="This command is identical to the command glcRenderCountedString(), except that instead of rendering a...">glcMeasureCountedString()</a>, except that <em>inString</em> is zero terminated, not counted.</p> <p>If the command does not raise an error, its return value is the value of the variable <b>GLC_MEASURED_CHARACTER_COUNT</b>. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">inMeasureChars</td><td>Specifies whether to compute metrics only for the string or for the characters as well. </td></tr> <tr><td class="paramname">inString</td><td>The string to be measured. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The variable <b>GLC_MEASURED_CHARACTER_COUNT</b> if the command succeeds, zero otherwise. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__context.html#gad9d771a80cebb0d5e346066d2636bca0" title="This command returns the value of the integer variable or constant identified by inAttrib. ">glcGeti()</a> with argument GLC_MEASURED_CHAR_COUNT </dd> <dd> <a class="el" href="group__measure.html#gae8107460e2698b76de25b15f70df92da" title="This command retrieves a character metric from the GLC measurement buffer and stores it in outVec...">glcGetStringCharMetric()</a> </dd> <dd> <a class="el" href="group__measure.html#ga9722aac509be8927b5fb2d10584b74db" title="This command retrieves a string metric from the GLC measurement buffer and stores it in outVec...">glcGetStringMetric()</a> </dd></dl> </div> </div> </div><!-- contents --> </td> </tr> <tr> <td align="center" class="main"> <hr> <small> <font color="#cccccc">Generated on Mon Oct 1 2018 06:30:23 for QuesoGLC by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0></a> 1.8.14 written by Dimitri van Heesch © 1997-2005</font> </small> </td> </tr> </table> </td> </tr> </table> </body> </html>