W3cubDocs

/Dart 2

texImage2D method

void texImage2D (int target, int level, int internalformat, int format_OR_width, int height_OR_type, dynamic bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video, [ int format, int type, TypedData pixels ])

Implementation

void texImage2D(
    int target,
    int level,
    int internalformat,
    int format_OR_width,
    int height_OR_type,
    bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video,
    [int format,
    int type,
    TypedData pixels]) {
  if (type != null &&
      format != null &&
      (bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video is int)) {
    _texImage2D_1(
        target,
        level,
        internalformat,
        format_OR_width,
        height_OR_type,
        bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video,
        format,
        type,
        pixels);
    return;
  }
  if ((bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData) &&
      format == null &&
      type == null &&
      pixels == null) {
    var pixels_1 = convertDartToNative_ImageData(
        bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video);
    _texImage2D_2(target, level, internalformat, format_OR_width,
        height_OR_type, pixels_1);
    return;
  }
  if ((bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video
          is ImageElement) &&
      format == null &&
      type == null &&
      pixels == null) {
    _texImage2D_3(
        target,
        level,
        internalformat,
        format_OR_width,
        height_OR_type,
        bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video);
    return;
  }
  if ((bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video
          is CanvasElement) &&
      format == null &&
      type == null &&
      pixels == null) {
    _texImage2D_4(
        target,
        level,
        internalformat,
        format_OR_width,
        height_OR_type,
        bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video);
    return;
  }
  if ((bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video
          is VideoElement) &&
      format == null &&
      type == null &&
      pixels == null) {
    _texImage2D_5(
        target,
        level,
        internalformat,
        format_OR_width,
        height_OR_type,
        bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video);
    return;
  }
  if ((bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video
          is ImageBitmap) &&
      format == null &&
      type == null &&
      pixels == null) {
    _texImage2D_6(
        target,
        level,
        internalformat,
        format_OR_width,
        height_OR_type,
        bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video);
    return;
  }
  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.dart.dev/stable/2.5.0/dart-web_gl/RenderingContext/texImage2D.html