Implemented adg_line_style_new()
[adg.git] / adg / adg-pattern.c
blobdf195bdbb066a0f6fa6a2d5fd7012545aa8751d8
1 /* ADG - Automatic Drawing Generation
2 * Copyright (C) 2007-2008, 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 Library 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 * Library 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., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 /**
22 * SECTION:pattern
23 * @title: AdgPattern
24 * @short_description: A wrapper for the cairo_pattern_t struct
26 * This is essentially a wrapper for #cairo_pattern_t structures.
27 * It is needed to allow pattern parameters in #AdgStyle objects.
30 #include "adg-pattern.h"
33 GType
34 adg_pattern_get_type (void)
36 static int pattern_type = 0;
38 if G_UNLIKELY (pattern_type == 0)
39 pattern_type = g_boxed_type_register_static ("AdgPattern",
40 (GBoxedCopyFunc) cairo_pattern_reference,
41 (GBoxedFreeFunc) cairo_pattern_destroy);
43 return pattern_type;