Lines Matching refs:SkScalar
15 static void normalize_perspective(SkScalar mat[9]) { in normalize_perspective()
26 SkScalar p2 = mat[SkMatrix::kMPersp2]; in normalize_perspective()
70 void SkMatrix::set9(const SkScalar buffer[]) { in set9()
71 memcpy(fMat, buffer, 9 * sizeof(SkScalar)); in set9()
76 void SkMatrix::setAffine(const SkScalar buffer[]) { in setAffine()
179 const SkScalar* SK_RESTRICT ma = a.fMat; in operator ==()
180 const SkScalar* SK_RESTRICT mb = b.fMat; in operator ==()
190 static inline bool is_degenerate_2x2(SkScalar scaleX, SkScalar skewX, in is_degenerate_2x2()
191 SkScalar skewY, SkScalar scaleY) { in is_degenerate_2x2()
192 SkScalar perp_dot = scaleX*scaleY - skewX*skewY; in is_degenerate_2x2()
198 bool SkMatrix::isSimilarity(SkScalar tol) const { in isSimilarity()
208 SkScalar mx = fMat[kMScaleX]; in isSimilarity()
209 SkScalar my = fMat[kMScaleY]; in isSimilarity()
214 SkScalar sx = fMat[kMSkewX]; in isSimilarity()
215 SkScalar sy = fMat[kMSkewY]; in isSimilarity()
227 bool SkMatrix::preservesRightAngles(SkScalar tol) const { in preservesRightAngles()
240 SkScalar mx = fMat[kMScaleX]; in preservesRightAngles()
241 SkScalar my = fMat[kMScaleY]; in preservesRightAngles()
242 SkScalar sx = fMat[kMSkewX]; in preservesRightAngles()
243 SkScalar sy = fMat[kMSkewY]; in preservesRightAngles()
259 static inline SkScalar sdot(SkScalar a, SkScalar b, SkScalar c, SkScalar d) { in sdot()
263 static inline SkScalar sdot(SkScalar a, SkScalar b, SkScalar c, SkScalar d, in sdot()
264 SkScalar e, SkScalar f) { in sdot()
268 static inline SkScalar scross(SkScalar a, SkScalar b, SkScalar c, SkScalar d) { in scross()
272 void SkMatrix::setTranslate(SkScalar dx, SkScalar dy) { in setTranslate()
287 void SkMatrix::preTranslate(SkScalar dx, SkScalar dy) { in preTranslate()
303 void SkMatrix::postTranslate(SkScalar dx, SkScalar dy) { in postTranslate()
321 void SkMatrix::setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py) { in setScale()
329 void SkMatrix::setScale(SkScalar sx, SkScalar sy) { in setScale()
353 void SkMatrix::preScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py) { in preScale()
363 void SkMatrix::preScale(SkScalar sx, SkScalar sy) { in preScale()
384 void SkMatrix::postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py) { in postScale()
393 void SkMatrix::postScale(SkScalar sx, SkScalar sy) { in postScale()
426 void SkMatrix::setSinCos(SkScalar sinV, SkScalar cosV, SkScalar px, SkScalar py) { in setSinCos()
427 const SkScalar oneMinusCosV = 1 - cosV; in setSinCos()
443 void SkMatrix::setSinCos(SkScalar sinV, SkScalar cosV) { in setSinCos()
458 void SkMatrix::setRotate(SkScalar degrees, SkScalar px, SkScalar py) { in setRotate()
459 SkScalar sinV, cosV; in setRotate()
464 void SkMatrix::setRotate(SkScalar degrees) { in setRotate()
465 SkScalar sinV, cosV; in setRotate()
470 void SkMatrix::preRotate(SkScalar degrees, SkScalar px, SkScalar py) { in preRotate()
476 void SkMatrix::preRotate(SkScalar degrees) { in preRotate()
482 void SkMatrix::postRotate(SkScalar degrees, SkScalar px, SkScalar py) { in postRotate()
488 void SkMatrix::postRotate(SkScalar degrees) { in postRotate()
496 void SkMatrix::setSkew(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py) { in setSkew()
511 void SkMatrix::setSkew(SkScalar sx, SkScalar sy) { in setSkew()
526 void SkMatrix::preSkew(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py) { in preSkew()
532 void SkMatrix::preSkew(SkScalar sx, SkScalar sy) { in preSkew()
538 void SkMatrix::postSkew(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py) { in postSkew()
544 void SkMatrix::postSkew(SkScalar sx, SkScalar sy) { in postSkew()
559 sk_bzero(fMat, 8 * sizeof(SkScalar)); in setRectToRect()
563 SkScalar tx, sx = dst.width() / src.width(); in setRectToRect()
564 SkScalar ty, sy = dst.height() / src.height(); in setRectToRect()
579 SkScalar diff; in setRectToRect()
712 static inline SkScalar scross_dscale(SkScalar a, SkScalar b, in scross_dscale()
713 SkScalar c, SkScalar d, double scale) { in scross_dscale()
721 static inline SkScalar dcross_dscale(double a, double b, in dcross_dscale()
755 void SkMatrix::SetAffineIdentity(SkScalar affine[6]) { in SetAffineIdentity()
764 bool SkMatrix::asAffine(SkScalar affine[6]) const { in asAffine()
788 SkScalar invX = fMat[kMScaleX]; in invertNonIdentity()
789 SkScalar invY = fMat[kMScaleY]; in invertNonIdentity()
883 SkScalar tx = m.getTranslateX(); in Trans_pts()
884 SkScalar ty = m.getTranslateY(); in Trans_pts()
912 SkScalar tx = m.getTranslateX(); in Scale_pts()
913 SkScalar ty = m.getTranslateY(); in Scale_pts()
914 SkScalar sx = m.getScaleX(); in Scale_pts()
915 SkScalar sy = m.getScaleY(); in Scale_pts()
946 SkScalar sy = src->fY; in Persp_pts()
947 SkScalar sx = src->fX; in Persp_pts()
950 SkScalar x = sdot(sx, m.fMat[kMScaleX], sy, m.fMat[kMSkewX]) + m.fMat[kMTransX]; in Persp_pts()
951 SkScalar y = sdot(sx, m.fMat[kMSkewY], sy, m.fMat[kMScaleY]) + m.fMat[kMTransY]; in Persp_pts()
953 SkScalar z = sx * m.fMat[kMPersp0] + (sy * m.fMat[kMPersp1] + m.fMat[kMPersp2]); in Persp_pts()
955 SkScalar z = sdot(sx, m.fMat[kMPersp0], sy, m.fMat[kMPersp1]) + m.fMat[kMPersp2]; in Persp_pts()
972 SkScalar tx = m.getTranslateX(); in Affine_vpts()
973 SkScalar ty = m.getTranslateY(); in Affine_vpts()
974 SkScalar sx = m.getScaleX(); in Affine_vpts()
975 SkScalar sy = m.getScaleY(); in Affine_vpts()
976 SkScalar kx = m.getSkewX(); in Affine_vpts()
977 SkScalar ky = m.getSkewY(); in Affine_vpts()
1012 void SkMatrix::mapHomogeneousPoints(SkScalar dst[], const SkScalar src[], int count) const { in mapHomogeneousPoints()
1019 memcpy(dst, src, 3*count*sizeof(SkScalar)); in mapHomogeneousPoints()
1023 SkScalar sx = src[0]; in mapHomogeneousPoints()
1024 SkScalar sy = src[1]; in mapHomogeneousPoints()
1025 SkScalar sw = src[2]; in mapHomogeneousPoints()
1028 SkScalar x = sdot(sx, fMat[kMScaleX], sy, fMat[kMSkewX], sw, fMat[kMTransX]); in mapHomogeneousPoints()
1029 SkScalar y = sdot(sx, fMat[kMSkewY], sy, fMat[kMScaleY], sw, fMat[kMTransY]); in mapHomogeneousPoints()
1030 SkScalar w = sdot(sx, fMat[kMPersp0], sy, fMat[kMPersp1], sw, fMat[kMPersp2]); in mapHomogeneousPoints()
1081 SkScalar SkMatrix::mapRadius(SkScalar radius) const { in mapRadius()
1088 SkScalar d0 = vec[0].length(); in mapRadius()
1089 SkScalar d1 = vec[1].length(); in mapRadius()
1097 void SkMatrix::Persp_xy(const SkMatrix& m, SkScalar sx, SkScalar sy, in Persp_xy()
1101 SkScalar x = sdot(sx, m.fMat[kMScaleX], sy, m.fMat[kMSkewX]) + m.fMat[kMTransX]; in Persp_xy()
1102 SkScalar y = sdot(sx, m.fMat[kMSkewY], sy, m.fMat[kMScaleY]) + m.fMat[kMTransY]; in Persp_xy()
1103 SkScalar z = sdot(sx, m.fMat[kMPersp0], sy, m.fMat[kMPersp1]) + m.fMat[kMPersp2]; in Persp_xy()
1111 void SkMatrix::RotTrans_xy(const SkMatrix& m, SkScalar sx, SkScalar sy, in RotTrans_xy()
1124 void SkMatrix::Rot_xy(const SkMatrix& m, SkScalar sx, SkScalar sy, in Rot_xy()
1139 void SkMatrix::ScaleTrans_xy(const SkMatrix& m, SkScalar sx, SkScalar sy, in ScaleTrans_xy()
1148 void SkMatrix::Scale_xy(const SkMatrix& m, SkScalar sx, SkScalar sy, in Scale_xy()
1159 void SkMatrix::Trans_xy(const SkMatrix& m, SkScalar sx, SkScalar sy, in Trans_xy()
1167 void SkMatrix::Identity_xy(const SkMatrix& m, SkScalar sx, SkScalar sy, in Identity_xy()
1192 bool SkMatrix::fixedStepInX(SkScalar y, SkFixed* stepX, SkFixed* stepY) const { in fixedStepInX()
1204 SkScalar z = y * fMat[kMPersp1] + fMat[kMPersp2]; in fixedStepInX()
1222 SkPerspIter::SkPerspIter(const SkMatrix& m, SkScalar x0, SkScalar y0, int count) in SkPerspIter()
1457 const SkScalar m[9], in get_scale_factor()
1458 SkScalar results[/*1 or 2*/]) { in get_scale_factor()
1488 SkScalar a = sdot(m[SkMatrix::kMScaleX], m[SkMatrix::kMScaleX], in get_scale_factor()
1490 SkScalar b = sdot(m[SkMatrix::kMScaleX], m[SkMatrix::kMSkewX], in get_scale_factor()
1492 SkScalar c = sdot(m[SkMatrix::kMSkewX], m[SkMatrix::kMSkewX], in get_scale_factor()
1499 SkScalar bSqd = b * b; in get_scale_factor()
1514 SkScalar aminusc = a - c; in get_scale_factor()
1515 SkScalar apluscdiv2 = SkScalarHalf(a + c); in get_scale_factor()
1516 SkScalar x = SkScalarHalf(SkScalarSqrt(aminusc * aminusc + 4 * bSqd)); in get_scale_factor()
1535 SkScalar SkMatrix::getMinScale() const { in getMinScale()
1536 SkScalar factor; in getMinScale()
1544 SkScalar SkMatrix::getMaxScale() const { in getMaxScale()
1545 SkScalar factor; in getMaxScale()
1553 bool SkMatrix::getMinMaxScales(SkScalar scaleFactors[2]) const { in getMinMaxScales()
1560 SkScalar matrix[9];
1598 const SkScalar sx = SkVector::Length(this->getScaleX(), this->getSkewY()); in decomposeScale()
1599 const SkScalar sy = SkVector::Length(this->getSkewX(), this->getScaleY()); in decomposeScale()
1619 static const size_t sizeInMemory = 9 * sizeof(SkScalar); in writeToMemory()
1627 static const size_t sizeInMemory = 9 * sizeof(SkScalar); in readFromMemory()
1714 SkScalar A = matrix[SkMatrix::kMScaleX]; in SkDecomposeUpper2x2()
1715 SkScalar B = matrix[SkMatrix::kMSkewX]; in SkDecomposeUpper2x2()
1716 SkScalar C = matrix[SkMatrix::kMSkewY]; in SkDecomposeUpper2x2()
1717 SkScalar D = matrix[SkMatrix::kMScaleY]; in SkDecomposeUpper2x2()
1724 SkScalar cos1, sin1; in SkDecomposeUpper2x2()
1725 SkScalar cos2, sin2; in SkDecomposeUpper2x2()
1728 SkScalar cosQ, sinQ; in SkDecomposeUpper2x2()
1741 SkScalar reciplen = SkScalarInvert(SkScalarSqrt(cosQ*cosQ + sinQ*sinQ)); in SkDecomposeUpper2x2()
1776 SkScalar reciplen = SkScalarInvert(SkScalarSqrt(cos1*cos1 + sin1*sin1)); in SkDecomposeUpper2x2()