setBuffer method

  1. @override
bool setBuffer(
  1. double width,
  2. double height
)
override

@brief Method is used to specify the buffer size around the circle for collision detection. @param width Width of the buffer in pixels. Default: 0. @param height Height of the buffer in pixels. Default: 0. @return true if the operation is successful, false otherwise.

Dart code snippet: @snippet location_window_map_objects_example.dart dart_CircleMapObject_setBuffer

Implementation

@override
bool setBuffer(double width, double height) {
    final _setBufferFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
        Uint8 Function(Pointer<Void>, Float, Float),
        int Function(Pointer<Void>, double, double)
      >('navigine_sdk_flutter_CircleMapObject_setBuffer__Width_Height'));
    final _widthHandle = navigine_sdk_flutter_double_ToFfi(width);
    final _heightHandle = navigine_sdk_flutter_double_ToFfi(height);
    final _handle = this.handle;
    final __resultHandle = _setBufferFfi(_handle, _widthHandle, _heightHandle);
    navigine_sdk_flutter_double_ReleaseFfiHandle(_widthHandle);
    navigine_sdk_flutter_double_ReleaseFfiHandle(_heightHandle);
    final _result = navigine_sdk_flutter_bool_FromFfi(__resultHandle);
    navigine_sdk_flutter_bool_ReleaseFfiHandle(__resultHandle);
    return _result;
}