Bug 22803 - Make header conform to implementation
[swfdec.git] / swfdec / swfdec_gradient_pattern.h
blobb0253142908cb38f721ebb7e63afe0c0038c30e9
1 /* Swfdec
2 * Copyright (C) 2006-2007 Benjamin Otte <otte@gnome.org>
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.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
20 #ifndef _SWFDEC_GRADIENT_PATTERN_H_
21 #define _SWFDEC_GRADIENT_PATTERN_H_
23 #include <swfdec/swfdec_pattern.h>
25 G_BEGIN_DECLS
27 typedef struct _SwfdecGradientPattern SwfdecGradientPattern;
28 typedef struct _SwfdecGradientPatternClass SwfdecGradientPatternClass;
30 typedef struct _SwfdecGradientEntry SwfdecGradientEntry;
32 #define SWFDEC_TYPE_GRADIENT_PATTERN (swfdec_gradient_pattern_get_type())
33 #define SWFDEC_IS_GRADIENT_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_GRADIENT_PATTERN))
34 #define SWFDEC_IS_GRADIENT_PATTERN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_GRADIENT_PATTERN))
35 #define SWFDEC_GRADIENT_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_GRADIENT_PATTERN, SwfdecGradientPattern))
36 #define SWFDEC_GRADIENT_PATTERN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_GRADIENT_PATTERN, SwfdecGradientPatternClass))
37 #define SWFDEC_GRADIENT_PATTERN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_GRADIENT_PATTERN, SwfdecGradientPatternClass))
39 struct _SwfdecGradientEntry {
40 guint ratio;
41 SwfdecColor color;
44 struct _SwfdecGradientPattern
46 SwfdecPattern pattern;
48 SwfdecGradientEntry gradient[16]; /* gradient to paint */
49 SwfdecGradientEntry end_gradient[16]; /* end gradient for morphs */
50 guint n_gradients; /* number of gradients */
51 cairo_extend_t extend; /* extend of gradient */
52 gboolean radial; /* TRUE for radial gradient, FALSE for linear gradient */
53 double focus; /* focus point */
56 struct _SwfdecGradientPatternClass
58 SwfdecPatternClass pattern_class;
61 GType swfdec_gradient_pattern_get_type (void);
63 SwfdecDraw * swfdec_gradient_pattern_new (void);
66 G_END_DECLS
67 #endif