You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Fixed bug in RemovePoint, and improved the AddPoint KeyFrame method to remove a previous, duplicate point (based on co.X value).
This commit is contained in:
@@ -321,3 +321,16 @@ TEST(Keyframe_Flip_Keyframe)
|
||||
CHECK_CLOSE(2.0f, kf.GetValue(50), 0.01);
|
||||
CHECK_CLOSE(10.0f, kf.GetValue(100), 0.01);
|
||||
}
|
||||
|
||||
TEST(Keyframe_Remove_Duplicate_Point)
|
||||
{
|
||||
// Create a keyframe curve with 2 points
|
||||
Keyframe kf;
|
||||
kf.AddPoint(1, 0.0);
|
||||
kf.AddPoint(1, 1.0);
|
||||
kf.AddPoint(1, 2.0);
|
||||
|
||||
// Spot check values from the curve
|
||||
CHECK_EQUAL(kf.GetLength(), 1);
|
||||
CHECK_CLOSE(kf.GetPoint(0).co.Y, 2.0, 0.01);
|
||||
}
|
||||
Reference in New Issue
Block a user