clipLineAsync function

Future<(bool, Point, Point)> clipLineAsync(
  1. Rect imgRect,
  2. Point pt1,
  3. Point pt2
)

ClipLine clips the line against the image rectangle. For further details, please see: https:///docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#gaf483cb46ad6b049bc35ec67052ef1c2c

Implementation

Future<(bool, Point, Point)> clipLineAsync(Rect imgRect, Point pt1, Point pt2) async {
  final p = calloc<ffi.Bool>();
  return cvRunAsync0((callback) => cimgproc.cv_clipLine(imgRect.ref, pt1.ref, pt2.ref, p, callback), (c) {
    final rval = p.value;
    calloc.free(p);
    return c.complete((rval, pt1, pt2));
  });
}