AdgMatrix

AdgMatrix — A wrapper for cairo_matrix_t

Synopsis

typedef             AdgMatrix;
void                adg_matrix_copy                     (AdgMatrix *matrix,
                                                         const AdgMatrix *src);
void                adg_matrix_dump                     (const AdgMatrix *matrix);
AdgMatrix *         adg_matrix_dup                      (const AdgMatrix *matrix);
gboolean            adg_matrix_equal                    (const AdgMatrix *matrix1,
                                                         const AdgMatrix *matrix2);
const AdgMatrix *   adg_matrix_identity                 (void);
AdgMatrix *         adg_matrix_new                      (void);
gboolean            adg_matrix_normalize                (AdgMatrix *matrix);
const AdgMatrix *   adg_matrix_null                     (void);
void                adg_matrix_transform                (AdgMatrix *matrix,
                                                         const AdgMatrix *transformation,
                                                         AdgTransformMode mode);

Object Hierarchy

  GBoxed
   +----AdgMatrix

Description

AdgMatrix is a wrapper in GType syntax of the cairo_matrix_t struct.

Details

AdgMatrix

typedef cairo_matrix_t AdgMatrix;

Another name for cairo_matrix_t: check its documentation for the fields description and visibility details.

Since 1.0


adg_matrix_copy ()

void                adg_matrix_copy                     (AdgMatrix *matrix,
                                                         const AdgMatrix *src);

Copies src to matrix.

matrix :

the destination AdgMatrix. [out caller-allocates]

src :

the source AdgMatrix

Since 1.0


adg_matrix_dump ()

void                adg_matrix_dump                     (const AdgMatrix *matrix);

Dumps the specified matrix to stdout. Useful for debugging purposes.

matrix :

an AdgMatrix

Since 1.0


adg_matrix_dup ()

AdgMatrix *         adg_matrix_dup                      (const AdgMatrix *matrix);

Duplicates matrix.

matrix :

the souce AdgMatrix

Returns :

a duplicate of matrix that must be freed with g_free() when no longer needed. [transfer full]

Since 1.0


adg_matrix_equal ()

gboolean            adg_matrix_equal                    (const AdgMatrix *matrix1,
                                                         const AdgMatrix *matrix2);

Compares matrix1 and matrix2 and returns TRUE if the matrices are equal.

matrix1 :

the first operand

matrix2 :

the second operand

Returns :

TRUE if matrix1 is equal to matrix2, FALSE otherwise

Since 1.0


adg_matrix_identity ()

const AdgMatrix *   adg_matrix_identity                 (void);

A convenient constant providing an identity matrix.

Returns :

a pointer to the identity matrix. [transfer none]

Since 1.0


adg_matrix_new ()

AdgMatrix *         adg_matrix_new                      (void);

Creates a new empty AdgMatrix. The returned pointer should be freed with g_free() when no longer needed.

Returns :

a newly created AdgMatrix

Since 1.0


adg_matrix_normalize ()

gboolean            adg_matrix_normalize                (AdgMatrix *matrix);

Gets rid of the scaling component of a matrix.

matrix :

the source/destination AdgMatrix. [inout]

Returns :

TRUE on success, FALSE on errors

Since 1.0


adg_matrix_null ()

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. [transfer none]

Since 1.0


adg_matrix_transform ()

void                adg_matrix_transform                (AdgMatrix *matrix,
                                                         const AdgMatrix *transformation,
                                                         AdgTransformMode mode);

Modifies matrix applying transformation in the way specified by mode.

matrix :

the source/destination AdgMatrix. [inout]

transformation :

the transformation to apply

mode :

how transformation should be applied. [in]

Since 1.0