Flip all the points in this openshot::Keyframe (useful for reversing an effect or transition, etc...)
| 528 | |
| 529 | // Flip all the points in this openshot::Keyframe (useful for reversing an effect or transition, etc...) |
| 530 | void Keyframe::FlipPoints() { |
| 531 | for (std::vector<Point>::size_type point_index = 0, reverse_index = Points.size() - 1; point_index < reverse_index; point_index++, reverse_index--) { |
| 532 | // Flip the points |
| 533 | using std::swap; |
| 534 | swap(Points[point_index].co.Y, Points[reverse_index].co.Y); |
| 535 | // TODO: check that this has the desired effect even with |
| 536 | // regards to handles! |
| 537 | } |
| 538 | } |