Lines Matching defs:scale
189 SkMatrix scale;
190 scale.setScale(2, 4);
191 REPORTER_ASSERT(reporter, 2 == scale.getMinScale());
192 REPORTER_ASSERT(reporter, 4 == scale.getMaxScale());
193 success = scale.getMinMaxScales(scales);
251 SkMatrix baseMats[] = {scale, rot90Scale, rotate,
326 // scale with same size
331 // scale with one negative
336 // scale with different size
341 // scale with same size at a pivot point
346 // scale with different size at a pivot point
401 // rotate + uniform scale
406 // rotate + non-uniform scale
411 // non-uniform scale + rotate
465 const SkPoint& scale,
469 SkScalar scaleX = scale.fX;
470 SkScalar scaleY = scale.fY;
474 // We do a relative check here because large scale factors cause problems with an absolute check
488 SkPoint rotation1, scale, rotation2;
497 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
498 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
504 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
505 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
507 // uniform scale only
509 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
510 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
512 // anisotropic scale only
514 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
515 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
517 // rotation then uniform scale
519 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
520 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
522 // uniform scale then rotation
524 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
525 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
527 // rotation then uniform scale+reflection
529 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
530 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
532 // uniform scale+reflection, then rotate
534 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
535 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
537 // rotation then anisotropic scale
539 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
540 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
542 // rotation then anisotropic scale
544 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
545 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
547 // anisotropic scale then rotation
549 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
550 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
552 // anisotropic scale then rotation
554 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
555 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
557 // rotation, uniform scale, then different rotation
559 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
560 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
562 // rotation, anisotropic scale, then different rotation
564 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
565 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
567 // rotation, anisotropic scale + reflection, then different rotation
569 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
570 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
581 if (SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)) {
582 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
593 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
594 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
600 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
601 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
607 REPORTER_ASSERT(reporter, !SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
610 REPORTER_ASSERT(reporter, !SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
617 REPORTER_ASSERT(reporter, !SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
714 // uniform scale of point
742 // rotation, scale, rotation of point
772 SkSize scale;
775 if (!original.decomposeScale(&scale, &remaining)) {
778 if (scale.width() <= 0 || scale.height() <= 0) {
786 reconstituted.preScale(scale.width(), scale.height());
806 SkMatrix scaleMat = SkMatrix::Scale(scale.width(), scale.height());
808 // Note, we intend the decomposition to be applied in the order scale and then remainder but,
989 const SkScalar scale = 1000;
996 SkRect src = SkRect::MakeLTRB(rand.nextSScalar1() * scale,
997 rand.nextSScalar1() * scale,
998 rand.nextSScalar1() * scale,
999 rand.nextSScalar1() * scale);