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...
float | Delta ()
| Get the delta / difference between previous coordinate value (used internally on the timeline, to track changes to coordinates) More...
void | Delta (double new_delta)
| Set the delta / difference between previous coordinate value (used internally on the timeline, to track changes to coordinates) More...
bool | IsIncreasing ()
| Get the increasing flag (used internally on the timeline, to track changes to coordinates) More...
void | IsIncreasing (bool is_increasing)
| Set the increasing flag (used internally on the timeline, to track changes to coordinates) More...
string | Json ()
| Get and Set JSON methods. More...
Json::Value | JsonValue ()
| Generate Json::JsonValue for this object. More...
Fraction | Repeat ()
| Get the repeating Fraction (used internally on the timeline, to track changes to coordinates) More...
void | Repeat (Fraction is_repeated)
| Set the repeating Fraction (used internally on the timeline, to track changes to coordinates) 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:

Coordinate c1(2,4);
assert(c1.X == 2.0f);
assert(c1.Y == 4.0f);

Definition at line 54 of file Coordinate.h.

## Constructor & Destructor Documentation

## Coordinate() [1/2]

Coordinate::Coordinate | ( |  | ) |

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

Definition at line 34 of file Coordinate.cpp.

## Coordinate() [2/2]

Coordinate::Coordinate | ( | double | x,
|  | double | y
| ) |  |

Constructor which also sets the X and Y.

Parameters

  x | The X coordinate (usually representing the frame #)
  y | The Y coordinate (usually representing the value of the property being animated)

Definition at line 39 of file Coordinate.cpp.

## Member Function Documentation

## Delta() [1/2]

float openshot::Coordinate::Delta | ( |  | ) |

inline

Get the delta / difference between previous coordinate value (used internally on the timeline, to track changes to coordinates)

Definition at line 91 of file Coordinate.h.

## Delta() [2/2]

void openshot::Coordinate::Delta | ( | double | new_delta | ) |

inline

Set the delta / difference between previous coordinate value (used internally on the timeline, to track changes to coordinates)

Parameters

  new_delta | Indicates how much this Y value differs from the previous Y value

Definition at line 88 of file Coordinate.h.

## IsIncreasing() [1/2]

bool openshot::Coordinate::IsIncreasing | ( |  | ) |

inline

Get the increasing flag (used internally on the timeline, to track changes to coordinates)

Definition at line 84 of file Coordinate.h.

## IsIncreasing() [2/2]

void openshot::Coordinate::IsIncreasing | ( | bool | is_increasing | ) |

inline

Set the increasing flag (used internally on the timeline, to track changes to coordinates)

Parameters

  is_increasing | Indicates if this coordinate Y value is increasing (when compared to the previous coordinate)

Definition at line 81 of file Coordinate.h.

## Json()

string Coordinate::Json | ( |  | ) |

Get and Set JSON methods.

Generate JSON string of this object

Definition at line 45 of file Coordinate.cpp.

## JsonValue()

Json::Value Coordinate::JsonValue | ( |  | ) |

Generate Json::JsonValue for this object.

Definition at line 52 of file Coordinate.cpp.

## Repeat() [1/2]

Fraction openshot::Coordinate::Repeat | ( |  | ) |

inline

Get the repeating Fraction (used internally on the timeline, to track changes to coordinates)

Definition at line 77 of file Coordinate.h.

## Repeat() [2/2]

void openshot::Coordinate::Repeat | ( | Fraction | is_repeated | ) |

inline

Set the repeating Fraction (used internally on the timeline, to track changes to coordinates)

Parameters

  is_repeated | The fraction representing how many times this coordinate Y value repeats (only used on the timeline)

Definition at line 74 of file Coordinate.h.

## SetJson()

void Coordinate::SetJson | ( | string | value | ) |

Load JSON string into this object.

Definition at line 69 of file Coordinate.cpp.

## SetJsonValue()

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

Load Json::JsonValue into this object.

Definition at line 92 of file Coordinate.cpp.

## Member Data Documentation

## X

double openshot::Coordinate::X

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

Definition at line 61 of file Coordinate.h.

## Y

double openshot::Coordinate::Y

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

Definition at line 62 of file Coordinate.h.

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

- Coordinate.h
- Coordinate.cpp

OpenShot Wipe Tests.c1
c1
Definition: OpenShot Wipe Tests.py:8
openshot::Coordinate::Coordinate
Coordinate()
The default constructor, which defaults to (0,0)
Definition: Coordinate.cpp:34