diff --git a/src/TrackedObjectBBox.cpp b/src/TrackedObjectBBox.cpp index 8b6381108..0d79a2536 100644 --- a/src/TrackedObjectBBox.cpp +++ b/src/TrackedObjectBBox.cpp @@ -34,7 +34,7 @@ TrackedObjectBBox::TrackedObjectBBox(int Red, int Green, int Blue, int Alfa) : delta_x(0.0), delta_y(0.0), scale_x(1.0), scale_y(1.0), rotation(0.0), background_alpha(0.0), background_corner(12), - stroke_width(2) , stroke_alpha(0.70), + stroke_width(2) , stroke_alpha(0.7), stroke(Red, Green, Blue, Alfa), background(0, 0, 255, Alfa) { diff --git a/tests/KeyFrame.cpp b/tests/KeyFrame.cpp index a7559103f..49a4d2b20 100644 --- a/tests/KeyFrame.cpp +++ b/tests/KeyFrame.cpp @@ -583,10 +583,10 @@ TEST_CASE( "TrackedObjectBBox init", "[libopenshot][keyframe]" ) CHECK(kfb.rotation.GetInt(1) == 0); CHECK(kfb.stroke_width.GetInt(1) == 2); - CHECK(kfb.stroke_alpha.GetInt(1) == 0); + CHECK(kfb.stroke_alpha.GetValue(1) == Approx(0.7f).margin(0.0001)); - CHECK(kfb.background_alpha .GetInt(1)== 1); - CHECK(kfb.background_corner.GetInt(1) == 0); + CHECK(kfb.background_alpha .GetInt(1) == 0); + CHECK(kfb.background_corner.GetInt(1) == 12); CHECK(kfb.stroke.red.GetInt(1) == 62); CHECK(kfb.stroke.green.GetInt(1) == 143); @@ -596,8 +596,7 @@ TEST_CASE( "TrackedObjectBBox init", "[libopenshot][keyframe]" ) CHECK(kfb.background.red.GetInt(1) == 0); CHECK(kfb.background.green.GetInt(1) == 0); CHECK(kfb.background.blue.GetInt(1) == 255); - CHECK(kfb.background.alpha.GetInt(1) == 0); - + CHECK(kfb.background.alpha.GetInt(1) == 212); } TEST_CASE( "TrackedObjectBBox AddBox and RemoveBox", "[libopenshot][keyframe]" )