Picasso API
2.2
|
Functions | |
PEXPORT ps_matrix *PICAPI | ps_matrix_create (void) |
Create a identity matrix object. | |
PEXPORT ps_matrix *PICAPI | ps_matrix_create_init (float sx, float shy, float shx, float sy, float tx, float ty) |
Create a matrix with given parameters. | |
PEXPORT ps_matrix *PICAPI | ps_matrix_create_copy (const ps_matrix *matrix) |
Create a matrix copy from an exist one. | |
PEXPORT ps_matrix *PICAPI | ps_matrix_ref (ps_matrix *matrix) |
Increases the reference count of the matrix by 1. | |
PEXPORT void PICAPI | ps_matrix_unref (ps_matrix *matrix) |
Decrements the reference count for the matrix object. If the reference count on the matrix falls to 0, the matrix is freed. | |
PEXPORT void PICAPI | ps_matrix_init (ps_matrix *matrix, float sx, float shy, float shx, float sy, float tx, float ty) |
Initialize an existing matrix object with given parameters. | |
PEXPORT void PICAPI | ps_matrix_translate (ps_matrix *matrix, float tx, float ty) |
Modify a matrix by translating. | |
PEXPORT void PICAPI | ps_matrix_scale (ps_matrix *matrix, float sx, float sy) |
Modify a matrix by scaling. | |
PEXPORT void PICAPI | ps_matrix_rotate (ps_matrix *matrix, float angle) |
Modify a matrix by rotating. | |
PEXPORT void PICAPI | ps_matrix_shear (ps_matrix *matrix, float shx, float shy) |
Modify a matrix by shearing. | |
PEXPORT void PICAPI | ps_matrix_invert (ps_matrix *matrix) |
Modify a matrix by inverting. | |
PEXPORT void PICAPI | ps_matrix_reset (ps_matrix *matrix) |
Reset a matrix to identity matrix. | |
PEXPORT void PICAPI | ps_matrix_flip_x (ps_matrix *matrix) |
Flip a matrix in the horizontal direction. | |
PEXPORT void PICAPI | ps_matrix_flip_y (ps_matrix *matrix) |
Flip a matrix in the vertical direction. | |
PEXPORT void PICAPI | ps_matrix_multiply (ps_matrix *result, const ps_matrix *a, const ps_matrix *b) |
Multiplies the matrix in a and b together and stores the result in result. | |
PEXPORT ps_bool PICAPI | ps_matrix_is_identity (const ps_matrix *matrix) |
Checks whether the matrix is the identity transform matrix. | |
PEXPORT ps_bool PICAPI | ps_matrix_is_equal (const ps_matrix *a, const ps_matrix *b) |
Checks whether two matrix are equal. | |
PEXPORT float PICAPI | ps_matrix_get_determinant (const ps_matrix *matrix) |
Return the determinant from a matrix. | |
PEXPORT void PICAPI | ps_matrix_set_translate_factor (ps_matrix *matrix, float tx, float ty) |
Set the translate factors to the matrix. | |
PEXPORT ps_bool PICAPI | ps_matrix_get_translate_factor (ps_matrix *matrix, float *tx, float *ty) |
Get the translate factors from the matrix. | |
PEXPORT void PICAPI | ps_matrix_set_scale_factor (ps_matrix *matrix, float sx, float sy) |
Set the scale factors to the matrix. | |
PEXPORT ps_bool PICAPI | ps_matrix_get_scale_factor (ps_matrix *matrix, float *sx, float *sy) |
Get the scale factors from the matrix. | |
PEXPORT void PICAPI | ps_matrix_set_shear_factor (ps_matrix *matrix, float shx, float shy) |
Set the shear factors to the matrix. | |
PEXPORT ps_bool PICAPI | ps_matrix_get_shear_factor (ps_matrix *matrix, float *shx, float *shy) |
Get the shear factors from the matrix. | |
PEXPORT void PICAPI | ps_matrix_transform_point (const ps_matrix *matrix, ps_point *point) |
Transform an existing point using the matrix. | |
PEXPORT void PICAPI | ps_matrix_transform_rect (const ps_matrix *matrix, ps_rect *rect) |
Transform an existing rectangle using the matrix. | |
PEXPORT void PICAPI | ps_matrix_transform_path (const ps_matrix *matrix, ps_path *path) |
Transform an existing path using the matrix. |
ps_matrix * ps_matrix_create | ( | void | ) |
Create a identity matrix object.
ps_matrix * ps_matrix_create_copy | ( | const ps_matrix * | matrix | ) |
Create a matrix copy from an exist one.
matrix | Pointer to an existing matrix object. |
ps_matrix * ps_matrix_create_init | ( | float | sx, |
float | shy, | ||
float | shx, | ||
float | sy, | ||
float | tx, | ||
float | ty | ||
) |
Create a matrix with given parameters.
sx | The horizontal scaling factor. |
shy | The vertical skewing factor. |
shx | The horizontal skewing factor. |
sy | The vertical scaling factor. |
tx | The horizontal translating factor. |
ty | The vertical translating factor. |
void ps_matrix_flip_x | ( | ps_matrix * | matrix | ) |
Flip a matrix in the horizontal direction.
matrix | Pointer to an existing matrix object. |
void ps_matrix_flip_y | ( | ps_matrix * | matrix | ) |
Flip a matrix in the vertical direction.
matrix | Pointer to an existing matrix object. |
float ps_matrix_get_determinant | ( | const ps_matrix * | matrix | ) |
Return the determinant from a matrix.
matrix | Pointer to an existing matrix object. |
ps_bool ps_matrix_get_scale_factor | ( | ps_matrix * | matrix, |
float * | sx, | ||
float * | sy | ||
) |
Get the scale factors from the matrix.
matrix | Pointer to an existing matrix object. |
sx | Pointer to a buffer to receiving the scale factor in x dimension. |
sy | Pointer to a buffer to receiving the scale factor in y dimension. |
ps_bool ps_matrix_get_shear_factor | ( | ps_matrix * | matrix, |
float * | shx, | ||
float * | shy | ||
) |
Get the shear factors from the matrix.
matrix | Pointer to an existing matrix object. |
shx | Pointer to a buffer to receiving the shear factor in horizontal. |
shy | Pointer to a buffer to receiving the shear factor in vertical. |
ps_bool ps_matrix_get_translate_factor | ( | ps_matrix * | matrix, |
float * | tx, | ||
float * | ty | ||
) |
Get the translate factors from the matrix.
matrix | Pointer to an existing matrix object. |
tx | Pointer to a buffer to receiving the translate factor in x direction. |
ty | Pointer to a buffer to receiving the translate factor in y direction. |
void ps_matrix_init | ( | ps_matrix * | matrix, |
float | sx, | ||
float | shy, | ||
float | shx, | ||
float | sy, | ||
float | tx, | ||
float | ty | ||
) |
Initialize an existing matrix object with given parameters.
matrix | Pointer to an existing matrix object. |
sx | The horizontal scaling factor. |
shy | The vertical skewing factor. |
shx | The horizontal skewing factor. |
sy | The vertical scaling factor. |
tx | The horizontal translating factor. |
ty | The vertical translating factor. |
void ps_matrix_invert | ( | ps_matrix * | matrix | ) |
Modify a matrix by inverting.
matrix | Pointer to an existing matrix object. |
ps_bool ps_matrix_is_equal | ( | const ps_matrix * | a, |
const ps_matrix * | b | ||
) |
Checks whether two matrix are equal.
a | Pointer to an existing matrix object. |
b | Pointer to an existing matrix object. |
ps_bool ps_matrix_is_identity | ( | const ps_matrix * | matrix | ) |
Checks whether the matrix is the identity transform matrix.
matrix | Pointer to an existing matrix object. |
void ps_matrix_multiply | ( | ps_matrix * | result, |
const ps_matrix * | a, | ||
const ps_matrix * | b | ||
) |
Multiplies the matrix in a and b together and stores the result in result.
result | Pointer to an existing matrix object in which to store the result. |
a | Pointer to an existing matrix object. |
b | Pointer to an existing matrix object. |
ps_matrix * ps_matrix_ref | ( | ps_matrix * | matrix | ) |
Increases the reference count of the matrix by 1.
matrix | Pointer to an existing matrix object. |
void ps_matrix_reset | ( | ps_matrix * | matrix | ) |
Reset a matrix to identity matrix.
matrix | Pointer to an existing matrix object. |
void ps_matrix_rotate | ( | ps_matrix * | matrix, |
float | angle | ||
) |
Modify a matrix by rotating.
matrix | Pointer to an existing matrix object. |
angle | The angle, in radians, which to rotate the specified matrix. |
void ps_matrix_scale | ( | ps_matrix * | matrix, |
float | sx, | ||
float | sy | ||
) |
Modify a matrix by scaling.
matrix | Pointer to an existing matrix object. |
sx | The scale factor for the X dimension. |
sy | The scale factor for the Y dimension. |
void ps_matrix_set_scale_factor | ( | ps_matrix * | matrix, |
float | sx, | ||
float | sy | ||
) |
Set the scale factors to the matrix.
matrix | Pointer to an existing matrix object. |
sx | The scale factor in x dimension. |
sy | The scale factor in y dimension. |
void ps_matrix_set_shear_factor | ( | ps_matrix * | matrix, |
float | shx, | ||
float | shy | ||
) |
Set the shear factors to the matrix.
matrix | Pointer to an existing matrix object. |
shx | The shear factor for the horizontal. |
shy | The shear factor for the vertical. |
void ps_matrix_set_translate_factor | ( | ps_matrix * | matrix, |
float | tx, | ||
float | ty | ||
) |
Set the translate factors to the matrix.
matrix | Pointer to an existing matrix object. |
tx | The amount, in pixels, which the translate factor in x direction. |
ty | The amount, in pixels, which the translate factor in y direction. |
void ps_matrix_shear | ( | ps_matrix * | matrix, |
float | shx, | ||
float | shy | ||
) |
Modify a matrix by shearing.
matrix | Pointer to an existing matrix object. |
shx | The shear factor for the horizontal. |
shy | The shear factor for the vertical. |
void ps_matrix_transform_path | ( | const ps_matrix * | matrix, |
ps_path * | path | ||
) |
Transform an existing path using the matrix.
matrix | Pointer to an existing matrix object. |
path | An existing path which will be transformed. |
void ps_matrix_transform_point | ( | const ps_matrix * | matrix, |
ps_point * | point | ||
) |
Transform an existing point using the matrix.
matrix | Pointer to an existing matrix object. |
point | An existing point which will be transformed. |
void ps_matrix_transform_rect | ( | const ps_matrix * | matrix, |
ps_rect * | rect | ||
) |
Transform an existing rectangle using the matrix.
matrix | Pointer to an existing matrix object. |
rect | An existing rectangle which will be transformed. |
void ps_matrix_translate | ( | ps_matrix * | matrix, |
float | tx, | ||
float | ty | ||
) |
Modify a matrix by translating.
matrix | Pointer to an existing matrix object. |
tx | The amount, in pixels, which to translate in x direction. |
ty | The amount, in pixels, which to translate in y direction. |
void ps_matrix_unref | ( | ps_matrix * | matrix | ) |
Decrements the reference count for the matrix object. If the reference count on the matrix falls to 0, the matrix is freed.
matrix | Pointer to an existing matrix object. |