diff options
author | Robert Bragg <robert@linux.intel.com> | 2010-11-29 18:47:10 +0000 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2010-12-07 12:16:50 +0000 |
commit | 3ac023163fc64b0bddfa891430b5a2e1ca9e0fd1 (patch) | |
tree | 4436a3e8b1fbfa895e8bcd1d5e5d7c48e65f57cb /cogl/cogl-matrix.h | |
parent | 98dd3f723c19b1d9f5a249d6bd08db58c76eabba (diff) |
matrix: Adds matrix_copy and _free functions
As a pre-requisite for being able to register a boxed GType for
CoglMatrix (enabling us to define gobject properties that accept a
CoglMatrix) this adds cogl_matrix_copy and _free functions.
Diffstat (limited to 'cogl/cogl-matrix.h')
-rw-r--r-- | cogl/cogl-matrix.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cogl/cogl-matrix.h b/cogl/cogl-matrix.h index 8904d881..b54f4b94 100644 --- a/cogl/cogl-matrix.h +++ b/cogl/cogl-matrix.h @@ -293,6 +293,33 @@ gboolean cogl_matrix_equal (gconstpointer v1, gconstpointer v2); /** + * cogl_matrix_copy: + * @matrix: A 4x4 transformation matrix you want to copy + * + * Allocates a new #CoglMatrix on the heap and initializes it with + * the same values as @matrix. + * + * Returns: A newly allocated #CoglMatrix which should be freed using + * cogl_matrix_free() + * + * Since: 1.6 + */ +CoglMatrix * +cogl_matrix_copy (const CoglMatrix *matrix); + +/** + * cogl_matrix_free: + * @matrix: A 4x4 transformation matrix you want to free + * + * Frees a #CoglMatrix that was previously allocated via a call to + * cogl_matrix_copy(). + * + * Since: 1.6 + */ +void +cogl_matrix_free (CoglMatrix *matrix); + +/** * cogl_matrix_get_inverse: * @matrix: A 4x4 transformation matrix * @inverse: (out): The destination for a 4x4 inverse transformation matrix |