Index: include/core/SkMatrix.h |
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h |
index 1626750208363f7da95dd71dee7f84860e932404..6560cb5c2b1df32fc7dfe0b1c136f2e393b74d79 100644 |
--- a/include/core/SkMatrix.h |
+++ b/include/core/SkMatrix.h |
@@ -369,6 +369,11 @@ public: |
@return true if the matrix can be represented by the rectangle mapping. |
*/ |
bool setRectToRect(const SkRect& src, const SkRect& dst, ScaleToFit stf); |
+ static SkMatrix MakeRectToRect(const SkRect& src, const SkRect& dst, ScaleToFit stf) { |
+ SkMatrix m; |
+ m.setRectToRect(src, dst, stf); |
+ return m; |
+ } |
/** Set the matrix such that the specified src points would map to the |
specified dst points. count must be within [0..4]. |