QuesoGLC
QuesoGLC
Documentation
Sourceforge
SourceForge.net Logo
OpenGL

Transformation commands

The GLC transformation commands modify the value of GLC_BITMAP_MATRIX. More...

Functions


Detailed Description

The GLC transformation commands modify the value of GLC_BITMAP_MATRIX.

Glyph coordinates are defined in the em coordinate system. When the value of GLC_RENDER_STYLE is GLC_BITMAP, GLC uses the 2x2 GLC_BITMAP_MATRIX to transform layouts from the em coordinate system to the GL raster coordinate system in which bitmaps are drawn.

When the value of the variable GLC_RENDER_STYLE is not GLC_BITMAP, 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.

There is a stack of matrices for GLC_BITMAP_MATRIX, 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 glcPushMatrixQSO() and glcPopMatrixQSO(). The maximum depth is implementation specific but can be retrieved by calling glcGeti() with GLC_MAX_MATRIX_STACK_DEPTH_QSO. The number of matrices that are currently stored in the stack can be retrieved by calling glcGeti() with GLC_MATRIX_STACK_DEPTH_QSO.


Function Documentation

void glcLoadIdentity ( void   ) 

This command assigns the value [1 0 0 1] to the floating point vector variable GLC_BITMAP_MATRIX.

See also:
glcGetfv() with argument GLC_BITMAP_MATRIX

glcLoadMatrix()

glcMultMatrix()

glcRotate()

glcScale()

void glcLoadMatrix ( const GLfloat *  inMatrix  ) 

This command assigns the value [inMatrix[0] inMatrix[1] inMatrix[2] inMatrix[3]] to the floating point vector variable GLC_BITMAP_MATRIX.

Parameters:
inMatrix The value to assign to GLC_BITMAP_MATRIX
See also:
glcGetfv() with argument GLC_BITMAP_MATRIX

glcLoadIdentity()

glcMultMatrix()

glcRotate()

glcScale()

void glcMultMatrix ( const GLfloat *  inMatrix  ) 

This command multiply the floating point vector variable GLC_BITMAP_MATRIX by the incoming matrix inMatrix.

Parameters:
inMatrix A pointer to a 2x2 matrix stored in column-major order as 4 consecutives values.
See also:
glcGetfv() with argument GLC_BITMAP_MATRIX

glcLoadIdentity()

glcLoadMatrix()

glcRotate()

glcScale()

void glcRotate ( GLfloat  inAngle  ) 

This command assigns the value [a b c d] to the floating point vector variable GLC_BITMAP_MATRIX, where inAngle is measured in degrees, $ \theta = inAngle * \pi / 180 $ and
$ \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 ] $.

Parameters:
inAngle The angle of rotation around the Z axis, in degrees.
See also:
glcGetfv() with argument GLC_BITMAP_MATRIX

glcLoadIdentity()

glcLoadMatrix()

glcMultMatrix()

glcScale()

void glcScale ( GLfloat  inX,
GLfloat  inY 
)

This command produces a general scaling along the x and y axes, that is, it assigns the value [a b c d] to the floating point vector variable GLC_BITMAP_MATRIX, where
$ \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 ] $.

Parameters:
inX The scale factor along the x axis
inY The scale factor along the y axis
See also:
glcGetfv() with argument GLC_BITMAP_MATRIX

glcLoadIdentity()

glcLoadMatrix()

glcMultMatrix()

glcRotate()

void glcPushMatrixQSO ( void   ) 

This command pushes the stack down by one, duplicating the current GLC_BITMAP_MATRIX in both the top of the stack and the entry below it.

Pushing a matrix onto a full stack generates the error GLC_STACK_OVERFLOW_QSO.

See also:
glcPopMatrixQSO()

glcGeti() with argument GLC_MATRIX_STACK_DEPTH_QSO

glcGeti() with argument GLC_MAX_MATRIX_STACK_DEPTH_QSO

void glcPopMatrixQSO ( void   ) 

This command pops the top entry off the stack, replacing the current GLC_BITMAP_MATRIX with the matrix that was the second entry in the stack.

Popping a matrix off a stack with only one entry generates the error GLC_STACK_OVERFLOW_QSO.

See also:
glcPushMatrixQSO()

glcGeti() with argument GLC_MATRIX_STACK_DEPTH_QSO

glcGeti() with argument GLC_MAX_MATRIX_STACK_DEPTH_QSO

Valid HTML 4.01!
Valid CSS!

Generated on Sat Jan 20 20:11:49 2007 for QuesoGLC by doxygen 1.4.7 written by Dimitri van Heesch © 1997-2005