aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMatrixPriv.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-01-05 13:49:07 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-05 19:32:15 +0000
commitfa3783f17dba971e3204ba950965d9c65eb8711d (patch)
tree321621e6f60ffaee29c08e8146779423596332d4 /src/core/SkMatrixPriv.h
parentcea2271970febf51d088e403f972e6eae7c934da (diff)
Remove public version of SkMatrix::mapPointsWithStride.
Use private version already in SkMatrixPriv. Change-Id: I6e9546afdf2b072402f9deecec99a6d236e2c7f4 Reviewed-on: https://skia-review.googlesource.com/91400 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/core/SkMatrixPriv.h')
-rw-r--r--src/core/SkMatrixPriv.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/core/SkMatrixPriv.h b/src/core/SkMatrixPriv.h
index 7c00c4eb52..d5fd243369 100644
--- a/src/core/SkMatrixPriv.h
+++ b/src/core/SkMatrixPriv.h
@@ -63,6 +63,24 @@ public:
return false;
}
+ /** Maps count pts, skipping stride bytes to advance from one SkPoint to the next.
+ Points are mapped by multiplying each SkPoint by SkMatrix. Given:
+
+ | A B C | | x |
+ Matrix = | D E F |, pt = | y |
+ | G H I | | 1 |
+
+ each resulting pts SkPoint is computed as:
+
+ |A B C| |x| Ax+By+C Dx+Ey+F
+ Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , -------
+ |G H I| |1| Gx+Hy+I Gx+Hy+I
+
+ @param mx matrix used to map the points
+ @param pts storage for mapped points
+ @param stride size of record starting with SkPoint, in bytes
+ @param count number of points to transform
+ */
static void MapPointsWithStride(const SkMatrix& mx, SkPoint pts[], size_t stride, int count) {
SkASSERT(stride >= sizeof(SkPoint));
SkASSERT(0 == stride % sizeof(SkScalar));
@@ -106,6 +124,7 @@ public:
Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , -------
|G H I| |1| Gx+Hy+I Gx+Hy+I
+ @param mx matrix used to map the points
@param dst storage for mapped points
@param src points to transform
@param stride size of record starting with SkPoint, in bytes