ImageData factory constructor

ImageData(data_OR_sw, int sh_OR_sw, [ int sh ])

Source

@DomName('ImageData.ImageData')
@DocsEditable()
factory ImageData(data_OR_sw, int sh_OR_sw, [int sh]) {
  if ((sh_OR_sw is int) && (data_OR_sw is int) && sh == null) {
    return _blink.BlinkImageData.instance
        .constructorCallback_2_(data_OR_sw, sh_OR_sw);
  }
  if ((sh_OR_sw is int) && (data_OR_sw is Uint8ClampedList) && sh == null) {
    return _blink.BlinkImageData.instance
        .constructorCallback_2_(data_OR_sw, sh_OR_sw);
  }
  if ((sh is int) && (sh_OR_sw is int) && (data_OR_sw is Uint8ClampedList)) {
    return _blink.BlinkImageData.instance
        .constructorCallback_3_(data_OR_sw, sh_OR_sw, sh);
  }
  throw new ArgumentError("Incorrect number or type of arguments");
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-html/ImageData/ImageData.html