Code

Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
[inkscape.git] / src / display / nr-arena-glyphs.h
1 #ifndef SEEN_NR_ARENA_GLYPHS_H
2 #define SEEN_NR_ARENA_GLYPHS_H
4 /*
5  * RGBA display list system for inkscape
6  *
7  * Author:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *
10  * Copyright (C) 2002 Lauris Kaplinski
11  *
12  * Released under GNU GPL
13  *
14  */
16 #define NR_TYPE_ARENA_GLYPHS (nr_arena_glyphs_get_type ())
17 #define NR_ARENA_GLYPHS(obj) (NR_CHECK_INSTANCE_CAST ((obj), NR_TYPE_ARENA_GLYPHS, NRArenaGlyphs))
18 #define NR_IS_ARENA_GLYPHS(obj) (NR_CHECK_INSTANCE_TYPE ((obj), NR_TYPE_ARENA_GLYPHS))
20 #include "libnrtype/nrtype-forward.h"
22 #include "forward.h"
23 #include "sp-paint-server.h"
24 #include "display/nr-arena-item.h"
26 #define test_glyph_liv
28 struct SPCurve;
29 class Shape;
31 NRType nr_arena_glyphs_get_type (void);
33 struct NRArenaGlyphs : public NRArenaItem {
34         /* Glyphs data */
35         SPStyle *style;
36         Geom::Matrix g_transform;
37         font_instance *font;
38         gint glyph;
40         raster_font *rfont;
41         raster_font *sfont;
42         float x, y;
44 //      Geom::Matrix cached_tr;
45 //      Shape  *cached_shp;
46 //      bool   cached_shp_dirty;
47 //      bool   cached_style_dirty;
48         
49 //      Shape  *stroke_shp;
51         static NRArenaGlyphs *create(NRArena *arena) {
52                 NRArenaGlyphs *obj=reinterpret_cast<NRArenaGlyphs *>(nr_object_new(NR_TYPE_ARENA_GLYPHS));
53                 obj->init(arena);
54                 return obj;
55         }
56 };
58 struct NRArenaGlyphsClass {
59         NRArenaItemClass parent_class;
60 };
62 void nr_arena_glyphs_set_path ( NRArenaGlyphs *glyphs,
63                                 SPCurve *curve, unsigned int lieutenant,
64                                 font_instance *font, int glyph,
65                                 Geom::Matrix const *transform   );
66 void nr_arena_glyphs_set_style (NRArenaGlyphs *glyphs, SPStyle *style);
68 /* Integrated group of component glyphss */
70 typedef struct NRArenaGlyphsGroup NRArenaGlyphsGroup;
71 typedef struct NRArenaGlyphsGroupClass NRArenaGlyphsGroupClass;
73 #include "nr-arena-group.h"
75 #define NR_TYPE_ARENA_GLYPHS_GROUP (nr_arena_glyphs_group_get_type ())
76 #define NR_ARENA_GLYPHS_GROUP(obj) (NR_CHECK_INSTANCE_CAST ((obj), NR_TYPE_ARENA_GLYPHS_GROUP, NRArenaGlyphsGroup))
77 #define NR_IS_ARENA_GLYPHS_GROUP(obj) (NR_CHECK_INSTANCE_TYPE ((obj), NR_TYPE_ARENA_GLYPHS_GROUP))
79 NRType nr_arena_glyphs_group_get_type (void);
81 struct NRArenaGlyphsGroup : public NRArenaGroup {
82   //SPStyle *style;
83         NRRect paintbox;
84         /* State data */
85         SPPainter *fill_painter;
86         SPPainter *stroke_painter;
88         static NRArenaGlyphsGroup *create(NRArena *arena) {
89                 NRArenaGlyphsGroup *obj=reinterpret_cast<NRArenaGlyphsGroup *>(nr_object_new(NR_TYPE_ARENA_GLYPHS_GROUP));
90                 obj->init(arena);
91                 return obj;
92         }
93 };
95 struct NRArenaGlyphsGroupClass {
96         NRArenaGroupClass parent_class;
97 };
99 /* Utility functions */
101 void nr_arena_glyphs_group_clear (NRArenaGlyphsGroup *group);
103 void nr_arena_glyphs_group_add_component (NRArenaGlyphsGroup *group, font_instance *font, int glyph, Geom::Matrix const &transform);
105 void nr_arena_glyphs_group_set_style (NRArenaGlyphsGroup *group, SPStyle *style);
107 void nr_arena_glyphs_group_set_paintbox (NRArenaGlyphsGroup *group, const NRRect *pbox);
109 #endif // SEEN_NR_ARENA_GLYPHS_H
111 /*
112   Local Variables:
113   mode:c++
114   c-file-style:"stroustrup"
115   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
116   indent-tabs-mode:nil
117   fill-column:99
118   End:
119 */
120 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :