-
Notifications
You must be signed in to change notification settings - Fork 0
/
format.txt
114 lines (94 loc) · 2.12 KB
/
format.txt
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
FMT
u32: unsigned integer on four bytes in big-endian order
f32: IEEE 754 number on four bytes in big endian order
step_type:
0 = arc
1 = cubic bezier curve
2 = quadratic bezier curve
3 = linear bezier curve (straight line)
u32 magic
---- virtual machine part below ----
u32 # of arguments
arguments:
u32 string_section_offset
f32 x_default_value
f32 y_default_value
f32 x_range_min
f32 x_range_max
f32 y_range_min
f32 y_range_max
u32 # of instructions
instructions:
u32 operation
u32 op1_addr
u32 op2_addr
u32 op3_addr
u32 # of outputs
outputs:
u32 string_section_offset
u32 addr
---- rendering part below ----
u32 # of triangles
triangles:
u32 p1_addr
u32 p2_addr
u32 p3_addr
u32 p1_rg_addr
u32 p1_ba_addr
u32 p2_rg_addr
u32 p2_ba_addr
u32 p3_rg_addr
u32 p3_ba_addr
u32 # of arcs
arcs:
u32 start_point_addr
u32 center_addr
u32 deltas_addr
u32 # of cubic bezier curves
bezier curves:
u32 p1_addr
u32 p2_addr
u32 p3_addr
u32 p4_addr
u32 # of quadratic bezier curves
quadratic curves:
u32 p1_addr
u32 p2_addr
u32 p3_addr
u32 # of lines
lines:
u32 p1_addr
u32 p2_addr
u32 # of strokers
strokers:
u32 pattern_addr (p.x = dash length, p.y = gap length)
u32 width_addr (width = p.x + p.y)
u32 rg_addr
u32 ba_addr
u32 # of steps
steps:
u32 step_type
u32 index
u32 # of paths
paths:
u32 first_step
u32 length
u32 # of triangle_indexes
triangle_indexes:
u32 triangle
u32 # of backgrounds
backgrounds:
u32 first_triangle
u32 length
u32 # of rendering steps
rendering steps:
u32 clip_or_stroke (0 or 1)
u32 path_index
if clip_or_stroke == 0:
u32 background_index
if clip_or_stroke == 1:
u32 stroker_index
---- strings below ----
u32 # of string bytes
string bytes:
u8 utf8_byte or null_byte