@@ -807,28 +807,37 @@ TEST_P(EntityTest, BlendingModeOptions) {
807
807
}
808
808
809
809
TEST_P (EntityTest, BezierCircleScaled) {
810
- Entity entity;
811
- entity.SetTransformation (Matrix::MakeScale (GetContentScale ()));
812
- auto path = PathBuilder{}
813
- .MoveTo ({97.325 , 34.818 })
814
- .CubicCurveTo ({98.50862885295136 , 34.81812293973836 },
815
- {99.46822048142015 , 33.85863261475589 },
816
- {99.46822048142015 , 32.67499810206613 })
817
- .CubicCurveTo ({99.46822048142015 , 31.491363589376355 },
818
- {98.50862885295136 , 30.53187326439389 },
819
- {97.32499434685802 , 30.531998226542708 })
820
- .CubicCurveTo ({96.14153655073771 , 30.532123170035373 },
821
- {95.18222070648729 , 31.491540299350355 },
822
- {95.18222070648729 , 32.67499810206613 })
823
- .CubicCurveTo ({95.18222070648729 , 33.85845590478189 },
824
- {96.14153655073771 , 34.81787303409686 },
825
- {97.32499434685802 , 34.81799797758954 })
826
- .Close ()
827
- .TakePath ();
828
- entity.SetTransformation (
829
- Matrix::MakeScale ({20.0 , 20.0 , 1.0 }).Translate ({-80 , -15 , 0 }));
830
- entity.SetContents (SolidColorContents::Make (path, Color::Red ()));
831
- ASSERT_TRUE (OpenPlaygroundHere (entity));
810
+ auto callback = [&](ContentContext& context, RenderPass& pass) -> bool {
811
+ static float scale = 20 ;
812
+
813
+ ImGui::Begin (" Controls" , nullptr , ImGuiWindowFlags_AlwaysAutoResize);
814
+ ImGui::SliderFloat (" Scale" , &scale, 1 , 100 );
815
+ ImGui::End ();
816
+
817
+ Entity entity;
818
+ entity.SetTransformation (Matrix::MakeScale (GetContentScale ()));
819
+ auto path = PathBuilder{}
820
+ .MoveTo ({97.325 , 34.818 })
821
+ .CubicCurveTo ({98.50862885295136 , 34.81812293973836 },
822
+ {99.46822048142015 , 33.85863261475589 },
823
+ {99.46822048142015 , 32.67499810206613 })
824
+ .CubicCurveTo ({99.46822048142015 , 31.491363589376355 },
825
+ {98.50862885295136 , 30.53187326439389 },
826
+ {97.32499434685802 , 30.531998226542708 })
827
+ .CubicCurveTo ({96.14153655073771 , 30.532123170035373 },
828
+ {95.18222070648729 , 31.491540299350355 },
829
+ {95.18222070648729 , 32.67499810206613 })
830
+ .CubicCurveTo ({95.18222070648729 , 33.85845590478189 },
831
+ {96.14153655073771 , 34.81787303409686 },
832
+ {97.32499434685802 , 34.81799797758954 })
833
+ .Close ()
834
+ .TakePath ();
835
+ entity.SetTransformation (
836
+ Matrix::MakeScale ({scale, scale, 1.0 }).Translate ({-90 , -20 , 0 }));
837
+ entity.SetContents (SolidColorContents::Make (path, Color::Red ()));
838
+ return entity.Render (context, pass);
839
+ };
840
+ ASSERT_TRUE (OpenPlaygroundHere (callback));
832
841
}
833
842
834
843
TEST_P (EntityTest, Filters) {
0 commit comments