Define new static member Color::is_straight(BlendMethod) to determine whether a blend...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 23 Jan 2008 19:58:41 +0000 (19:58 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 23 Jan 2008 19:58:41 +0000 (19:58 +0000)
git-svn-id: http://svn.voria.com/code@1436 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/color.h

index 7c8a356..6c38c6a 100644 (file)
@@ -524,6 +524,14 @@ public:
                        || x==BLEND_HARD_LIGHT
                ;
        }
+
+       //! a blending method is considered 'straight' if transparent pixels in the upper layer can affect the result of the blend
+       static bool is_straight(BlendMethod x)
+       {
+               return x==BLEND_STRAIGHT
+                       || x==BLEND_STRAIGHT_ONTO
+               ;
+       }
 /*protected:
 
        value_type& operator[](const int i)