MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / FlipPoints

Method FlipPoints

src/KeyFrame.cpp:530–538  ·  view source on GitHub ↗

Flip all the points in this openshot::Keyframe (useful for reversing an effect or transition, etc...)

Source from the content-addressed store, hash-verified

528
529// Flip all the points in this openshot::Keyframe (useful for reversing an effect or transition, etc...)
530void 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}

Callers 1

KeyFrame.cppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected