summaryrefslogtreecommitdiff
path: root/library/src/main/scala/scala/scalajs/js/typedarray/Uint8ClampedArray.scala
diff options
context:
space:
mode:
authorHaoyi Li <haoyi@haoyi-mbp.corp.dropbox.com>2014-11-26 00:45:31 -0800
committerHaoyi Li <haoyi@haoyi-mbp.corp.dropbox.com>2014-11-26 00:45:31 -0800
commit2c4b142503bd2d871e6818b5cab8c38627d9e4a0 (patch)
tree6ba33d2980a1a7a1286100202a695c6631bd240e /library/src/main/scala/scala/scalajs/js/typedarray/Uint8ClampedArray.scala
downloadhands-on-scala-js-2c4b142503bd2d871e6818b5cab8c38627d9e4a0.tar.gz
hands-on-scala-js-2c4b142503bd2d871e6818b5cab8c38627d9e4a0.tar.bz2
hands-on-scala-js-2c4b142503bd2d871e6818b5cab8c38627d9e4a0.zip
Squashed 'examples/scala-js/' content from commit 47311ba
git-subtree-dir: examples/scala-js git-subtree-split: 47311ba693f949f204f27ea9475bb63425fbd4f3
Diffstat (limited to 'library/src/main/scala/scala/scalajs/js/typedarray/Uint8ClampedArray.scala')
-rw-r--r--library/src/main/scala/scala/scalajs/js/typedarray/Uint8ClampedArray.scala24
1 files changed, 24 insertions, 0 deletions
diff --git a/library/src/main/scala/scala/scalajs/js/typedarray/Uint8ClampedArray.scala b/library/src/main/scala/scala/scalajs/js/typedarray/Uint8ClampedArray.scala
new file mode 100644
index 0000000..601d65c
--- /dev/null
+++ b/library/src/main/scala/scala/scalajs/js/typedarray/Uint8ClampedArray.scala
@@ -0,0 +1,24 @@
+package scala.scalajs.js.typedarray
+
+import scala.scalajs.js
+
+class Uint8ClampedArray private extends TypedArray[Int, Uint8ClampedArray] {
+
+ /** Constructs a Uint8ClampedArray with the given length. Initialized to all 0 */
+ def this(length: Int) = this()
+
+ /** Creates a new Uint8ClampedArray with the same elements than the given TypedArray
+ *
+ * The elements are converted before being stored in the new Int8Array.
+ */
+ def this(typedArray: TypedArray[_, _]) = this()
+
+ /** Creates a new Uint8ClampedArray with the elements in the given array */
+ def this(array: js.Array[_]) = this()
+
+ /** Creates a Uint8ClampedArray view on the given ArrayBuffer */
+ def this(buffer: ArrayBuffer, byteOffset: Int = 0, length: Int = ???) = this()
+
+}
+
+object Uint8ClampedArray extends TypedArrayStatic