-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathattr.mli
274 lines (219 loc) · 5.24 KB
/
attr.mli
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
open Virtual_dom.Vdom.Attr
open Core
type align_options =
| None
| X_max_y_max
| X_max_y_mid
| X_max_y_min
| X_mid_y_max
| X_mid_y_mid
| X_mid_y_min
| X_min_y_max
| X_min_y_mid
| X_min_y_min
type units =
| Object_bounding_box
| User_space_on_use
type angle =
| Deg of float
| Grad of float
| Rad of float
| Turn of float
type path_op =
| Move_to_abs of
{ x : float
; y : float
}
| Move_to_rel of
{ x : float
; y : float
}
| Line_to_abs of
{ x : float
; y : float
}
| Line_to_rel of
{ x : float
; y : float
}
| Arc_to_abs of
{ rx : float
; ry : float
; x_axis_rotation : float
; large_arc : bool
; sweep : bool
; x : float
; y : float
}
| Arc_to_rel of
{ rx : float
; ry : float
; x_axis_rotation : float
; large_arc : bool
; sweep : bool
; dx : float
; dy : float
}
| Cubic_abs of
{ x1 : float
; y1 : float
; x2 : float
; y2 : float
; x : float
; y : float
}
| Cubic_rel of
{ x1 : float
; y1 : float
; x2 : float
; y2 : float
; x : float
; y : float
}
| Cubic_smooth_abs of
{ x2 : float
; y2 : float
; x : float
; y : float
}
| Cubic_smooth_rel of
{ x2 : float
; y2 : float
; x : float
; y : float
}
| Quadratic_abs of
{ x1 : float
; y1 : float
; x : float
; y : float
}
| Quadratic_rel of
{ x1 : float
; y1 : float
; x : float
; y : float
}
| Quadratic_smooth_abs of
{ x : float
; y : float
}
| Quadratic_smooth_rel of
{ x : float
; y : float
}
| Close_path
type transform_op =
| Matrix of float * float * float * float * float * float
| Translate of
{ dx : float
; dy : float
}
| Scale of
{ sx : float
; sy : float
}
| Rotate of
{ a : [ `Deg of float ]
; x : float
; y : float
}
| Skew_x of float
| Skew_y of float
val viewbox : min_x:float -> min_y:float -> width:float -> height:float -> t
(** {1 <a>} *)
val href : string -> t
(** {1 many things} *)
val transform : transform_op list -> t
(** {1 <circle>} *)
val cx : float -> t
val cy : float -> t
val r : float -> t
(** nothing for <defs> *)
(** {1 <ellipse>} *)
(** shares cx and cy with circle*)
val rx : float -> t
val ry : float -> t
(** nothing for <g> *)
(** {1 <image>} *)
val x : float -> t
val y : float -> t
val width : float -> t
val height : float -> t
val xlink_href : string -> t
val preserve_aspect_ratio
: align:align_options
-> ?meet_or_slice:[ `Meet | `Slice ]
-> unit
-> t
(** {1 <line>} *)
val x1 : float -> t
val x2 : float -> t
val y1 : float -> t
val y2 : float -> t
(** {1 <linearGradient> } *)
(** shares href with <a>, x1, x2, y1, y2 with <line> *)
val gradient_units : units -> t
val gradient_transform : transform_op list -> t
(** {1 <marker>} *)
(** viewBox is shared with <svg>, preserveAspecteRatio is shared with <image> *)
val marker_height : float -> t
val marker_width : float -> t
val marker_units : units -> t
val orient : [ `Angle of angle | `Auto | `Auto_start_reverse ] -> t
val refX : float -> t
val refY : float -> t
(** {1 <mask>} *)
(** shares width, height, x, and y with <image> *)
val mask_units : units -> t
val mask_content_units : units -> t
(** {1 <path>} *)
val d : path_op list -> t
(** {1 <polygon>} *)
val points : (float * float) list -> t
val fill : [< `Url of string | Css_gen.Color.t ] -> t
val stroke : [< Css_gen.Color.t ] -> t
val stroke_width : float -> t
val stroke_linecap : [ `Butt | `Round | `Square ] -> t
val stroke_dasharray : float list -> t
val stroke_dashoffset : float -> t
(** {1 <polyline>} *)
(** shares points with <polygon> *)
(** {1 <radialGradient>} *)
(** shares spreadMethod with <linearGradient> shares cx, cy, r with <circle> *)
val fx : float -> t
val fy : float -> t
val fr : float -> t
val spread_method : [ `Pad | `Reflect | `Repeat ] -> t
(** Nothing to do for <rect> because shares x, y, rx and ry width,
height with <image> *)
(** {1 <stop>} *)
val offset : Percent.t -> t
val stop_color : [< Css_gen.Color.t ] -> t
val stop_opacity : Percent.t -> t
(** nothing to do for <style> *)
(** Nothing to do for <symbol> as refX and refY is shared with
<marker>, viewBox is shared with <svg>, x, y, width, and
height are shared with <image>, *)
(** {1 <text>} *)
(** x and y is shared with <image> *)
val dx : float -> t
val dy : float -> t
module Text : sig
val start_offset
: [ Css_gen.Length.t | `Percentage of Percent.t | `Number of float ]
-> t
val text_length
: [ Css_gen.Length.t | `Percentage of Percent.t | `Number of float ]
-> t
(** {1 <textPath>} *)
(** shares textLength with <text> *)
val length_adjust : [ `Spacing | `Spacing_and_glyphs ] -> t
val side : [ `Left | `Right ] -> t
(** Nothing to do for <title>
Nothing to do for <tspan> as it shares everything with text
Nothing to do for <use> as it shares href with <linearGradient>, x, y,
width, and height with <image> *)
val spacing : [ `Auto | `Exact ] -> t
end
val ( @ ) : t -> t -> t