tweener::tweener(const std::wstring& name)
: func_(get_tweener(name))
+ , name_(name)
{
}
-tweener::tweener(const wchar_t* name)
- : func_(get_tweener(name))
+double tweener::operator()(double t, double b , double c, double d) const
{
+ return func_(t, b, c, d);
}
-double tweener::operator()(double t, double b , double c, double d) const
+bool tweener::operator==(const tweener& other) const
{
- return func_(t, b, c, d);
+ return name_ == other.name_;
+}
+
+bool tweener::operator!=(const tweener& other) const
+{
+ return !(*this == other);
}
const std::vector<std::wstring>& tweener::names()
* @param name The name of the tween function to use.
*/
tweener(const std::wstring& name = L"linear");
- tweener(const wchar_t* name);
/**
* @return The possible tween function names. Some of them may also support
* than b or greater than b + c for some tweener functions.
*/
double operator()(double t, double b , double c, double d) const;
+
+ bool operator==(const tweener& other) const;
+ bool operator!=(const tweener& other) const;
private:
- std::function<double(double, double, double, double)> func_;
+ std::function<double(double, double, double, double)> func_;
+ std::wstring name_;
};
}
std::map<int, draw_frame> operator()(const video_format_desc& format_desc);
std::future<void> apply_transforms(const std::vector<transform_tuple_t>& transforms);
- std::future<void> apply_transform(int index, const transform_func_t& transform, unsigned int mix_duration = 0, const tweener& tween = L"linear");
+ std::future<void> apply_transform(int index, const transform_func_t& transform, unsigned int mix_duration, const tweener& tween);
std::future<void> clear_transforms(int index);
std::future<void> clear_transforms();
std::future<frame_transform> get_current_transform(int index);
{
transform.image_transform.is_key = value;
return transform;
- }, 0, L"linear"));
+ }, 0, tweener(L"linear")));
transforms.apply();
return L"202 MIXER OK\r\n";
{
transform.image_transform.blend_mode = value;
return transform;
- }, 0, L"linear"));
+ }, 0, tweener(L"linear")));
transforms.apply();
return L"202 MIXER OK\r\n";
{
transform.image_transform.use_mipmap = value;
return transform;
- }, 0, L"linear"));
+ }, 0, tweener(L"linear")));
transforms.apply();
return L"202 MIXER OK\r\n";