\r
image_transform::image_transform() \r
: opacity_(1.0)\r
- , gain_(1.0)\r
, brightness_(1.0)\r
, contrast_(1.0)\r
, saturation_(1.0)\r
return opacity_;\r
}\r
\r
-void image_transform::set_gain(double value)\r
-{\r
- gain_ = std::max(0.0, value);\r
-}\r
-\r
-double image_transform::get_gain() const\r
-{\r
- return gain_;\r
-}\r
-\r
void image_transform::set_brightness(double value)\r
{\r
brightness_ = std::max(0.0, value);\r
{\r
opacity_ *= other.opacity_; \r
blend_mode_ = std::max(blend_mode_, other.blend_mode_);\r
- gain_ *= other.gain_;\r
brightness_ *= other.brightness_;\r
contrast_ *= other.contrast_;\r
saturation_ *= other.saturation_;\r
image_transform result; \r
result.set_blend_mode (std::max(source.get_blend_mode(), dest.get_blend_mode()));\r
result.set_is_key (source.get_is_key() | dest.get_is_key());\r
- result.set_gain (do_tween(time, source.get_gain(), dest.get_gain(), duration, tweener));\r
result.set_brightness (do_tween(time, source.get_brightness(), dest.get_brightness(), duration, tweener));\r
result.set_contrast (do_tween(time, source.get_contrast(), dest.get_contrast(), duration, tweener));\r
result.set_saturation (do_tween(time, source.get_saturation(), dest.get_saturation(), duration, tweener));\r