decodeRegion method
@brief Method is used to decode rectangle region in the image specified by rect. @param rect area to render @see Rectangle "Rectangle" @param sampleSize if set to a value > 1, requests the decoder to subsample the original image, returning a smaller image to save memory. @return constructed bitmap
Dart code snippet: @snippet bitmap_region_decoder_example.dart dart_BitmapRegionDecoder_decodeRegion
Implementation
@override
ImageWrapper decodeRegion(Rectangle rect, double sampleSize) {
final _decodeRegionFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
Pointer<Void> Function(Pointer<Void>, Pointer<Void>, Float),
Pointer<Void> Function(Pointer<Void>, Pointer<Void>, double)
>('navigine_sdk_flutter_BitmapRegionDecoder_decodeRegion__Rect_SampleSize'));
final _rectHandle = navigine_sdk_flutter_Rectangle_ToFfi(rect);
final _sampleSizeHandle = navigine_sdk_flutter_double_ToFfi(sampleSize);
final _handle = this.handle;
final __resultHandle = _decodeRegionFfi(_handle, _rectHandle, _sampleSizeHandle);
navigine_sdk_flutter_Rectangle_ReleaseFfiHandle(_rectHandle);
navigine_sdk_flutter_double_ReleaseFfiHandle(_sampleSizeHandle);
final _result = navigine_sdk_flutter_ImageWrapper_FromFfi(__resultHandle);
navigine_sdk_flutter_ImageWrapper_ReleaseFfiHandle(__resultHandle);
return _result;
}