1 /* This file is part of GEGL
2  *
3  * GEGL is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 3 of the License, or (at your option) any later version.
7  *
8  * GEGL is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with GEGL; if not, see <https://www.gnu.org/licenses/>.
15  *
16  * Copyright 2006-2018 GEGL developers
17  */
18 
19 #ifndef __GEGL_BUFFER_MATRIX2_H__
20 #define __GEGL_BUFFER_MATRIX2_H__
21 
22 
23 #include <glib.h>
24 #include <glib-object.h>
25 
26 G_BEGIN_DECLS
27 
28 /* Currenly only used internally.
29  * Note: If making use of this in public API, add a boxed type for introspection
30  */
31 typedef struct {
32     gdouble coeff[2][2];
33 } GeglBufferMatrix2;
34 
35 /*
36  * gegl_buffer_matrix2_is_identity:
37  * @matrix: a #GeglBufferMatrix2
38  *
39  * Check if a matrix is the identity matrix.
40  *
41  * Returns TRUE if the matrix is the identity matrix.
42  */
43 gboolean   gegl_buffer_matrix2_is_identity (GeglBufferMatrix2 *matrix);
44 
45 /*
46  * gegl_buffer_matrix2_is_scale:
47  * @matrix: a #GeglBufferMatrix2
48  *
49  * Check if a matrix only does scaling.
50  *
51  * Returns TRUE if the matrix only does scaling.
52  */
53 gboolean   gegl_buffer_matrix2_is_scale    (GeglBufferMatrix2 *matrix);
54 
55 /*
56  * gegl_buffer_matrix2_determinant:
57  * @matrix: a #GeglBufferMatrix2
58  *
59  * Returns the determinant of @matrix.
60  */
61 gdouble    gegl_buffer_matrix2_determinant (GeglBufferMatrix2 *matrix);
62 
63 
64 G_END_DECLS
65 
66 #endif
67