Lines Matching refs:orig

517 static void assert_transform_failure(skiatest::Reporter* reporter, const SkRRect& orig,
520 SkASSERT(!orig.isEmpty());
525 const SkRRect copyOfOrig = orig;
526 bool success = orig.transform(matrix, &dst);
532 REPORTER_ASSERT(reporter, copyOfOrig == orig);
533 REPORTER_ASSERT(reporter, orig != dst);
537 const SkVector& origUL = orig.radii(SkRRect::kUpperLeft_Corner); \
538 const SkVector& origUR = orig.radii(SkRRect::kUpperRight_Corner); \
539 const SkVector& origLR = orig.radii(SkRRect::kLowerRight_Corner); \
540 const SkVector& origLL = orig.radii(SkRRect::kLowerLeft_Corner); \
547 static void test_transform_helper(skiatest::Reporter* reporter, const SkRRect& orig) {
552 bool success = orig.transform(SkMatrix::I(), &dst);
554 REPORTER_ASSERT(reporter, orig == dst);
560 assert_transform_failure(reporter, orig, matrix);
564 assert_transform_failure(reporter, orig, matrix);
568 assert_transform_failure(reporter, orig, matrix);
572 assert_transform_failure(reporter, orig, matrix);
577 assert_transform_failure(reporter, orig, matrix);
586 success = orig.transform(matrix, &dst);
590 orig.radii((SkRRect::Corner) i) == dst.radii((SkRRect::Corner) i));
592 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().width());
593 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().height());
594 REPORTER_ASSERT(reporter, dst.rect().left() == orig.rect().left() + translateX);
595 REPORTER_ASSERT(reporter, dst.rect().top() == orig.rect().top() + translateY);
599 assert_transform_failure(reporter, orig, matrix);
605 success = orig.transform(matrix, &dst);
616 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().width());
617 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().height());
619 REPORTER_ASSERT(reporter, orig.rect().right() == -dst.rect().left());
621 REPORTER_ASSERT(reporter, orig.rect().top() == dst.rect().top());
625 assert_transform_failure(reporter, orig, matrix);
631 success = orig.transform(matrix, &dst);
642 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().width());
643 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().height());
645 REPORTER_ASSERT(reporter, orig.rect().top() == -dst.rect().bottom());
647 REPORTER_ASSERT(reporter, orig.rect().left() == dst.rect().left());
654 success = orig.transform(matrix, &dst);
664 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().width());
665 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().height());
666 REPORTER_ASSERT(reporter, orig.rect().top() == -dst.rect().bottom());
667 REPORTER_ASSERT(reporter, orig.rect().right() == -dst.rect().left());
676 success = orig.transform(matrix, &dst);
681 orig.radii((SkRRect::Corner) i).fX * xScale));
683 orig.radii((SkRRect::Corner) i).fY * yScale));
686 orig.rect().width() * xScale));
688 orig.rect().height() * yScale));
690 orig.rect().left() * xScale));
692 orig.rect().top() * yScale));
702 success = orig.transform(matrix, &dst);
717 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().height());
718 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().width());
728 success = orig.transform(matrix, &dst);
742 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().height());
743 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().width());
756 success = orig.transform(matrix, &dst2);
768 success = orig.transform(matrix, &dst2);
780 success = orig.transform(matrix, &dst2);
792 success = orig.transform(matrix, &dst);
806 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().height());
807 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().width());
818 success = orig.transform(matrix, &dst2);
830 success = orig.transform(matrix, &dst2);
842 success = orig.transform(matrix, &dst2);
857 success = orig.transform(matrix, &dst);
872 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().height());
873 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().width());
883 success = orig.transform(matrix, &dst2);
897 success = orig.transform(matrix, &dst);
903 success = orig.transform(matrix, &dst2);