-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspritedata1.h
210 lines (185 loc) · 3.42 KB
/
spritedata1.h
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
/**
* Copyright 2021 Jesús Abelardo Saldívar Aguilar
*
* This file contains the source for graphical data.
*
*/
static const VGfloat sp1coords[] = {
0, 100,
50, 100,
100, 50,
100, 0,
100, -66.666,
116.666, -66.666,
133.333, -83.333,
133.333, -100,
133.333, -116.666,
116.666, -133.333,
100, -133.333,
83.333, -133.333,
66.666, -116.666,
66.666, -100,
66.666, -116.666,
50, -133.333,
33.333, -133.333,
16.666, -133.333,
0, -116.666,
0, -100,
0, -116.666,
-16.666, -133.333,
-33.333, -133.333,
-50, -133.333,
-66.666, -116.666,
-66.666, -100,
-66.666, -116.666,
-83.333, -133.333,
-100, -133.333,
-116.666, -133.333,
-133.333, -116.666,
-133.333, -100,
-133.333, -83.333,
-116.666, -66.666,
-100, -66.666,
-100, 0,
-100, 50,
-50, 100,
0, 100
};
static const VGubyte sp1cmds[] = {
VG_MOVE_TO_ABS,
VG_CUBIC_TO_ABS,
VG_LINE_TO_ABS,
VG_CUBIC_TO_ABS,
VG_CUBIC_TO_ABS,
VG_CUBIC_TO_ABS,
VG_CUBIC_TO_ABS,
VG_CUBIC_TO_ABS,
VG_CUBIC_TO_ABS,
VG_CUBIC_TO_ABS,
VG_CUBIC_TO_ABS,
VG_CUBIC_TO_ABS,
VG_CUBIC_TO_ABS,
VG_LINE_TO_ABS,
VG_CUBIC_TO_ABS,
VG_CLOSE_PATH
};
JS_VG_PATH path_1 = {
.coords = sp1coords,
.cmds = sp1cmds,
.count_cmds = 16
};
JS_VG_ARC a_1 = {
.x = 0,
.y = 0,
.width = 20,
.height = 30,
.startAngle = 45,
.angleExtent = 315,
.arcType = VGU_ARC_PIE
};
JS_VG_ELLIPSE e_1 = {
.cx = 0,
.cy = 0,
.width = 50,
.height = 75
};
JS_VG_SPRITE_PATH sprite_path_1 = {
.cap_style = VG_CAP_ROUND,
.join_style = VG_JOIN_ROUND,
.stroke_line_width = 5,
.fill_color = {
0.81,
0.72,
1, 1 },
.stroke_color = {
0.0,
0.541176471,
0.878431373, 1, },
.bg_color = { 1.0, 1.0, 1.0, 0.75 },
.data = &path_1,
.init_sp_path = inti_path_raw_path
};
JS_VG_SPRITE_PATH sprite_path_ellipse = {
.cap_style = VG_CAP_BUTT,
.join_style = VG_JOIN_MITER,
.stroke_line_width = 5,
.fill_color = {
0.69,
0.87,
0.90, 1, },
.stroke_color = {
0.0,
0.54,
0.87, 1, },
.bg_color = { 1.0, 1.0, 1.0, 0.75 },
.data = &e_1,
.init_sp_path = inti_path_ellipse
};
JS_VG_SPRITE_PATH sprite_path_arc = {
.cap_style = VG_CAP_BUTT,
.join_style = VG_JOIN_MITER,
.stroke_line_width = 0,
.fill_color = {
0.0,
0.54,
0.87, 1, },
.stroke_color = {
0.0,
0.54,
0.87, 1, },
.bg_color = { 1.0, 1.0, 1.0, 0.75 },
.data = &a_1,
.init_sp_path = inti_path_arc
};
JS_VG_SPRITE group_array[5] = {{
.translate = { 0, 0 },
.scale = { 1, 1 },
.rotate = 0,
.data = &sprite_path_1,
.init_sprite = init_sprite_path,
.draw_func = draw_sprite_path
},
{
.translate = { -50, 0 },
.scale = { 1, 1 },
.rotate = 0,
.data = &sprite_path_ellipse,
.init_sprite = init_sprite_path,
.draw_func = draw_sprite_path
},
{
.translate = { -50, 0 },
.scale = { 1, 1 },
.rotate = 0,
.data = &sprite_path_arc,
.init_sprite = init_sprite_path,
.draw_func = draw_sprite_path
},
{
.translate = { 20, 0 },
.scale = { 1, 1 },
.rotate = 0,
.data = &sprite_path_ellipse,
.init_sprite = init_sprite_path,
.draw_func = draw_sprite_path
},
{
.translate = { 20, 0 },
.scale = { 1, 1 },
.rotate = 0,
.data = &sprite_path_arc,
.init_sprite = init_sprite_path,
.draw_func = draw_sprite_path
}};
JS_VG_SPRITE_GROUP sprite_group_1 = {
.count = 5,
.sprites = group_array
};
JS_VG_SPRITE sprite_grupo = {
.translate = { 600, 250 },
.scale = { 1, 1 },
.rotate = 45,
.data = &sprite_group_1,
.init_sprite = init_sprite_group_array,
.draw_func = draw_sprite_group_array
};