44 :
X(co.first),
Y(co.second) {};
80 catch (
const std::exception& e)
83 throw InvalidJSON(
"JSON is invalid (missing keys or invalid data types)");
91 if (!root[
"X"].isNull())
92 X = root[
"X"].asDouble();
93 if (!root[
"Y"].isNull())
94 Y = root[
"Y"].asDouble();
This class represents a Cartesian coordinate (X, Y) used in the Keyframe animation system...
const Json::Value stringToJson(const std::string value)
Json::Value JsonValue() const
Generate Json::Value for this object.
Header file for all Exception classes.
double Y
The Y value of the coordinate (usually representing the value of the property being animated) ...
double X
The X value of the coordinate (usually representing the frame #)
This namespace is the default namespace for all code in the openshot library.
void SetJsonValue(const Json::Value root)
Load Json::Value into this object.
Header file for Coordinate class.
Coordinate()
The default constructor, which defaults to (0,0)
Exception for invalid JSON.
void SetJson(const std::string value)
Load JSON string into this object.
std::string Json() const
Generate JSON string of this object.