diff --git a/src/KeyFrame.cpp b/src/KeyFrame.cpp index b113e632..9ac7a98e 100644 --- a/src/KeyFrame.cpp +++ b/src/KeyFrame.cpp @@ -29,6 +29,11 @@ */ #include "KeyFrame.h" +#include "Exceptions.h" + +#include // For assert() +#include // For std::cout +#include // For std::setprecision #include #include #include @@ -146,17 +151,7 @@ void Keyframe::AddPoint(Point p) { } } -// Add a new point on the key-frame, with some defaults set (BEZIER) -void Keyframe::AddPoint(double x, double y) -{ - // Create a point - Point new_point(x, y, BEZIER); - - // Add the point - AddPoint(new_point); -} - -// Add a new point on the key-frame, with a specific interpolation type +// Add a new point on the key-frame, interpolate is optional (default: BEZIER) void Keyframe::AddPoint(double x, double y, InterpolationType interpolate) { // Create a point diff --git a/src/KeyFrame.h b/src/KeyFrame.h index 6424473a..560bf259 100644 --- a/src/KeyFrame.h +++ b/src/KeyFrame.h @@ -31,14 +31,9 @@ #ifndef OPENSHOT_KEYFRAME_H #define OPENSHOT_KEYFRAME_H -#include -#include #include -#include #include -#include "Exceptions.h" #include "Fraction.h" -#include "Coordinate.h" #include "Point.h" #include "Json.h" @@ -76,11 +71,8 @@ namespace openshot { /// Add a new point on the key-frame. Each point has a primary coordinate, a left handle, and a right handle. void AddPoint(Point p); - /// Add a new point on the key-frame, with some defaults set (BEZIER) - void AddPoint(double x, double y); - - /// Add a new point on the key-frame, with a specific interpolation type - void AddPoint(double x, double y, InterpolationType interpolate); + /// Add a new point on the key-frame, with optional interpolation type + void AddPoint(double x, double y, InterpolationType interpolate=BEZIER); /// Does this keyframe contain a specific point bool Contains(Point p) const;