aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkMatrix.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-10-31 12:26:35 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-31 16:58:05 +0000
commita097173bb16f6dd83f114a051a0a4ba839f79bf2 (patch)
treeae36f8b92dba2f7fa7e90cc78d8d2eba3791c011 /include/core/SkMatrix.h
parent15dc2d160daa8f6fb56fc7340160ed8f777103ed (diff)
Add a GM to test out odd matrix draws (take 2)
TBR=bsalomon@google.com Bug: skia:7075 Change-Id: I87efa058916fe0305b57eb4dd14b479e8a8d2c6d Reviewed-on: https://skia-review.googlesource.com/65507 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/core/SkMatrix.h')
-rw-r--r--include/core/SkMatrix.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index 58bcff8fc4..e88232834b 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -79,6 +79,30 @@ public:
return m;
}
+ /** Sets matrix to be:
+
+ | scaleX skewX transX |
+ | skewY scaleY transY |
+ | pers0 pers1 pers2 |
+
+ @param scaleX horizontal scale factor to store
+ @param skewX horizontal skew factor to store
+ @param transX horizontal translation to store
+ @param skewY vertical skew factor to store
+ @param scaleY vertical scale factor to store
+ @param transY vertical translation to store
+ @param pers0 input x perspective factor to store
+ @param pers1 input y perspective factor to store
+ @param pers2 perspective scale factor to store
+ */
+ static SkMatrix SK_WARN_UNUSED_RESULT MakeAll(SkScalar scaleX, SkScalar skewX, SkScalar transX,
+ SkScalar skewY, SkScalar scaleY, SkScalar transY,
+ SkScalar pers0, SkScalar pers1, SkScalar pers2) {
+ SkMatrix m;
+ m.setAll(scaleX, skewX, transX, skewY, scaleY, transY, pers0, pers1, pers2);
+ return m;
+ }
+
/** \enum SkMatrix::TypeMask
Enum of bit fields for mask returned by getType().
Used to identify the complexity of SkMatrix, to optimize performance.