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 bool r = using<bool>((arena) {
    final rval = arena<ffi.Bool>();
    cvRun(() => cffi.ClipLine(imgRect.ref, pt1.ref, pt2.ref, rval));
    return rval.value;
  });
  return (r, pt1, pt2);
}