resize method

  1. @override
void resize(
  1. int width,
  2. int height
)
override

Implementation

@override
void resize(int width, int height) {
  final w = width * _cellWidth + options.padding * 2;
  final h = height * _cellHeight + options.padding * 2;
  if (width <= 0 ||
      height <= 0 ||
      w > 16000 ||
      h > 16000 ||
      w * h > 16000000) {
    throw ArgumentError(
      'Raster viewport must be positive and fit within '
      '16 megapixels and 16000 pixels per axis',
    );
  }
  _width = width;
  _height = height;
  _image = null;
}