-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDOMMatrixReadOnly.res
More file actions
147 lines (117 loc) · 3.52 KB
/
Copy pathDOMMatrixReadOnly.res
File metadata and controls
147 lines (117 loc) · 3.52 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
/**
`make()`
Creates a new identity `DOMMatrixReadOnly`.
```res
let matrix = DOMMatrixReadOnly.make()
```
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly)
*/
@new
external make: unit => DomTypes.domMatrixReadOnly = "DOMMatrixReadOnly"
/**
`fromString(string)`
Creates a new `DOMMatrixReadOnly` from a transform string.
```res
let matrix = DOMMatrixReadOnly.fromString("matrix(1, 0, 0, 1, 0, 0)")
```
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly)
*/
@new
external fromString: string => DomTypes.domMatrixReadOnly = "DOMMatrixReadOnly"
/**
`fromArray(array<float>)`
Creates a new `DOMMatrixReadOnly` from an array of matrix component values.
```res
let matrix = DOMMatrixReadOnly.fromArray([1., 0., 0., 1., 0., 0.])
```
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly)
*/
@new
external fromArray: array<float> => DomTypes.domMatrixReadOnly = "DOMMatrixReadOnly"
@scope("DOMMatrixReadOnly")
external fromMatrix: (~other: DomTypes.domMatrixInit=?) => DomTypes.domMatrixReadOnly = "fromMatrix"
@scope("DOMMatrixReadOnly")
external fromFloat32Array: array<float> => DomTypes.domMatrixReadOnly = "fromFloat32Array"
@scope("DOMMatrixReadOnly")
external fromFloat64Array: Float64Array.t => DomTypes.domMatrixReadOnly = "fromFloat64Array"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/translate)
*/
@send
external translate: (
DomTypes.domMatrixReadOnly,
~tx: float=?,
~ty: float=?,
~tz: float=?,
) => DomTypes.domMatrix = "translate"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/scale)
*/
@send
external scale: (
DomTypes.domMatrixReadOnly,
~scaleX: float=?,
~scaleY: float=?,
~scaleZ: float=?,
~originX: float=?,
~originY: float=?,
~originZ: float=?,
) => DomTypes.domMatrix = "scale"
@send
external scale3d: (
DomTypes.domMatrixReadOnly,
~scale: float=?,
~originX: float=?,
~originY: float=?,
~originZ: float=?,
) => DomTypes.domMatrix = "scale3d"
@send
external rotate: (
DomTypes.domMatrixReadOnly,
~rotX: float=?,
~rotY: float=?,
~rotZ: float=?,
) => DomTypes.domMatrix = "rotate"
@send
external rotateFromVector: (
DomTypes.domMatrixReadOnly,
~x: float=?,
~y: float=?,
) => DomTypes.domMatrix = "rotateFromVector"
@send
external rotateAxisAngle: (
DomTypes.domMatrixReadOnly,
~x: float=?,
~y: float=?,
~z: float=?,
~angle: float=?,
) => DomTypes.domMatrix = "rotateAxisAngle"
@send
external skewX: (DomTypes.domMatrixReadOnly, ~sx: float=?) => DomTypes.domMatrix = "skewX"
@send
external skewY: (DomTypes.domMatrixReadOnly, ~sy: float=?) => DomTypes.domMatrix = "skewY"
@send
external multiply: (
DomTypes.domMatrixReadOnly,
~other: DomTypes.domMatrixInit=?,
) => DomTypes.domMatrix = "multiply"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipX)
*/
@send
external flipX: DomTypes.domMatrixReadOnly => DomTypes.domMatrix = "flipX"
@send
external flipY: DomTypes.domMatrixReadOnly => DomTypes.domMatrix = "flipY"
@send
external inverse: DomTypes.domMatrixReadOnly => DomTypes.domMatrix = "inverse"
@send
external transformPoint: (
DomTypes.domMatrixReadOnly,
~point: DomTypes.domPointInit=?,
) => DomTypes.domPoint = "transformPoint"
@send
external toFloat32Array: DomTypes.domMatrixReadOnly => array<float> = "toFloat32Array"
@send
external toFloat64Array: DomTypes.domMatrixReadOnly => Float64Array.t = "toFloat64Array"
@send
external toJSON: DomTypes.domMatrixReadOnly => Dict.t<string> = "toJSON"