doc: update copyright line for 2021
[adg.git] / src / adg / adg-cairo-fallback.c
blob441a359a9050bc603fc81c35da45f857c9d633b0
1 /* ADG - Automatic Drawing Generation
2 * Copyright (C) 2007-2021 Nicola Fontana <ntd at entidi.it>
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 of the License, or (at your option) any later version.
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.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 #include "adg-internal.h"
22 #include <string.h>
23 #include <math.h>
25 #include "adg-cairo-fallback.h"
28 #if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 14, 0)
30 void
31 cairo_surface_set_device_scale(cairo_surface_t *surface,
32 double x_scale, double y_scale)
36 #endif /* cairo < 1.14.0 */
39 #ifdef ADG_MISSING_GBOXED_MATRIX
41 GType
42 cairo_gobject_matrix_get_type(void)
44 static GType matrix_type = 0;
46 if (G_UNLIKELY(matrix_type == 0))
47 matrix_type = g_boxed_type_register_static("CairoMatrix",
48 (GBoxedCopyFunc) cairo_gobject_cairo_matrix_copy,
49 g_free);
51 return matrix_type;
54 cairo_matrix_t *
55 cairo_gobject_cairo_matrix_copy(const cairo_matrix_t *matrix)
57 return cpml_memdup(matrix, sizeof(cairo_matrix_t));
60 #endif /* ADG_MISSING_GBOXED_MATRIX */
63 #ifdef ADG_MISSING_GBOXED_PATTERN
65 GType
66 cairo_gobject_pattern_get_type(void)
68 static GType pattern_type = 0;
70 if (G_UNLIKELY(pattern_type == 0))
71 pattern_type = g_boxed_type_register_static("CairoPattern",
72 (GBoxedCopyFunc) cairo_pattern_reference,
73 (GBoxedFreeFunc) cairo_pattern_destroy);
75 return pattern_type;
78 #endif /* ADG_MISSING_GBOXED_PATTERN */