PlanarYUVLuminanceSource constructor
PlanarYUVLuminanceSource(})
Implementation
PlanarYUVLuminanceSource(
this._yuvData,
this._dataWidth,
this._dataHeight, {
int left = 0,
int top = 0,
int? width,
int? height,
bool isReverseHorizontal = false,
}) : _left = left,
_top = top,
super(width ?? (_dataWidth - left), height ?? (_dataHeight - top)) {
width ??= _dataWidth - _left;
height ??= _dataHeight - _top;
if (_left + width > _dataWidth || _top + height > _dataHeight) {
throw ArgumentError('Crop rectangle does not fit within image data.');
}
if (isReverseHorizontal) {
_reverseHorizontal(width, height);
}
}