fix build for --disable-gtk-doc
[swfdec.git] / swfdec / swfdec_pattern.h
blob16021a8b2f168bad8080e5d942281fc6e6297f08
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_PATTERN_H_
21 #define _SWFDEC_PATTERN_H_
23 #include <glib-object.h>
24 #include <cairo.h>
25 #include <swfdec/swfdec_draw.h>
26 #include <swfdec/swfdec_swf_decoder.h>
28 G_BEGIN_DECLS
30 typedef struct _SwfdecPattern SwfdecPattern;
31 typedef struct _SwfdecPatternClass SwfdecPatternClass;
33 #define SWFDEC_TYPE_PATTERN (swfdec_pattern_get_type())
34 #define SWFDEC_IS_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_PATTERN))
35 #define SWFDEC_IS_PATTERN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_PATTERN))
36 #define SWFDEC_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_PATTERN, SwfdecPattern))
37 #define SWFDEC_PATTERN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_PATTERN, SwfdecPatternClass))
38 #define SWFDEC_PATTERN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_PATTERN, SwfdecPatternClass))
40 struct _SwfdecPattern
42 SwfdecDraw draw;
44 cairo_matrix_t transform; /* user-to-pattern transform */
45 cairo_matrix_t start_transform; /* start transform */
46 cairo_matrix_t end_transform; /* end transform (if morph) */
49 struct _SwfdecPatternClass
51 SwfdecDrawClass draw_class;
53 /* create a cairo pattern for the given values */
54 cairo_pattern_t * (* get_pattern) (SwfdecPattern * pattern,
55 SwfdecRenderer * renderer,
56 const SwfdecColorTransform * trans);
59 GType swfdec_pattern_get_type (void);
61 SwfdecPattern * swfdec_pattern_new_color (SwfdecColor color);
62 SwfdecDraw * swfdec_pattern_parse (SwfdecBits * bits,
63 SwfdecSwfDecoder * dec);
64 SwfdecDraw * swfdec_pattern_parse_rgba (SwfdecBits * bits,
65 SwfdecSwfDecoder * dec);
66 SwfdecDraw * swfdec_pattern_parse_morph (SwfdecBits * bits,
67 SwfdecSwfDecoder * dec);
69 cairo_pattern_t *swfdec_pattern_get_pattern (SwfdecPattern * pattern,
70 SwfdecRenderer * renderer,
71 const SwfdecColorTransform * trans);
73 /* debug */
74 char * swfdec_pattern_to_string (SwfdecPattern * pattern);
76 G_END_DECLS
77 #endif