RGBLuminanceSource.crop constructor

RGBLuminanceSource.crop(
  1. Int8List pixels,
  2. int _dataWidth,
  3. int _dataHeight,
  4. int _left,
  5. int _top,
  6. int width,
  7. int height,
)

Implementation

RGBLuminanceSource.crop(Int8List pixels, this._dataWidth, this._dataHeight,
    this._left, this._top, int width, int height)
    : _luminances = pixels,
      super(width, height) {
  if (_left + width > _dataWidth || _top + height > _dataHeight) {
    throw ArgumentError('Crop rectangle does not fit within image data.');
  }
}