AdgMatrix — A wrapper for cairo_matrix_t
typedef AdgMatrix; const AdgMatrix * adg_matrix_identity (void); const AdgMatrix * adg_matrix_null (void); AdgMatrix * adg_matrix_copy (AdgMatrix *matrix, const AdgMatrix *src); AdgMatrix * adg_matrix_dup (const AdgMatrix *matrix); gboolean adg_matrix_equal (const AdgMatrix *matrix1, const AdgMatrix *matrix2); gboolean adg_matrix_normalize (AdgMatrix *matrix); void adg_matrix_transform (AdgMatrix *matrix, const AdgMatrix *transformation, AdgTransformMode mode); void adg_matrix_dump (const AdgMatrix *matrix);
typedef cairo_matrix_t AdgMatrix;
Another name for cairo_matrix_t: check its documentation for the fields description and visibility details.
const AdgMatrix * adg_matrix_identity (void);
A convenient constant providing an identity matrix.
|
Returns : |
a pointer to the identity matrix |
const AdgMatrix * adg_matrix_null (void);
A convenient constant providing an null matrix, that is a matrix where all components are 0.
|
Returns : |
a pointer to the null matrix |
AdgMatrix * adg_matrix_copy (AdgMatrix *matrix, const AdgMatrix *src);
Copies matrix to dst.
AdgMatrix * adg_matrix_dup (const AdgMatrix *matrix);
Duplicates matrix.
|
|
the souce AdgMatrix |
|
Returns : |
the duplicate of matrix: must be freed with g_free()
when no longer needed.
|
gboolean adg_matrix_equal (const AdgMatrix *matrix1, const AdgMatrix *matrix2);
Compares matrix1 and matrix2 and returns TRUE if the matrices are equal.
gboolean adg_matrix_normalize (AdgMatrix *matrix);
Gets rid of the scaling component of a matrix.
|
|
the source/destination AdgMatrix |
|
Returns : |
TRUE on success, FALSE on errors |
void adg_matrix_transform (AdgMatrix *matrix, const AdgMatrix *transformation, AdgTransformMode mode);
Modifies matrix applying transformation in the way specified by
mode.
|
|
the source/destination AdgMatrix |
|
|
the transformation to apply |
|
|
how transformation should be applied
|