1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
#ifndef __NR_ARENA_GLYPHS_H__
#define __NR_ARENA_GLYPHS_H__
/*
* RGBA display list system for inkscape
*
* Author:
* Lauris Kaplinski <lauris@kaplinski.com>
*
* Copyright (C) 2002 Lauris Kaplinski
*
* Released under GNU GPL
*
*/
#define NR_TYPE_ARENA_GLYPHS (nr_arena_glyphs_get_type ())
#define NR_ARENA_GLYPHS(obj) (NR_CHECK_INSTANCE_CAST ((obj), NR_TYPE_ARENA_GLYPHS, NRArenaGlyphs))
#define NR_IS_ARENA_GLYPHS(obj) (NR_CHECK_INSTANCE_TYPE ((obj), NR_TYPE_ARENA_GLYPHS))
#include <libnrtype/nrtype-forward.h>
#include <display/curve.h>
#include <forward.h>
#include <sp-paint-server.h>
#include <display/nr-arena-item.h>
#define test_glyph_liv
class Shape;
NRType nr_arena_glyphs_get_type (void);
struct NRArenaGlyphs : public NRArenaItem {
/* Glyphs data */
SPStyle *style;
NRMatrix g_transform;
font_instance *font;
gint glyph;
raster_font *rfont;
raster_font *sfont;
float x, y;
// NRMatrix cached_tr;
// Shape *cached_shp;
// bool cached_shp_dirty;
// bool cached_style_dirty;
// Shape *stroke_shp;
static NRArenaGlyphs *create(NRArena *arena) {
NRArenaGlyphs *obj=reinterpret_cast<NRArenaGlyphs *>(nr_object_new(NR_TYPE_ARENA_GLYPHS));
obj->init(arena);
return obj;
}
};
struct NRArenaGlyphsClass {
NRArenaItemClass parent_class;
};
void nr_arena_glyphs_set_path (NRArenaGlyphs *glyphs,
SPCurve *curve, unsigned int lieutenant,
font_instance *font, int glyph,
const NRMatrix *transform);
void nr_arena_glyphs_set_style (NRArenaGlyphs *glyphs, SPStyle *style);
/* Integrated group of component glyphss */
typedef struct NRArenaGlyphsGroup NRArenaGlyphsGroup;
typedef struct NRArenaGlyphsGroupClass NRArenaGlyphsGroupClass;
#include "nr-arena-group.h"
#define NR_TYPE_ARENA_GLYPHS_GROUP (nr_arena_glyphs_group_get_type ())
#define NR_ARENA_GLYPHS_GROUP(obj) (NR_CHECK_INSTANCE_CAST ((obj), NR_TYPE_ARENA_GLYPHS_GROUP, NRArenaGlyphsGroup))
#define NR_IS_ARENA_GLYPHS_GROUP(obj) (NR_CHECK_INSTANCE_TYPE ((obj), NR_TYPE_ARENA_GLYPHS_GROUP))
NRType nr_arena_glyphs_group_get_type (void);
struct NRArenaGlyphsGroup : public NRArenaGroup {
//SPStyle *style;
NRRect paintbox;
/* State data */
SPPainter *fill_painter;
SPPainter *stroke_painter;
static NRArenaGlyphsGroup *create(NRArena *arena) {
NRArenaGlyphsGroup *obj=reinterpret_cast<NRArenaGlyphsGroup *>(nr_object_new(NR_TYPE_ARENA_GLYPHS_GROUP));
obj->init(arena);
return obj;
}
};
struct NRArenaGlyphsGroupClass {
NRArenaGroupClass parent_class;
};
/* Utility functions */
void nr_arena_glyphs_group_clear (NRArenaGlyphsGroup *group);
void nr_arena_glyphs_group_add_component (NRArenaGlyphsGroup *group, font_instance *font, int glyph, const NRMatrix *transform);
void nr_arena_glyphs_group_set_style (NRArenaGlyphsGroup *group, SPStyle *style);
void nr_arena_glyphs_group_set_paintbox (NRArenaGlyphsGroup *group, const NRRect *pbox);
#endif
|