clipLine function

(bool, Point, Point) clipLine(
  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

(bool, Point, Point) clipLine(Rect imgRect, Point pt1, Point pt2) {
  final p = calloc<ffi.Bool>();
  cvRun(() => cimgproc.cv_clipLine(imgRect.ref, pt1.ref, pt2.ref, p, ffi.nullptr));
  final rval = p.value;
  calloc.free(p);
  return (rval, pt1, pt2);
}