28 #ifndef OPENSHOT_KEYFRAME_H
29 #define OPENSHOT_KEYFRAME_H
43 using namespace openshot;
67 double FactorialLookup[4];
77 void ProcessSegment(
int Segment,
Point p1,
Point p2);
80 void CreateFactorialTable();
83 double Factorial(
long int n);
86 double Ni(
long int n,
long int i);
89 double Bernstein(
long int n,
long int i,
double t);
103 void AddPoint(
Point p);
106 void AddPoint(
float x,
float y);
112 bool Contains(
Point p);
115 void SetHandles(
Point current);
124 float GetValue(
long int index);
127 int GetInt(
long int index);
130 long int GetLong(
long int index);
133 Fraction GetRepeatFraction(
long int index);
136 float GetDelta(
long int index);
145 long int GetLength();
151 bool IsIncreasing(
int index);
155 Json::Value JsonValue();
157 void SetJsonValue(Json::Value root);
175 void ScalePoints(
float scale);
178 void UpdatePoint(
long int index,
Point p);
vector< Coordinate > Values
Vector of all Values (i.e. the processed coordinates from the curve)
Header file for Fraction class.
Header file for Point class.
A Point is the basic building block of a key-frame curve.
Header file for all Exception classes.
Header file for JSON class.
This class represents a fraction.
float Auto_Handle_Percentage
Percentage the left and right handles should be adjusted to, to create a smooth curve.
vector< Point > Points
Vector of all Points.
InterpolationType
This controls how a Keyframe uses this point to interpolate between two points.
Header file for Coordinate class.
Exception for invalid JSON.
Exception for an out of bounds key-frame point.
A Keyframe is a collection of Point instances, which is used to vary a number or property over time...