You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Merge pull request #627 from ferdnyc/rename-keyframe-vectors
KeyFrame.h: Avoid shadowing SWIG templates
This commit is contained in:
@@ -141,6 +141,16 @@
|
||||
%template() std::pair<double, double>;
|
||||
%template() std::pair<float, float>;
|
||||
|
||||
/* Wrap std templates (list, vector, etc...) */
|
||||
%template(ClipList) std::list<openshot::Clip *>;
|
||||
%template(EffectBaseList) std::list<openshot::EffectBase *>;
|
||||
%template(CoordinateVector) std::vector<openshot::Coordinate>;
|
||||
%template(PointsVector) std::vector<openshot::Point>;
|
||||
%template(FieldVector) std::vector<openshot::Field>;
|
||||
%template(MappedFrameVector) std::vector<openshot::MappedFrame>;
|
||||
%template(MetadataMap) std::map<std::string, std::string>;
|
||||
%template(AudioDeviceInfoVector) std::vector<openshot::AudioDeviceInfo>;
|
||||
|
||||
/* Make openshot.Fraction more Pythonic */
|
||||
%extend openshot::Fraction {
|
||||
%{
|
||||
@@ -311,12 +321,3 @@
|
||||
#endif
|
||||
|
||||
|
||||
/* Wrap std templates (list, vector, etc...) */
|
||||
%template(ClipList) std::list<openshot::Clip *>;
|
||||
%template(EffectBaseList) std::list<openshot::EffectBase *>;
|
||||
%template(CoordinateVector) std::vector<openshot::Coordinate>;
|
||||
%template(PointsVector) std::vector<openshot::Point>;
|
||||
%template(FieldVector) std::vector<openshot::Field>;
|
||||
%template(MappedFrameVector) std::vector<openshot::MappedFrame>;
|
||||
%template(MetadataMap) std::map<std::string, std::string>;
|
||||
%template(AudioDeviceInfoVector) std::vector<openshot::AudioDeviceInfo>;
|
||||
|
||||
@@ -126,10 +126,10 @@ Keyframe::Keyframe(double value) {
|
||||
}
|
||||
|
||||
// Constructor which takes a vector of Points
|
||||
Keyframe::Keyframe(const std::vector<Point>& points) : Points(points) {};
|
||||
Keyframe::Keyframe(const std::vector<openshot::Point>& points) : Points(points) {};
|
||||
|
||||
// Constructor which takes a vector of std::pair tuples (and adds them all)
|
||||
Keyframe::Keyframe(const std::vector<Coordinate>& coordinates) {
|
||||
Keyframe::Keyframe(const std::vector<openshot::Coordinate>& coordinates) {
|
||||
for (const auto& co : coordinates) {
|
||||
AddPoint(Point(co));
|
||||
}
|
||||
|
||||
@@ -62,8 +62,8 @@ namespace openshot {
|
||||
std::vector<Point> Points; ///< Vector of all Points
|
||||
|
||||
public:
|
||||
using CoordinateVector = std::vector<Coordinate>;
|
||||
using PointsVector = std::vector<Point>;
|
||||
using CoordinateVec = std::vector<Coordinate>;
|
||||
using PointsVec = std::vector<Point>;
|
||||
|
||||
/// Default constructor for the Keyframe class
|
||||
Keyframe() = default;
|
||||
@@ -72,10 +72,10 @@ namespace openshot {
|
||||
Keyframe(double value);
|
||||
|
||||
/// Constructor which adds a supplied vector of Points
|
||||
Keyframe(const PointsVector& points);
|
||||
Keyframe(const PointsVec& points);
|
||||
|
||||
/// Constructor which takes a vector of std::pair tuples
|
||||
Keyframe(const CoordinateVector& coordinates);
|
||||
Keyframe(const CoordinateVec& coordinates);
|
||||
|
||||
/// Add a new point on the key-frame. Each point has a primary coordinate, a left handle, and a right handle.
|
||||
void AddPoint(Point p);
|
||||
|
||||
Reference in New Issue
Block a user