-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDOMMatrix.res
More file actions
169 lines (133 loc) · 4.09 KB
/
Copy pathDOMMatrix.res
File metadata and controls
169 lines (133 loc) · 4.09 KB
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
open DOMAPI
open Prelude
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrix)
*/
@new
external make: (~init: string=?) => domMatrix = "DOMMatrix"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrix)
*/
@new
external fromFloatArray: (~init: array<float>=?) => domMatrix = "DOMMatrix"
external asDOMMatrixReadOnly: domMatrix => domMatrixReadOnly = "%identity"
@scope("DOMMatrix")
external fromMatrix: (~other: domMatrixInit=?) => domMatrixReadOnly = "fromMatrix"
@scope("DOMMatrix")
external fromFloat32Array: array<float> => domMatrixReadOnly = "fromFloat32Array"
@scope("DOMMatrix")
external fromFloat64Array: float64Array => domMatrixReadOnly = "fromFloat64Array"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/translate)
*/
@send
external translate: (domMatrix, ~tx: float=?, ~ty: float=?, ~tz: float=?) => domMatrix = "translate"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/scale)
*/
@send
external scale: (
domMatrix,
~scaleX: float=?,
~scaleY: float=?,
~scaleZ: float=?,
~originX: float=?,
~originY: float=?,
~originZ: float=?,
) => domMatrix = "scale"
@send
external scale3d: (
domMatrix,
~scale: float=?,
~originX: float=?,
~originY: float=?,
~originZ: float=?,
) => domMatrix = "scale3d"
@send
external rotate: (domMatrix, ~rotX: float=?, ~rotY: float=?, ~rotZ: float=?) => domMatrix = "rotate"
@send
external rotateFromVector: (domMatrix, ~x: float=?, ~y: float=?) => domMatrix = "rotateFromVector"
@send
external rotateAxisAngle: (
domMatrix,
~x: float=?,
~y: float=?,
~z: float=?,
~angle: float=?,
) => domMatrix = "rotateAxisAngle"
@send
external skewX: (domMatrix, ~sx: float=?) => domMatrix = "skewX"
@send
external skewY: (domMatrix, ~sy: float=?) => domMatrix = "skewY"
@send
external multiply: (domMatrix, ~other: domMatrixInit=?) => domMatrix = "multiply"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipX)
*/
@send
external flipX: domMatrix => domMatrix = "flipX"
@send
external flipY: domMatrix => domMatrix = "flipY"
@send
external inverse: domMatrix => domMatrix = "inverse"
@send
external transformPoint: (domMatrix, ~point: domPointInit=?) => domPoint = "transformPoint"
@send
external toFloat32Array: domMatrix => array<float> = "toFloat32Array"
@send
external toFloat64Array: domMatrix => float64Array = "toFloat64Array"
@send
external toJSON: domMatrix => Dict.t<string> = "toJSON"
@scope("DOMMatrix")
external fromMatrixD: (~other: domMatrixInit=?) => domMatrix = "fromMatrix"
@scope("DOMMatrix")
external fromFloat32ArrayD: array<float> => domMatrix = "fromFloat32Array"
@scope("DOMMatrix")
external fromFloat64ArrayD: float64Array => domMatrix = "fromFloat64Array"
@send
external multiplySelf: (domMatrix, ~other: domMatrixInit=?) => domMatrix = "multiplySelf"
@send
external preMultiplySelf: (domMatrix, ~other: domMatrixInit=?) => domMatrix = "preMultiplySelf"
@send
external translateSelf: (domMatrix, ~tx: float=?, ~ty: float=?, ~tz: float=?) => domMatrix =
"translateSelf"
@send
external scaleSelf: (
domMatrix,
~scaleX: float=?,
~scaleY: float=?,
~scaleZ: float=?,
~originX: float=?,
~originY: float=?,
~originZ: float=?,
) => domMatrix = "scaleSelf"
@send
external scale3dSelf: (
domMatrix,
~scale: float=?,
~originX: float=?,
~originY: float=?,
~originZ: float=?,
) => domMatrix = "scale3dSelf"
@send
external rotateSelf: (domMatrix, ~rotX: float=?, ~rotY: float=?, ~rotZ: float=?) => domMatrix =
"rotateSelf"
@send
external rotateFromVectorSelf: (domMatrix, ~x: float=?, ~y: float=?) => domMatrix =
"rotateFromVectorSelf"
@send
external rotateAxisAngleSelf: (
domMatrix,
~x: float=?,
~y: float=?,
~z: float=?,
~angle: float=?,
) => domMatrix = "rotateAxisAngleSelf"
@send
external skewXSelf: (domMatrix, ~sx: float=?) => domMatrix = "skewXSelf"
@send
external skewYSelf: (domMatrix, ~sy: float=?) => domMatrix = "skewYSelf"
@send
external invertSelf: domMatrix => domMatrix = "invertSelf"
@send
external setMatrixValue: (domMatrix, string) => domMatrix = "setMatrixValue"