1 | /* |
2 | * Copyright © 2019 Benjamin Otte |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Lesser General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2.1 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Lesser General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Lesser General Public |
15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
16 | * |
17 | * Authors: Benjamin Otte <otte@gnome.org> |
18 | */ |
19 | |
20 | |
21 | #ifndef __GSK_TRANSFORM_PRIVATE_H__ |
22 | #define __GSK_TRANSFORM_PRIVATE_H__ |
23 | |
24 | #include "gsktransform.h" |
25 | |
26 | #include <gtk/css/gtkcss.h> |
27 | #include "gtk/css/gtkcssparserprivate.h" |
28 | |
29 | G_BEGIN_DECLS |
30 | |
31 | typedef struct _GskTransformClass GskTransformClass; |
32 | |
33 | struct _GskTransform |
34 | { |
35 | const GskTransformClass *transform_class; |
36 | |
37 | GskTransformCategory category; |
38 | GskTransform *next; |
39 | }; |
40 | |
41 | gboolean gsk_transform_parser_parse (GtkCssParser *parser, |
42 | GskTransform **out_transform); |
43 | |
44 | void gsk_matrix_transform_point (const graphene_matrix_t *m, |
45 | const graphene_point_t *p, |
46 | graphene_point_t *res); |
47 | void gsk_matrix_transform_point3d (const graphene_matrix_t *m, |
48 | const graphene_point3d_t *p, |
49 | graphene_point3d_t *res); |
50 | void gsk_matrix_transform_bounds (const graphene_matrix_t *m, |
51 | const graphene_rect_t *r, |
52 | graphene_rect_t *res); |
53 | void gsk_matrix_transform_rect (const graphene_matrix_t *m, |
54 | const graphene_rect_t *r, |
55 | graphene_quad_t *res); |
56 | |
57 | #define gsk_transform_get_category(t) ((t) ? (t)->category : GSK_TRANSFORM_CATEGORY_IDENTITY) |
58 | |
59 | G_END_DECLS |
60 | |
61 | #endif /* __GSK_TRANSFORM_PRIVATE_H__ */ |
62 | |
63 | |