<!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>Transformation 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.3 --> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">Transformation 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:gabdba358367cc64c367239835ccae31ff"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__transform.html#gabdba358367cc64c367239835ccae31ff">glcLoadIdentity</a> (void)</td></tr> <tr class="separator:gabdba358367cc64c367239835ccae31ff"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga10616759e9037617b4d0fb2137c3c85c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__transform.html#ga10616759e9037617b4d0fb2137c3c85c">glcLoadMatrix</a> (const GLfloat *inMatrix)</td></tr> <tr class="separator:ga10616759e9037617b4d0fb2137c3c85c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gadd73685fb3e265f1365cad86582f37eb"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__transform.html#gadd73685fb3e265f1365cad86582f37eb">glcMultMatrix</a> (const GLfloat *inMatrix)</td></tr> <tr class="separator:gadd73685fb3e265f1365cad86582f37eb"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga978d760fac5b11cd876b8c3a0055dadf"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__transform.html#ga978d760fac5b11cd876b8c3a0055dadf">glcRotate</a> (GLfloat inAngle)</td></tr> <tr class="separator:ga978d760fac5b11cd876b8c3a0055dadf"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga71a9a779d35bc8c4631de7cbda21cea6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__transform.html#ga71a9a779d35bc8c4631de7cbda21cea6">glcScale</a> (GLfloat inX, GLfloat inY)</td></tr> <tr class="separator:ga71a9a779d35bc8c4631de7cbda21cea6"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga4c4a11ea77e853c2196d5f62133a89db"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__transform.html#ga4c4a11ea77e853c2196d5f62133a89db">glcPushMatrixQSO</a> (void)</td></tr> <tr class="separator:ga4c4a11ea77e853c2196d5f62133a89db"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gacab52dd7062ee6fc45cac447b9ce48fa"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__transform.html#gacab52dd7062ee6fc45cac447b9ce48fa">glcPopMatrixQSO</a> (void)</td></tr> <tr class="separator:gacab52dd7062ee6fc45cac447b9ce48fa"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <p>The GLC transformation commands modify the value of <b>GLC_BITMAP_MATRIX</b>. </p> <p>Glyph coordinates are defined in the em coordinate system. When the value of <b>GLC_RENDER_STYLE</b> is <b>GLC_BITMAP</b>, GLC uses the 2x2 <b>GLC_BITMAP_MATRIX</b> to transform layouts from the em coordinate system to the GL raster coordinate system in which bitmaps are drawn.</p> <p>When the value of the variable <b>GLC_RENDER_STYLE</b> is not <b>GLC_BITMAP</b>, GLC performs no transformations on glyph coordinates. In this case, GLC uses em coordinates directly as GL world coordinates when drawing a layout, and it is the responsibility of the GLC client to issue GL commands that set up the appropriate GL transformations.</p> <p>There is a stack of matrices for <b>GLC_BITMAP_MATRIX</b>, the stack depth is at least 32 (that is, there is a stack of at least 32 matrices). Matrices can be pushed or popped in the stack with <a class="el" href="group__transform.html#ga4c4a11ea77e853c2196d5f62133a89db" title="This command pushes the stack down by one, duplicating the current GLC_BITMAP_MATRIX in both the top ...">glcPushMatrixQSO()</a> and <a class="el" href="group__transform.html#gacab52dd7062ee6fc45cac447b9ce48fa" title="This command pops the top entry off the stack, replacing the current GLC_BITMAP_MATRIX with the matri...">glcPopMatrixQSO()</a>. The maximum depth is implementation specific but can be retrieved by calling <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 <b>GLC_MAX_MATRIX_STACK_DEPTH_QSO</b>. The number of matrices that are currently stored in the stack can be retrieved by calling <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 <b>GLC_MATRIX_STACK_DEPTH_QSO</b>. </p> <h2 class="groupheader">Function Documentation</h2> <a class="anchor" id="gabdba358367cc64c367239835ccae31ff"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void glcLoadIdentity </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>This command assigns the value [1 0 0 1] to the floating point vector variable <b>GLC_BITMAP_MATRIX</b>. </p> <dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__context.html#gad4ed4c60459d1d8590f3c6ad83b26dcb" title="This command stores into outVec the value of the floating point vector identified by inAttrib...">glcGetfv()</a> with argument <b>GLC_BITMAP_MATRIX</b> </dd> <dd> <a class="el" href="group__transform.html#ga10616759e9037617b4d0fb2137c3c85c" title="This command assigns the value [inMatrix[0] inMatrix[1] inMatrix[2] inMatrix[3]] to the floating poin...">glcLoadMatrix()</a> </dd> <dd> <a class="el" href="group__transform.html#gadd73685fb3e265f1365cad86582f37eb" title="This command multiply the floating point vector variable GLC_BITMAP_MATRIX by the incoming matrix inM...">glcMultMatrix()</a> </dd> <dd> <a class="el" href="group__transform.html#ga978d760fac5b11cd876b8c3a0055dadf" title="This command assigns the value [a b c d] to the floating point vector variable GLC_BITMAP_MATRIX, where inAngle is measured in degrees, and .">glcRotate()</a> </dd> <dd> <a class="el" href="group__transform.html#ga71a9a779d35bc8c4631de7cbda21cea6" title="This command produces a general scaling along the x and y axes, that is, it assigns the value [a b c ...">glcScale()</a> </dd></dl> </div> </div> <a class="anchor" id="ga10616759e9037617b4d0fb2137c3c85c"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void glcLoadMatrix </td> <td>(</td> <td class="paramtype">const GLfloat * </td> <td class="paramname"><em>inMatrix</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>This command assigns the value [inMatrix[0] inMatrix[1] inMatrix[2] inMatrix[3]] to the floating point vector variable <b>GLC_BITMAP_MATRIX</b>. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">inMatrix</td><td>The value to assign to <b>GLC_BITMAP_MATRIX</b> </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__context.html#gad4ed4c60459d1d8590f3c6ad83b26dcb" title="This command stores into outVec the value of the floating point vector identified by inAttrib...">glcGetfv()</a> with argument <b>GLC_BITMAP_MATRIX</b> </dd> <dd> <a class="el" href="group__transform.html#gabdba358367cc64c367239835ccae31ff" title="This command assigns the value [1 0 0 1] to the floating point vector variable GLC_BITMAP_MATRIX.">glcLoadIdentity()</a> </dd> <dd> <a class="el" href="group__transform.html#gadd73685fb3e265f1365cad86582f37eb" title="This command multiply the floating point vector variable GLC_BITMAP_MATRIX by the incoming matrix inM...">glcMultMatrix()</a> </dd> <dd> <a class="el" href="group__transform.html#ga978d760fac5b11cd876b8c3a0055dadf" title="This command assigns the value [a b c d] to the floating point vector variable GLC_BITMAP_MATRIX, where inAngle is measured in degrees, and .">glcRotate()</a> </dd> <dd> <a class="el" href="group__transform.html#ga71a9a779d35bc8c4631de7cbda21cea6" title="This command produces a general scaling along the x and y axes, that is, it assigns the value [a b c ...">glcScale()</a> </dd></dl> </div> </div> <a class="anchor" id="gadd73685fb3e265f1365cad86582f37eb"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void glcMultMatrix </td> <td>(</td> <td class="paramtype">const GLfloat * </td> <td class="paramname"><em>inMatrix</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>This command multiply the floating point vector variable <b>GLC_BITMAP_MATRIX</b> by the incoming matrix <em>inMatrix</em>. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">inMatrix</td><td>A pointer to a 2x2 matrix stored in column-major order as 4 consecutives values. </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__context.html#gad4ed4c60459d1d8590f3c6ad83b26dcb" title="This command stores into outVec the value of the floating point vector identified by inAttrib...">glcGetfv()</a> with argument <b>GLC_BITMAP_MATRIX</b> </dd> <dd> <a class="el" href="group__transform.html#gabdba358367cc64c367239835ccae31ff" title="This command assigns the value [1 0 0 1] to the floating point vector variable GLC_BITMAP_MATRIX.">glcLoadIdentity()</a> </dd> <dd> <a class="el" href="group__transform.html#ga10616759e9037617b4d0fb2137c3c85c" title="This command assigns the value [inMatrix[0] inMatrix[1] inMatrix[2] inMatrix[3]] to the floating poin...">glcLoadMatrix()</a> </dd> <dd> <a class="el" href="group__transform.html#ga978d760fac5b11cd876b8c3a0055dadf" title="This command assigns the value [a b c d] to the floating point vector variable GLC_BITMAP_MATRIX, where inAngle is measured in degrees, and .">glcRotate()</a> </dd> <dd> <a class="el" href="group__transform.html#ga71a9a779d35bc8c4631de7cbda21cea6" title="This command produces a general scaling along the x and y axes, that is, it assigns the value [a b c ...">glcScale()</a> </dd></dl> </div> </div> <a class="anchor" id="ga978d760fac5b11cd876b8c3a0055dadf"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void glcRotate </td> <td>(</td> <td class="paramtype">GLfloat </td> <td class="paramname"><em>inAngle</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>This command assigns the value [a b c d] to the floating point vector variable <b>GLC_BITMAP_MATRIX</b>, where <em>inAngle</em> is measured in degrees, <img class="formulaInl" alt="$ \theta = inAngle * \pi / 180 $" src="form_0.png"/> and <br/> <img class="formulaInl" alt="$ \left [ \begin {array}{ll} a & b \\ c & d \\ \end {array} \right ] = \left [ \begin {array}{ll} GLC\_BITMAP\_MATRIX[0] & GLC\_BITMAP\_MATRIX[2] \\ GLC\_BITMAP\_MATRIX[1] & GLC\_BITMAP\_MATRIX[3] \\ \end{array} \right ] \left [ \begin {array}{ll} cos \theta & sin \theta \\ -sin \theta & cos\theta \\ \end{array} \right ] $" src="form_1.png"/>. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">inAngle</td><td>The angle of rotation around the Z axis, in degrees. </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__context.html#gad4ed4c60459d1d8590f3c6ad83b26dcb" title="This command stores into outVec the value of the floating point vector identified by inAttrib...">glcGetfv()</a> with argument <b>GLC_BITMAP_MATRIX</b> </dd> <dd> <a class="el" href="group__transform.html#gabdba358367cc64c367239835ccae31ff" title="This command assigns the value [1 0 0 1] to the floating point vector variable GLC_BITMAP_MATRIX.">glcLoadIdentity()</a> </dd> <dd> <a class="el" href="group__transform.html#ga10616759e9037617b4d0fb2137c3c85c" title="This command assigns the value [inMatrix[0] inMatrix[1] inMatrix[2] inMatrix[3]] to the floating poin...">glcLoadMatrix()</a> </dd> <dd> <a class="el" href="group__transform.html#gadd73685fb3e265f1365cad86582f37eb" title="This command multiply the floating point vector variable GLC_BITMAP_MATRIX by the incoming matrix inM...">glcMultMatrix()</a> </dd> <dd> <a class="el" href="group__transform.html#ga71a9a779d35bc8c4631de7cbda21cea6" title="This command produces a general scaling along the x and y axes, that is, it assigns the value [a b c ...">glcScale()</a> </dd></dl> </div> </div> <a class="anchor" id="ga71a9a779d35bc8c4631de7cbda21cea6"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void glcScale </td> <td>(</td> <td class="paramtype">GLfloat </td> <td class="paramname"><em>inX</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GLfloat </td> <td class="paramname"><em>inY</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>This command produces a general scaling along the <b>x</b> and <b>y</b> axes, that is, it assigns the value [a b c d] to the floating point vector variable <b>GLC_BITMAP_MATRIX</b>, where <br/> <img class="formulaInl" alt="$ \left [ \begin {array}{ll} a & b \\ c & d \\ \end {array} \right ] = \left [ \begin {array}{ll} GLC\_BITMAP\_MATRIX[0] & GLC\_BITMAP\_MATRIX[2] \\ GLC\_BITMAP\_MATRIX[1] & GLC\_BITMAP\_MATRIX[3] \\ \end{array} \right ] \left [ \begin {array}{ll} inX & 0 \\ 0 & inY \\ \end{array} \right ] $" src="form_2.png"/>. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">inX</td><td>The scale factor along the <b>x</b> axis </td></tr> <tr><td class="paramname">inY</td><td>The scale factor along the <b>y</b> axis </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__context.html#gad4ed4c60459d1d8590f3c6ad83b26dcb" title="This command stores into outVec the value of the floating point vector identified by inAttrib...">glcGetfv()</a> with argument <b>GLC_BITMAP_MATRIX</b> </dd> <dd> <a class="el" href="group__transform.html#gabdba358367cc64c367239835ccae31ff" title="This command assigns the value [1 0 0 1] to the floating point vector variable GLC_BITMAP_MATRIX.">glcLoadIdentity()</a> </dd> <dd> <a class="el" href="group__transform.html#ga10616759e9037617b4d0fb2137c3c85c" title="This command assigns the value [inMatrix[0] inMatrix[1] inMatrix[2] inMatrix[3]] to the floating poin...">glcLoadMatrix()</a> </dd> <dd> <a class="el" href="group__transform.html#gadd73685fb3e265f1365cad86582f37eb" title="This command multiply the floating point vector variable GLC_BITMAP_MATRIX by the incoming matrix inM...">glcMultMatrix()</a> </dd> <dd> <a class="el" href="group__transform.html#ga978d760fac5b11cd876b8c3a0055dadf" title="This command assigns the value [a b c d] to the floating point vector variable GLC_BITMAP_MATRIX, where inAngle is measured in degrees, and .">glcRotate()</a> </dd></dl> </div> </div> <a class="anchor" id="ga4c4a11ea77e853c2196d5f62133a89db"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void glcPushMatrixQSO </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>This command pushes the stack down by one, duplicating the current <b>GLC_BITMAP_MATRIX</b> in both the top of the stack and the entry below it. </p> <p>Pushing a matrix onto a full stack generates the error <b>GLC_STACK_OVERFLOW_QSO</b>. </p> <dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__transform.html#gacab52dd7062ee6fc45cac447b9ce48fa" title="This command pops the top entry off the stack, replacing the current GLC_BITMAP_MATRIX with the matri...">glcPopMatrixQSO()</a> </dd> <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_MATRIX_STACK_DEPTH_QSO</b> </dd> <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_MAX_MATRIX_STACK_DEPTH_QSO</b> </dd></dl> </div> </div> <a class="anchor" id="gacab52dd7062ee6fc45cac447b9ce48fa"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void glcPopMatrixQSO </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>This command pops the top entry off the stack, replacing the current <b>GLC_BITMAP_MATRIX</b> with the matrix that was the second entry in the stack. </p> <p>Popping a matrix off a stack with only one entry generates the error <b>GLC_STACK_OVERFLOW_QSO</b>. </p> <dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__transform.html#ga4c4a11ea77e853c2196d5f62133a89db" title="This command pushes the stack down by one, duplicating the current GLC_BITMAP_MATRIX in both the top ...">glcPushMatrixQSO()</a> </dd> <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_MATRIX_STACK_DEPTH_QSO</b> </dd> <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_MAX_MATRIX_STACK_DEPTH_QSO</b> </dd></dl> </div> </div> </div><!-- contents --> </td> </tr> <tr> <td align="center" class="main"> <hr> <small> <font color="#cccccc">Generated on Sun Jan 13 2013 22:53: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.3 written by Dimitri van Heesch © 1997-2005</font> </small> </td> </tr> </table> </td> </tr> </table> </body> </html>