AdgMatrix

AdgMatrix — A wrapper for cairo_matrix_t

Synopsis

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);

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.


adg_matrix_identity ()

const AdgMatrix *   adg_matrix_identity                 (void);

A convenient constant providing an identity matrix.

Returns :

a pointer to the identity matrix

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

adg_matrix_copy ()

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

Copies matrix to dst.

matrix :

the destination AdgMatrix

src :

the source AdgMatrix

Returns :

matrix

adg_matrix_dup ()

AdgMatrix *         adg_matrix_dup                      (const AdgMatrix *matrix);

Duplicates matrix.

matrix :

the souce AdgMatrix

Returns :

the duplicate of matrix: must be freed with g_free() when no longer needed.

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 :

an AdgMatrix

matrix2 :

an AdgMatrix

Returns :

TRUE if matrix1 is equal to matrix2, FALSE otherwise

adg_matrix_normalize ()

gboolean            adg_matrix_normalize                (AdgMatrix *matrix);

Gets rid of the scaling component of a matrix.

matrix :

the source/destination AdgMatrix

Returns :

TRUE on success, FALSE on errors

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

transformation :

the transformation to apply

mode :

how transformation should be applied

adg_matrix_dump ()

void                adg_matrix_dump                     (const AdgMatrix *matrix);

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

matrix :

an AdgMatrix
AdgMatrix was last modified by gtk-doc on Sun 20 Mar 2011 09:36:51 PM CET
Hosted by Get Automatic Drawing Generation at SourceForge.net. Fast, secure and Free Open Source software downloads
Search on this domain