description

# texSubImage2D method Null safety

void texSubImage2D (

1. int target,
2. int level,
3. int xoffset,
4. int yoffset,
5. int format_OR_width,
6. int height_OR_type,
7. dynamic bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video,
8. [int? type,
9. TypedData? pixels]

)

## Implementation

    void texSubImage2D(
        int target,
        int level,
        int xoffset,
        int yoffset,
        int format_OR_width,
        int height_OR_type,
        bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video,
        [int? type,
        TypedData? pixels]) {
      if (type != null &&
          (bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video is int)) {
        _texSubImage2D_1(
            target,
            level,
            xoffset,
            yoffset,
            format_OR_width,
            height_OR_type,
            bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video,
            type,
            pixels);
        return;
      }
      if ((bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData) &&
          type == null &&
          pixels == null) {
        var pixels_1 = convertDartToNative_ImageData(
            bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video);
        _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width,
            height_OR_type, pixels_1);
        return;
      }
      if ((bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video
              is ImageElement) &&
          type == null &&
          pixels == null) {
        _texSubImage2D_3(
            target,
            level,
            xoffset,
            yoffset,
            format_OR_width,
            height_OR_type,
            bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video);
        return;
      }
      if ((bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video
              is CanvasElement) &&
          type == null &&
          pixels == null) {
        _texSubImage2D_4(
            target,
            level,
            xoffset,
            yoffset,
            format_OR_width,
            height_OR_type,
            bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video);
        return;
      }
      if ((bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video
              is VideoElement) &&
          type == null &&
          pixels == null) {
        _texSubImage2D_5(
            target,
            level,
            xoffset,
            yoffset,
            format_OR_width,
            height_OR_type,
            bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video);
        return;
      }
      if ((bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video
              is ImageBitmap) &&
          type == null &&
          pixels == null) {
        _texSubImage2D_6(
            target,
            level,
            xoffset,
            yoffset,
            format_OR_width,
            height_OR_type,
            bitmap_OR_canvas_OR_format_OR_image_OR_pixels_OR_video);
        return;
      }
      throw new ArgumentError("Incorrect number or type of arguments");
    }