Transformation commandsThe 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 |
|
) |
|
void glcLoadMatrix |
( |
const GLfloat * |
inMatrix |
) |
|
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 |
) |
|
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
.
- 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
|