@@ -663,64 +663,64 @@ TEST_F(RenderedTargetTest, GetBounds)
663663 target.beforeRedraw ();
664664
665665 Rect bounds = target.getBounds ();
666- ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 64.96 );
667- ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -121.16 );
668- ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 67.79 );
669- ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -123.99 );
666+ ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 66.13 );
667+ ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -124.52 );
668+ ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 66.72 );
669+ ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -125.11 );
670670
671671 QRectF bubbleBounds = target.getBoundsForBubble ();
672- ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , 64.96 );
673- ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , -121.16 );
674- ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , 67.79 );
675- ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , -123.99 );
672+ ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , 66.13 );
673+ ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , -124.52 );
674+ ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , 66.72 );
675+ ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , -125.11 );
676676
677677 EXPECT_CALL (engine, stageWidth ()).WillOnce (Return (480 ));
678678 EXPECT_CALL (engine, stageHeight ()).WillOnce (Return (360 ));
679679 target.updateRotationStyle (Sprite::RotationStyle::LeftRight);
680680
681681 bounds = target.getBounds ();
682- ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 69.5 );
683- ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -111.26 );
684- ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 71.5 );
685- ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -113.26 );
682+ ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 71.87 );
683+ ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -110.47 );
684+ ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 72.29 );
685+ ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -110.89 );
686686
687687 bubbleBounds = target.getBoundsForBubble ();
688- ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , 69.5 );
689- ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , -111.26 );
690- ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , 71.5 );
691- ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , -113.26 );
688+ ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , 71.87 );
689+ ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , -110.47 );
690+ ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , 72.29 );
691+ ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , -110.89 );
692692
693693 EXPECT_CALL (engine, stageWidth ()).WillOnce (Return (480 ));
694694 EXPECT_CALL (engine, stageHeight ()).WillOnce (Return (360 ));
695695 target.setStageScale (20.75 );
696696
697697 bounds = target.getBounds ();
698- ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 69.5 );
699- ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -111.26 );
700- ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 71.5 );
701- ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -113.26 );
698+ ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 71.87 );
699+ ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -110.47 );
700+ ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 72.29 );
701+ ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -110.89 );
702702
703703 bubbleBounds = target.getBoundsForBubble ();
704- ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , 69.5 );
705- ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , -111.26 );
706- ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , 71.5 );
707- ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , -113.26 );
704+ ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , 71.87 );
705+ ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , -110.47 );
706+ ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , 72.29 );
707+ ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , -110.89 );
708708
709709 EXPECT_CALL (engine, stageWidth ()).WillOnce (Return (480 ));
710710 EXPECT_CALL (engine, stageHeight ()).WillOnce (Return (360 ));
711711 target.updateSize (9780.6 );
712712
713713 bounds = target.getBounds ();
714- ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , -378.77 );
715- ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , 1323.22 );
716- ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , -376.77 );
717- ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , 1321.22 );
714+ ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , -466.05 );
715+ ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , 1294.13 );
716+ ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , -405.87 );
717+ ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , 1233.94 );
718718
719719 bubbleBounds = target.getBoundsForBubble ();
720- ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , -378.77 );
721- ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , 1323.22 );
722- ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , -376.77 );
723- ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , 1321.22 );
720+ ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , -466.05 );
721+ ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , 1294.13 );
722+ ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , -405.87 );
723+ ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , 1286.13 );
724724
725725 context.doneCurrent ();
726726}
@@ -759,40 +759,40 @@ TEST_F(RenderedTargetTest, GetFastBounds)
759759 target.beforeRedraw ();
760760
761761 Rect bounds = target.getFastBounds ();
762- ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 64.47 );
763- ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -120.57 );
764- ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 69.26 );
762+ ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 65.84 );
763+ ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -123.92 );
764+ ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 67.31 );
765765 ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -125.4 );
766766
767767 EXPECT_CALL (engine, stageWidth ()).WillOnce (Return (480 ));
768768 EXPECT_CALL (engine, stageHeight ()).WillOnce (Return (360 ));
769769 target.updateRotationStyle (Sprite::RotationStyle::LeftRight);
770770
771771 bounds = target.getFastBounds ();
772- ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 69.78 );
772+ ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 71.67 );
773773 ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -110.26 );
774774 ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 72.5 );
775- ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -114.34 );
775+ ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -111.51 );
776776
777777 EXPECT_CALL (engine, stageWidth ()).WillOnce (Return (480 ));
778778 EXPECT_CALL (engine, stageHeight ()).WillOnce (Return (360 ));
779779 target.setStageScale (20.75 );
780780
781781 bounds = target.getFastBounds ();
782- ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 69.78 );
782+ ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 71.67 );
783783 ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -110.26 );
784784 ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 72.5 );
785- ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -114.34 );
785+ ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -111.51 );
786786
787787 EXPECT_CALL (engine, stageWidth ()).WillOnce (Return (480 ));
788788 EXPECT_CALL (engine, stageHeight ()).WillOnce (Return (360 ));
789789 target.updateSize (9780.6 );
790790
791791 bounds = target.getFastBounds ();
792- ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , -767 );
792+ ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , -496.15 );
793793 ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , 1324.22 );
794794 ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , -375.77 );
795- ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , 737.38 );
795+ ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , 1143.65 );
796796
797797 context.doneCurrent ();
798798}
0 commit comments