Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 1ef284ce2eda462d5c7f167d61fd17d0 > files > 50

libquesoglc0-0.7.2-6.mga5.i586.rpm

<!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>Rendering 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.8 -->
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Rendering 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:gaa638920e1dedb09ef4085cffa86d0643"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__render.html#gaa638920e1dedb09ef4085cffa86d0643">glcRenderChar</a> (GLint inCode)</td></tr>
<tr class="separator:gaa638920e1dedb09ef4085cffa86d0643"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac3f777a9c566a0e203d30a889d61a2d4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__render.html#gac3f777a9c566a0e203d30a889d61a2d4">glcRenderCountedString</a> (GLint inCount, const GLCchar *inString)</td></tr>
<tr class="separator:gac3f777a9c566a0e203d30a889d61a2d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93708ef20c96fd01019fcd9eb18f0b03"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__render.html#ga93708ef20c96fd01019fcd9eb18f0b03">glcRenderString</a> (const GLCchar *inString)</td></tr>
<tr class="separator:ga93708ef20c96fd01019fcd9eb18f0b03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf2c3b227f8a14f11b6ceb8b694629e9d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__render.html#gaf2c3b227f8a14f11b6ceb8b694629e9d">glcRenderStyle</a> (GLCenum inStyle)</td></tr>
<tr class="separator:gaf2c3b227f8a14f11b6ceb8b694629e9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad6ceb79cd2320d21d7424727911bada0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__render.html#gad6ceb79cd2320d21d7424727911bada0">glcReplacementCode</a> (GLint inCode)</td></tr>
<tr class="separator:gad6ceb79cd2320d21d7424727911bada0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8beb4693bd71d18d1ebbeb2bbdbb070"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__render.html#gaa8beb4693bd71d18d1ebbeb2bbdbb070">glcResolution</a> (GLfloat inVal)</td></tr>
<tr class="separator:gaa8beb4693bd71d18d1ebbeb2bbdbb070"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>These are the commands that render characters to a GL render target. </p>
<p>Those commands gather glyph datas according to the parameters that has been set in the state machine of GLC, and issue GL commands to render the characters layout to the GL render target.</p>
<p>When it renders a character, GLC finds a font that maps the character code to a character such as LATIN CAPITAL LETTER A, then uses one or more glyphs from the font to create a graphical layout that represents the character. Finally, GLC issues a sequence of GL commands to draw the layout. Glyph coordinates are defined in EM units and are transformed during rendering to produce the desired mapping of the glyph shape into the GL window coordinate system.</p>
<p>If GLC cannot find a font that maps the character code in the list <b>GLC_CURRENT_FONT_LIST</b>, it attemps to produce an alternate rendering. If the value of the boolean variable <b>GLC_AUTO_FONT</b> is set to <b>GL_TRUE</b>, GLC searches for a font that has the character that maps the character code. If the search succeeds, the font's ID is appended to <b>GLC_CURRENT_FONT_LIST</b> and the character is rendered.</p>
<p>If there are fonts in the list <b>GLC_CURRENT_FONT_LIST</b>, but a match for the character code cannot be found in any of those fonts, GLC goes through these steps :</p><ol type="1">
<li>If the value of the variable <b>GLC_REPLACEMENT_CODE</b> is nonzero, GLC finds a font that maps the replacement code, and renders the character that the replacement code is mapped to.</li>
<li>If the variable <b>GLC_REPLACEMENT_CODE</b> is zero, or if the replacement code does not result in a match, GLC checks whether a callback function is defined. If a callback function is defined for <b>GLC_OP_glcUnmappedCode</b>, GLC calls the function. The callback function provides the character code to the user and allows loading of the appropriate font. After the callback returns, GLC tries to render the character code again.</li>
<li>Otherwise, the command attemps to render the character sequence <em>\&lt;hexcode&gt;</em>, where \ is the character REVERSE SOLIDUS (U+5C), &lt; is the character LESS-THAN SIGN (U+3C), &gt; is the character GREATER-THAN SIGN (U+3E), and <em>hexcode</em> is the character code represented as a sequence of hexadecimal digits. The sequence has no leading zeros, and alphabetic digits are in upper case. The GLC measurement commands treat the sequence as a single character.</li>
</ol>
<p>The rendering commands raise <b>GLC_PARAMETER_ERROR</b> if the callback function defined for <b>GLC_OP_glcUnmappedCode</b> is called and the current string type is <b>GLC_UTF8_QSO</b>.</p>
<dl class="section note"><dt>Note</dt><dd>Some rendering commands create and/or use display lists and/or textures. The IDs of those display lists and textures are stored in the current GLC context but the display lists and the textures themselves are managed by the current GL context. In order not to impact the performance of error-free programs, QuesoGLC does not check if the current GL context is the same than the one where the display lists and the textures were actually created. If the current GL context has changed meanwhile, the result of commands that refer to the corresponding display lists or textures is undefined.</dd></dl>
<p>As a reminder, the render commands may issue GL commands, hence a GL context must be bound to the current thread such that the GLC commands produce the desired result. It is the responsibility of the GLC client to set up the underlying GL implementation. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaa638920e1dedb09ef4085cffa86d0643"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glcRenderChar </td>
          <td>(</td>
          <td class="paramtype">GLint&#160;</td>
          <td class="paramname"><em>inCode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This command renders the character that <em>inCode</em> is mapped to. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inCode</td><td>The character to render </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__render.html#ga93708ef20c96fd01019fcd9eb18f0b03" title="This command is identical to the command glcRenderCountedString(), except that inString is zero termi...">glcRenderString()</a> </dd>
<dd>
<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> </dd>
<dd>
<a class="el" href="group__render.html#gad6ceb79cd2320d21d7424727911bada0" title="This command assigns the value inCode to the variable GLC_REPLACEMENT_CODE. ">glcReplacementCode()</a> </dd>
<dd>
<a class="el" href="group__render.html#gaf2c3b227f8a14f11b6ceb8b694629e9d" title="This command assigns the value inStyle to the variable GLC_RENDER_STYLE. ">glcRenderStyle()</a> </dd>
<dd>
<a class="el" href="group__context.html#gae92b6e682d3552ddddd010d2d99b3c10" title="This command assigns the value inFunc to the callback function variable identified by inOpCode which ...">glcCallbackFunc()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gac3f777a9c566a0e203d30a889d61a2d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glcRenderCountedString </td>
          <td>(</td>
          <td class="paramtype">GLint&#160;</td>
          <td class="paramname"><em>inCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const GLCchar *&#160;</td>
          <td class="paramname"><em>inString</em>&#160;</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 it renders a string of characters. </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>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">inCount</td><td>The number of elements in the string to be rendered </td></tr>
    <tr><td class="paramname">inString</td><td>The array of characters from which to render <em>inCount</em> elements. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__render.html#gaa638920e1dedb09ef4085cffa86d0643" title="This command renders the character that inCode is mapped to. ">glcRenderChar()</a> </dd>
<dd>
<a class="el" href="group__render.html#ga93708ef20c96fd01019fcd9eb18f0b03" title="This command is identical to the command glcRenderCountedString(), except that inString is zero termi...">glcRenderString()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga93708ef20c96fd01019fcd9eb18f0b03"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glcRenderString </td>
          <td>(</td>
          <td class="paramtype">const GLCchar *&#160;</td>
          <td class="paramname"><em>inString</em></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 <em>inString</em> is zero terminated, not counted. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inString</td><td>A zero-terminated string of characters. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__render.html#gaa638920e1dedb09ef4085cffa86d0643" title="This command renders the character that inCode is mapped to. ">glcRenderChar()</a> </dd>
<dd>
<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> </dd></dl>

</div>
</div>
<a class="anchor" id="gaf2c3b227f8a14f11b6ceb8b694629e9d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glcRenderStyle </td>
          <td>(</td>
          <td class="paramtype">GLCenum&#160;</td>
          <td class="paramname"><em>inStyle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This command assigns the value <em>inStyle</em> to the variable <b>GLC_RENDER_STYLE</b>. </p>
<p>Legal values for <em>inStyle</em> are defined in the table below : </p><center> <table class="doxtable">
<caption align="bottom">Rendering styles</caption>
<tr>
<td>Name </td><td>Enumerant  </td></tr>
<tr>
<td><b>GLC_BITMAP</b> </td><td>0x0100  </td></tr>
<tr>
<td><b>GLC_LINE</b> </td><td>0x0101  </td></tr>
<tr>
<td><b>GLC_TEXTURE</b> </td><td>0x0102  </td></tr>
<tr>
<td><b>GLC_TRIANGLE</b> </td><td>0x0103  </td></tr>
</table>
</center> <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inStyle</td><td>The value to assign to the variable <b>GLC_RENDER_STYLE</b>. </td></tr>
  </table>
  </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 <b>GLC_RENDER_STYLE</b> </dd></dl>

</div>
</div>
<a class="anchor" id="gad6ceb79cd2320d21d7424727911bada0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glcReplacementCode </td>
          <td>(</td>
          <td class="paramtype">GLint&#160;</td>
          <td class="paramname"><em>inCode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This command assigns the value <em>inCode</em> to the variable <b>GLC_REPLACEMENT_CODE</b>. </p>
<p>The replacement code is the code which is used whenever <a class="el" href="group__render.html#gaa638920e1dedb09ef4085cffa86d0643" title="This command renders the character that inCode is mapped to. ">glcRenderChar()</a> can not find a font that owns a character which the parameter <em>inCode</em> of <a class="el" href="group__render.html#gaa638920e1dedb09ef4085cffa86d0643" title="This command renders the character that inCode is mapped to. ">glcRenderChar()</a> maps to. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inCode</td><td>An integer to assign to <b>GLC_REPLACEMENT_CODE</b>. </td></tr>
  </table>
  </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 <b>GLC_REPLACEMENT_CODE</b> </dd>
<dd>
<a class="el" href="group__render.html#gaa638920e1dedb09ef4085cffa86d0643" title="This command renders the character that inCode is mapped to. ">glcRenderChar()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaa8beb4693bd71d18d1ebbeb2bbdbb070"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glcResolution </td>
          <td>(</td>
          <td class="paramtype">GLfloat&#160;</td>
          <td class="paramname"><em>inVal</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This command assigns the value <em>inVal</em> to the variable <b>GLC_RESOLUTION</b>. </p>
<p>It is used to compute the size of characters in pixels from the size in points.</p>
<p>The resolution is given in <em>dpi</em> (dots per inch). If <em>inVal</em> is zero, the resolution defaults to 72 dpi.</p>
<p>The command raises <b>GLC_PARAMETER_ERROR</b> if <em>inVal</em> is negative. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inVal</td><td>A floating point number to be used as resolution. </td></tr>
  </table>
  </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_RESOLUTION </dd></dl>

</div>
</div>
</div><!-- contents -->
          </td>
	</tr>
        <tr>
          <td align="center" class="main">
	    <hr>
            <small>
              <font color="#cccccc">Generated on Fri Oct 17 2014 04:12:42 for QuesoGLC by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0></a> 1.8.8 written by Dimitri van Heesch &copy;&nbsp;1997-2005</font>
            </small>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>