Matrix.makeRectToRect constructor
Matrix.makeRectToRect(
- Rect src,
- Rect dst,
- ScaleToFit scaleToFit
Returns Matrix set to scale and translate src Rect to dst Rect. stf selects whether mapping completely fills dst or preserves the aspect ratio, and how to align src within dst. Returns the identity Matrix if src is empty. If dst is empty, returns Matrix set to:
| 0 0 0 |
| 0 0 0 |
| 0 0 1 |
@param src Rect to map from @param dst Rect to map to @param stf one of: kFill_ScaleToFit, kStart_ScaleToFit, kCenter_ScaleToFit, kEnd_ScaleToFit @return Matrix mapping src to dst
Implementation
factory Matrix.makeRectToRect(Rect src, Rect dst, ScaleToFit scaleToFit) {
final result = Matrix.create();
result.setRectToRect(src, dst, scaleToFit);
return result;
}