mapRect method

(bool, Rect) mapRect(
  1. Rect src
)

Sets dst to bounds of src corners mapped by Matrix. Returns true if mapped corners are dst corners.

Returned value is the same as calling rectStaysRect().

@param dst storage for bounds of mapped Point @param src Rect to map @return true if dst is equivalent to mapped src

Implementation

(bool, Rect) mapRect(Rect src) {
  final p = calloc<c.mnn_cv_rect_t>();
  final success = c.mnn_cv_matrix_map_rect(ptr, p, src.ptr.cast());
  return (success, Rect.fromPointer(p.cast()));
}