@@ -8,6 +8,7 @@ package org.scalajs.dom
8
8
9
9
import scala .scalajs .js
10
10
import scala .scalajs .js .annotation ._
11
+ import js .typedarray .Uint8ClampedArray
11
12
12
13
/** The ImageData interface represents the underlying pixel data of an area of a <canvas> element. It is created
13
14
* using creators on the CanvasRenderingContext2D object associated with the canvas createImageData() and
@@ -18,54 +19,51 @@ import scala.scalajs.js.annotation._
18
19
class ImageData extends js.Object {
19
20
20
21
/**
21
- * Create an ImageData instance from an array of pixel data and a width.
22
- * @param data pixel data
23
- * @param width width in pixels
24
- */
25
- def this (data : js.typedarray. Uint8ClampedArray , width : Int ) = this ()
22
+ * Create an ImageData instance from an array of pixel data and a width.
23
+ * @param data pixel data
24
+ * @param width width in pixels
25
+ */
26
+ def this (data : Uint8ClampedArray , width : Int ) = this ()
26
27
27
28
/**
28
- * Create an ImageData instance from an array of pixel data, width, and height.
29
- * @param data pixel data
30
- * @param width width in pixels
31
- * @param height height in pixels
32
- */
33
- def this (data : js.typedarray. Uint8ClampedArray , width : Int , height : Int ) = this ()
29
+ * Create an ImageData instance from an array of pixel data, width, and height.
30
+ * @param data pixel data
31
+ * @param width width in pixels
32
+ * @param height height in pixels
33
+ */
34
+ def this (data : Uint8ClampedArray , width : Int , height : Int ) = this ()
34
35
35
36
/**
36
- * Create a blank ImageData instance from specified width and height.
37
- *
38
- * @param width width in pixels
39
- * @param height height in pixels
40
- */
37
+ * Create a blank ImageData instance from specified width and height.
38
+ * @param width width in pixels
39
+ * @param height height in pixels
40
+ */
41
41
def this (width : Int , height : Int ) = this ()
42
42
43
43
/**
44
- * Create a blank ImageData instance from specified width, height, and settings object.
45
- *
46
- * @param width width in pixels
47
- * @param height height in pixels
48
- * @param settings image settings
49
- */
44
+ * Create a blank ImageData instance from specified width, height, and settings object.
45
+ * @param width width in pixels
46
+ * @param height height in pixels
47
+ * @param settings image settings
48
+ */
50
49
def this (width : Int , height : Int , setings : js.Object ) = this ()
51
50
52
51
/**
53
- * Create a blank ImageData instance from specified pixel data, width, height, and settings object.
54
- *
55
- * @param data pixel data
56
- * @param width width in pixels
57
- * @param height height in pixels
58
- * @param settings image settings
59
- */
60
- def this (data : js.typedarray.Uint8ClampedArray , width : Int , height : Int , setings : js.Object ) = this ()
52
+ * Create a blank ImageData instance from specified pixel data, width, height, and settings object.
53
+ * @param data pixel data
54
+ * @param width width in pixels
55
+ * @param height height in pixels
56
+ * @param settings image settings
57
+ */
58
+ def this (data : Uint8ClampedArray , width : Int , height : Int , setings : js.Object ) = this ()
61
59
62
60
/** Is an unsigned long representing the actual width, in pixels, of the ImageData. */
63
61
def width : Int = js.native
64
62
65
63
/** Is a Uint8ClampedArray representing a one-dimensional array containing the data in the RGBA order, with integer
66
64
* values between 0 and 255 (included).
67
65
*/
68
- def data : js.typedarray. Uint8ClampedArray = js.native
66
+ def data : Uint8ClampedArray = js.native
69
67
70
68
/** Is an unsigned long representing the actual height, in pixels, of the ImageData. */
71
69
def height : Int = js.native
0 commit comments