|
OpenShot Library | libopenshot
0.2.5
|
This class represents a Cartesian coordinate (X, Y) used in the Keyframe animation system. More...
#include <Coordinate.h>
Public Member Functions | |
| Coordinate () | |
| The default constructor, which defaults to (0,0) More... | |
| Coordinate (double x, double y) | |
| Constructor which also sets the X and Y. More... | |
| std::string | Json () const |
| Get and Set JSON methods. More... | |
| Json::Value | JsonValue () const |
| Generate Json::Value for this object. More... | |
| void | SetJson (const std::string value) |
| Load JSON string into this object. More... | |
| void | SetJsonValue (const Json::Value root) |
| Load Json::Value into this object. More... | |
Public Attributes | |
| double | X |
| The X value of the coordinate (usually representing the frame #) More... | |
| double | Y |
| The Y value of the coordinate (usually representing the value of the property being animated) More... | |
This class represents a Cartesian coordinate (X, Y) used in the Keyframe animation system.
Animation involves the changing (i.e. interpolation) of numbers over time. A series of Coordinate objects allows us to plot a specific curve or line used during interpolation. In other words, it helps us control how a number changes over time (quickly or slowly).
Please see the following Example Code:
Definition at line 55 of file Coordinate.h.
| Coordinate::Coordinate | ( | ) |
The default constructor, which defaults to (0,0)
Definition at line 37 of file Coordinate.cpp.
| Coordinate::Coordinate | ( | double | x, |
| double | y | ||
| ) |
Constructor which also sets the X and Y.
| x | The X coordinate (usually representing the frame #) |
| y | The Y coordinate (usually representing the value of the property being animated) |
Definition at line 42 of file Coordinate.cpp.
| std::string Coordinate::Json | ( | ) | const |
Get and Set JSON methods.
Generate JSON string of this object
Definition at line 48 of file Coordinate.cpp.
| Json::Value Coordinate::JsonValue | ( | ) | const |
Generate Json::Value for this object.
Definition at line 55 of file Coordinate.cpp.
Referenced by Json(), and openshot::Point::JsonValue().
| void Coordinate::SetJson | ( | const std::string | value | ) |
Load JSON string into this object.
Definition at line 72 of file Coordinate.cpp.
| void Coordinate::SetJsonValue | ( | const Json::Value | root | ) |
Load Json::Value into this object.
Definition at line 89 of file Coordinate.cpp.
Referenced by SetJson(), and openshot::Point::SetJsonValue().
| double openshot::Coordinate::X |
The X value of the coordinate (usually representing the frame #)
Definition at line 57 of file Coordinate.h.
Referenced by openshot::ClipBase::add_property_json(), openshot::Keyframe::AddPoint(), openshot::Keyframe::Contains(), openshot::Keyframe::FindIndex(), openshot::Keyframe::GetClosestPoint(), JsonValue(), openshot::Keyframe::PrintPoints(), openshot::Keyframe::RemovePoint(), and SetJsonValue().
| double openshot::Coordinate::Y |
The Y value of the coordinate (usually representing the value of the property being animated)
Definition at line 58 of file Coordinate.h.
Referenced by openshot::Keyframe::FindIndex(), openshot::Keyframe::GetMaxPoint(), openshot::Keyframe::GetRepeatFraction(), JsonValue(), openshot::Keyframe::PrintPoints(), openshot::Keyframe::RemovePoint(), and SetJsonValue().
1.8.18