![]() |
![]() |
![]() |
adg-1 reference manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <adg-1/adg.h> const cairo_matrix_t * adg_matrix_identity (void
); const cairo_matrix_t * adg_matrix_null (void
); void adg_matrix_copy (cairo_matrix_t *matrix
,const cairo_matrix_t *src
); cairo_matrix_t * adg_matrix_dup (const cairo_matrix_t *matrix
); gboolean adg_matrix_equal (const cairo_matrix_t *matrix1
,const cairo_matrix_t *matrix2
); gboolean adg_matrix_normalize (cairo_matrix_t *matrix
); void adg_matrix_transform (cairo_matrix_t *matrix
,const cairo_matrix_t *transformation
,AdgTransformMode mode
); void adg_matrix_dump (const cairo_matrix_t *matrix
);
The following functions augment the cairo_matrix_t available methods providing some useful addition.
const cairo_matrix_t * adg_matrix_identity (void
);
A convenient constant providing an identity matrix.
Returns : |
a pointer to the identity matrix. [transfer none] |
Since 1.0
const cairo_matrix_t * 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. [transfer none] |
Since 1.0
void adg_matrix_copy (cairo_matrix_t *matrix
,const cairo_matrix_t *src
);
Copies src
to matrix
.
|
the destination cairo_matrix_t. [out caller-allocates] |
|
the source cairo_matrix_t |
Since 1.0
cairo_matrix_t * adg_matrix_dup (const cairo_matrix_t *matrix
);
Duplicates matrix
.
|
the souce cairo_matrix_t |
Returns : |
a duplicate of matrix that must be freed with g_free() when no longer needed. [transfer full]
|
Since 1.0
gboolean adg_matrix_equal (const cairo_matrix_t *matrix1
,const cairo_matrix_t *matrix2
);
Compares matrix1
and matrix2
and returns TRUE
if the matrices are equal.
|
the first operand |
|
the second operand |
Returns : |
TRUE if matrix1 is equal to matrix2 , FALSE otherwise |
Since 1.0
gboolean adg_matrix_normalize (cairo_matrix_t *matrix
);
Gets rid of the scaling component of a matrix.
|
the source/destination cairo_matrix_t. [inout] |
Returns : |
TRUE on success, FALSE on errors |
Since 1.0
void adg_matrix_transform (cairo_matrix_t *matrix
,const cairo_matrix_t *transformation
,AdgTransformMode mode
);
Modifies matrix
applying transformation
in the way specified by
mode
.
|
the source/destination cairo_matrix_t. [inout] |
|
the transformation to apply |
|
how transformation should be applied. [in]
|
Since 1.0
void adg_matrix_dump (const cairo_matrix_t *matrix
);
Dumps the specified matrix
to stdout. Useful for debugging purposes.
|
an cairo_matrix_t |
Since 1.0