OpenShot Library | libopenshot
0.2.5
|
Go to the documentation of this file.
31 #ifndef OPENSHOT_KEYFRAME_H
32 #define OPENSHOT_KEYFRAME_H
66 std::vector<Point> Points;
95 double GetValue(int64_t index)
const;
98 int GetInt(int64_t index)
const;
101 int64_t
GetLong(int64_t index)
const;
107 double GetDelta(int64_t index)
const;
135 std::string
Json()
const;
137 void SetJson(
const std::string value);
bool IsIncreasing(int index) const
Get the direction of the curve at a specific index (increasing or decreasing)
Header file for Point class.
int64_t GetLong(int64_t index) const
Get the rounded LONG value at a specific index.
Header file for Fraction class.
Keyframe()=default
Default constructor for the Keyframe class.
int64_t FindIndex(Point p) const
Get the index of a point by matching a coordinate.
void RemovePoint(Point p)
Remove a point by matching a coordinate.
This namespace is the default namespace for all code in the openshot library.
std::string Json() const
Get and Set JSON methods.
double GetDelta(int64_t index) const
Get the change in Y value (from the previous Y value)
This class represents a fraction.
Point GetMaxPoint() const
Get max point (by Y coordinate)
void SetJsonValue(const Json::Value root)
Load Json::Value into this object.
bool Contains(Point p) const
Does this keyframe contain a specific point.
Fraction GetRepeatFraction(int64_t index) const
Get the fraction that represents how many times this value is repeated in the curve.
Json::Value JsonValue() const
Generate Json::Value for this object.
void AddPoint(Point p)
Add a new point on the key-frame. Each point has a primary coordinate, a left handle,...
Header file for Coordinate class.
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
void SetJson(const std::string value)
Load JSON string into this object.
void PrintPoints() const
Print a list of points.
void UpdatePoint(int64_t index, Point p)
Replace an existing point with a new point.
Point const & GetPoint(int64_t index) const
Get a point at a specific index.
void PrintValues() const
Print just the Y value of the point's primary coordinate.
Point GetClosestPoint(Point p) const
Get current point (or closest point to the right) from the X coordinate (i.e. the frame number)
int64_t GetLength() const
int GetInt(int64_t index) const
Get the rounded INT value at a specific index.
int64_t GetCount() const
Get the number of points (i.e. # of points)
void ScalePoints(double scale)
Point GetPreviousPoint(Point p) const
Get previous point (.
InterpolationType
This controls how a Keyframe uses this point to interpolate between two points.
void FlipPoints()
Flip all the points in this openshot::Keyframe (useful for reversing an effect or transition,...
Header file for JSON class.
A Point is the basic building block of a key-frame curve.
Header file for all Exception classes.
double GetValue(int64_t index) const
Get the value at a specific index.