Matrix control functions
This section provides an overview of the matrix control functions.
vg_lite_identity
function
Description:
This function loads an identity matrix into a matrix variable.
Syntax:
vg_lite_error_t vg_lite_identity (
vg_lite_matrix_t *matrix,
);
Parameters:
Name |
Description |
---|---|
|
Pointer to the vg_lite_matrix_t structure that will be loaded with an identity matrix. |
Returns:
Returns VG_LITE_SUCCESS
if the function is successful. See vg_lite_error_t enum for other return codes.
Parent topic:Matrix control functions
vg_lite_set_pixel_matrix
function
Description:
This function sets up a pixel transform matrix m[20] which transforms each pixel as follows:
The pixel transform for the A, R, G, B channels can be enabled/disabled individually with the channel parameter.
Applications can use VGLite API vg_lite_query_feature
(gcFEATURE_BIT_VG_PIXEL_MATRIX
) to determine HW support for gaussian blur.
Syntax:
vg_lite_error_t vg_lite_set_pixel_matrix (
vg_lite_pixel_matrix_t matrix,
vg_lite_pixel_channel_enable_t *channel
);
Parameters:
Name |
Description |
---|---|
|
Specifies the |
|
Pointer to the |
Returns:
Returns VG_LITE_SUCCESS
if the function is successful. See vg_lite_error_t enum for other return codes.
Parent topic:Matrix control functions
vg_lite_rotate
function
Description:
This function rotates a matrix a specified number of degrees.
Syntax:
vg_lite_error_t vg_lite_rotate (
vg_lite_float_t degrees,
vg_lite_matrix_t *matrix
);
Parameters:
Name |
Description |
---|---|
|
Number of degrees to rotate the matrix. Positive numbers rotate clockwise.The coordinates for the transformation are given in the surface coordinate system (top-to-bottom orientation). Rotations with positive angles are in the clockwise direction. |
|
Pointer to the vg_lite_matrix_t structure that has to be rotated |
Returns:
Returns VG_LITE_SUCCESS
if the function is successful. See vg_lite_error_t enum for other return codes.
Parent topic:Matrix control functions
vg_lite_scale
function
Description:
This function scales a matrix in both horizontal and vertical directions.
Syntax:
vg_lite_error_t vg_lite_scale (
vg_lite_float_t scale_x,
vg_lite_float_t scale_y,
vg_lite_matrix_t *matrix
);
Parameters:
Name |
Description |
---|---|
|
Horizontal scale |
|
Vertical scale |
|
Pointer to the vg_lite_matrix_t structure that will be scaled. |
Returns:
Returns VG_LITE_SUCCESS
if the function is successful. See vg_lite_error_t enum for other return codes.
Parent topic:Matrix control functions
vg_lite_translate
function
Description:
This function translates a matrix to a new location.
Syntax:
vg_lite_error_t vg_lite_translate (
vg_lite_float_t x,
vg_lite_float_t y,
vg_lite_matrix_t *matrix
);
Parameters:
Name |
Description |
---|---|
|
X location of the transformation. |
|
Y location of the transformation. |
|
Pointer to the vg_lite_matrix_t structure that will be translated. |
Returns:
Returns VG_LITE_SUCCESS
if the function is successful. See vg_lite_error_t enum for other return codes.
Parent topic:Matrix control functions
Parent topic:Matrices