28 #include "../include/Coordinate.h"
31 using namespace openshot;
34 Coordinate::Coordinate() :
74 bool success = reader.parse( value, root );
77 throw InvalidJSON(
"JSON could not be parsed (or is invalid)",
"");
87 throw InvalidJSON(
"JSON is invalid (missing keys or invalid data types)",
"");
95 if (!root[
"X"].isNull())
96 X = root[
"X"].asDouble();
97 if (!root[
"Y"].isNull())
98 Y = root[
"Y"].asDouble();
string Json()
Get and Set JSON methods.
void SetJsonValue(Json::Value root)
Load Json::JsonValue into 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 #)
Coordinate()
The default constructor, which defaults to (0,0)
Exception for invalid JSON.
void SetJson(string value)
Load JSON string into this object.
Json::Value JsonValue()
Generate Json::JsonValue for this object.