clean up DefineFont3 code
[swfdec.git] / libswfdec / swfdec_text.h
blob37d03126982dd096345f811d6d78a1519a749d94
1 /* Swfdec
2 * Copyright (C) 2003-2006 David Schleef <ds@schleef.org>
3 * 2005-2006 Eric Anholt <eric@anholt.net>
4 * 2006 Benjamin Otte <otte@gnome.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
22 #ifndef _SWFDEC_TEXT_H_
23 #define _SWFDEC_TEXT_H_
25 #include <libswfdec/swfdec_graphic.h>
26 #include <libswfdec/swfdec_color.h>
28 G_BEGIN_DECLS
29 //typedef struct _SwfdecText SwfdecText;
30 typedef struct _SwfdecTextClass SwfdecTextClass;
32 typedef struct _SwfdecTextGlyph SwfdecTextGlyph;
33 typedef struct _SwfdecTextChunk SwfdecTextChunk;
35 #define SWFDEC_TYPE_TEXT (swfdec_text_get_type())
36 #define SWFDEC_IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_TEXT))
37 #define SWFDEC_IS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_TEXT))
38 #define SWFDEC_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_TEXT, SwfdecText))
39 #define SWFDEC_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_TEXT, SwfdecTextClass))
41 struct _SwfdecTextGlyph {
42 int x;
43 int y;
44 int glyph;
45 SwfdecFont * font;
46 int height;
47 SwfdecColor color;
50 struct _SwfdecText {
51 SwfdecGraphic graphic;
53 GArray * glyphs;
54 cairo_matrix_t transform;
55 cairo_matrix_t transform_inverse;
58 struct _SwfdecTextClass {
59 SwfdecGraphicClass graphic_class;
62 GType swfdec_text_get_type (void);
64 int tag_func_define_text (SwfdecSwfDecoder * s, guint tag);
67 G_END_DECLS
68 #endif