MCPcopy Create free account
hub / github.com/SOUI2/soui / RotTrans_pts

Method RotTrans_pts

third-part/SkMatrix/src/SkMatrix.cpp:950–975  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

948}
949
950void SkMatrix::RotTrans_pts(const SkMatrix& m, SkPoint dst[],
951 const SkPoint src[], int count) {
952 SkASSERT(!m.hasPerspective());
953
954 if (count > 0) {
955 SkScalar mx = m.fMat[kMScaleX];
956 SkScalar my = m.fMat[kMScaleY];
957 SkScalar kx = m.fMat[kMSkewX];
958 SkScalar ky = m.fMat[kMSkewY];
959 SkScalar tx = m.fMat[kMTransX];
960 SkScalar ty = m.fMat[kMTransY];
961 do {
962 SkScalar sy = src->fY;
963 SkScalar sx = src->fX;
964 src += 1;
965#ifdef SK_LEGACY_MATRIX_MATH_ORDER
966 dst->fY = sx * ky + (sy * my + ty);
967 dst->fX = sx * mx + (sy * kx + tx);
968#else
969 dst->fY = sdot(sx, ky, sy, my) + ty;
970 dst->fX = sdot(sx, mx, sy, kx) + tx;
971#endif
972 dst += 1;
973 } while (--count);
974 }
975}
976
977void SkMatrix::Persp_pts(const SkMatrix& m, SkPoint dst[],
978 const SkPoint src[], int count) {

Callers

nothing calls this directly

Calls 1

sdotFunction · 0.70

Tested by

no test coverage detected