getEdgeListAsync method

Future<List<Vec4f>> getEdgeListAsync()

Implementation

Future<List<Vec4f>> getEdgeListAsync() async {
  final pv = calloc<ffi.Pointer<cvg.Vec4f>>();
  final psize = calloc<ffi.Size>();
  return cvRunAsync0(
    (callback) => cimgproc.cv_Subdiv2D_getEdgeList(ref, pv, psize, callback),
    (c) {
      final rval = List.generate(psize.value, (i) {
        final v = pv.value[i];
        return Vec4f(v.val1, v.val2, v.val3, v.val4);
      });
      calloc.free(psize);
      calloc.free(pv);
      return c.complete(rval);
    },
  );
}