fillAsync method

Future<Mat> fillAsync(
  1. Mat mat,
  2. int distType,
  3. double a,
  4. double b, {
  5. bool saturateRange = false,
  6. bool inplace = false,
})

Implementation

Future<Mat> fillAsync(
  Mat mat,
  int distType,
  double a,
  double b, {
  bool saturateRange = false,
  bool inplace = false,
}) async {
  if (inplace) {
    return cvRunAsync0<Mat>(
      (callback) => cffi.RNG_Fill_Async(ref, mat.ref, distType, a, b, saturateRange, callback),
      (c) => c.complete(mat),
    );
  } else {
    final m = await mat.cloneAsync();
    return cvRunAsync0<Mat>(
      (callback) => cffi.RNG_Fill_Async(ref, m.ref, distType, a, b, saturateRange, callback),
      (c) => c.complete(m),
    );
  }
}