Home | History | Annotate | Download | only in tests

Lines Matching refs:orig

497 static void assert_transform_failure(skiatest::Reporter* reporter, const SkRRect& orig,
500 SkASSERT(!orig.isEmpty());
505 const SkRRect copyOfOrig = orig;
506 bool success = orig.transform(matrix, &dst);
512 REPORTER_ASSERT(reporter, copyOfOrig == orig);
513 REPORTER_ASSERT(reporter, orig != dst);
517 const SkVector& origUL = orig.radii(SkRRect::kUpperLeft_Corner); \
518 const SkVector& origUR = orig.radii(SkRRect::kUpperRight_Corner); \
519 const SkVector& origLR = orig.radii(SkRRect::kLowerRight_Corner); \
520 const SkVector& origLL = orig.radii(SkRRect::kLowerLeft_Corner); \
527 static void test_transform_helper(skiatest::Reporter* reporter, const SkRRect& orig) {
532 bool success = orig.transform(SkMatrix::I(), &dst);
534 REPORTER_ASSERT(reporter, orig == dst);
540 assert_transform_failure(reporter, orig, matrix);
544 assert_transform_failure(reporter, orig, matrix);
548 assert_transform_failure(reporter, orig, matrix);
552 assert_transform_failure(reporter, orig, matrix);
557 assert_transform_failure(reporter, orig, matrix);
559 assert_transform_failure(reporter, orig, matrix);
568 success = orig.transform(matrix, &dst);
572 orig.radii((SkRRect::Corner) i) == dst.radii((SkRRect::Corner) i));
574 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().width());
575 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().height());
576 REPORTER_ASSERT(reporter, dst.rect().left() == orig.rect().left() + translateX);
577 REPORTER_ASSERT(reporter, dst.rect().top() == orig.rect().top() + translateY);
581 assert_transform_failure(reporter, orig, matrix);
587 success = orig.transform(matrix, &dst);
598 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().width());
599 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().height());
601 REPORTER_ASSERT(reporter, orig.rect().right() == -dst.rect().left());
603 REPORTER_ASSERT(reporter, orig.rect().top() == dst.rect().top());
607 assert_transform_failure(reporter, orig, matrix);
613 success = orig.transform(matrix, &dst);
624 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().width());
625 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().height());
627 REPORTER_ASSERT(reporter, orig.rect().top() == -dst.rect().bottom());
629 REPORTER_ASSERT(reporter, orig.rect().left() == dst.rect().left());
636 success = orig.transform(matrix, &dst);
646 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().width());
647 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().height());
648 REPORTER_ASSERT(reporter, orig.rect().top() == -dst.rect().bottom());
649 REPORTER_ASSERT(reporter, orig.rect().right() == -dst.rect().left());
658 success = orig.transform(matrix, &dst);
663 SkScalarMul(orig.radii((SkRRect::Corner) i).fX, xScale)));
665 SkScalarMul(orig.radii((SkRRect::Corner) i).fY, yScale)));
668 SkScalarMul(orig.rect().width(), xScale)));
670 SkScalarMul(orig.rect().height(), yScale)));
672 SkScalarMul(orig.rect().left(), xScale)));
674 SkScalarMul(orig.rect().top(), yScale)));