OpenShot Library | libopenshot  0.2.3
Public Member Functions | Public Attributes | List of all members
openshot::Coordinate Class Reference

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...
 
string Json ()
 Get and Set JSON methods. More...
 
Json::Value JsonValue ()
 Generate Json::JsonValue for this object. More...
 
void SetJson (string value)
 Load JSON string into this object. More...
 
void SetJsonValue (Json::Value root)
 Load Json::JsonValue 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...
 

Detailed Description

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:

assert(c1.X == 2.0f);
assert(c1.Y == 4.0f);

Definition at line 54 of file Coordinate.h.

Constructor & Destructor Documentation

Coordinate::Coordinate ( )

The default constructor, which defaults to (0,0)

Definition at line 34 of file Coordinate.cpp.

Coordinate::Coordinate ( double  x,
double  y 
)

Constructor which also sets the X and Y.

Parameters
xThe X coordinate (usually representing the frame #)
yThe Y coordinate (usually representing the value of the property being animated)

Definition at line 39 of file Coordinate.cpp.

Member Function Documentation

string Coordinate::Json ( )

Get and Set JSON methods.

Generate JSON string of this object

Definition at line 45 of file Coordinate.cpp.

Json::Value Coordinate::JsonValue ( )

Generate Json::JsonValue for this object.

Definition at line 52 of file Coordinate.cpp.

void Coordinate::SetJson ( string  value)

Load JSON string into this object.

Definition at line 69 of file Coordinate.cpp.

void Coordinate::SetJsonValue ( Json::Value  root)

Load Json::JsonValue into this object.

Definition at line 92 of file Coordinate.cpp.

Member Data Documentation

double openshot::Coordinate::X

The X value of the coordinate (usually representing the frame #)

Definition at line 56 of file Coordinate.h.

double openshot::Coordinate::Y

The Y value of the coordinate (usually representing the value of the property being animated)

Definition at line 57 of file Coordinate.h.


The documentation for this class was generated from the following files: