putTextAsync function

Future<Mat> putTextAsync(
  1. InputOutputArray img,
  2. String text,
  3. Point org,
  4. int fontFace,
  5. double fontScale,
  6. Scalar color, {
  7. int thickness = 1,
  8. int lineType = LINE_8,
  9. bool bottomLeftOrigin = false,
})

PutTextWithParams draws a text string. It renders the specified text string into the img Mat at the location passed in the "org" param, using the desired font face, font scale, color, and line thinkness.

For further details, please see: http:///docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga5126f47f883d730f633d74f07456c576

Implementation

Future<Mat> putTextAsync(
  InputOutputArray img,
  String text,
  Point org,
  int fontFace,
  double fontScale,
  Scalar color, {
  int thickness = 1,
  int lineType = LINE_8,
  bool bottomLeftOrigin = false,
}) async {
  final textPtr = text.toNativeUtf8().cast<ffi.Char>();
  final rval = cvRunAsync0<Mat>(
    (callback) => cimgproc.PutTextWithParams_Async(
      img.ref,
      textPtr,
      org.ref,
      fontFace,
      fontScale,
      color.ref,
      thickness,
      lineType,
      bottomLeftOrigin,
      callback,
    ),
    (completer) => completer.complete(img),
  );
  calloc.free(textPtr);
  return rval;
}