31 #include "../include/Coordinate.h" 37 Coordinate::Coordinate() :
81 catch (
const std::exception& e)
84 throw InvalidJSON(
"JSON is invalid (missing keys or invalid data types)");
92 if (!root[
"X"].isNull())
93 X = root[
"X"].asDouble();
94 if (!root[
"Y"].isNull())
95 Y = root[
"Y"].asDouble();
const Json::Value stringToJson(const std::string value)
Json::Value JsonValue() const
Generate Json::Value for this object.
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.
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
Get and Set JSON methods.