]> git.sesse.net Git - casparcg/blobdiff - modules/psd/misc.h
* support for cornerpinning in psd-producer via vector-masks
[casparcg] / modules / psd / misc.h
index 1f56808757856278466ecc30ea4ed8c619b68271..840b365b9844f9153aee90f8b05839098b5f5489 100644 (file)
 \r
 #include <common/except.h>\r
 #include <common/enum_class.h>\r
+#include <core/mixer/image/blend_modes.h>\r
 \r
 #include <string>\r
 #include <cstdint>\r
+#include <vector>\r
 \r
 namespace caspar { namespace psd {\r
        \r
@@ -38,6 +40,10 @@ struct point
        T y;\r
 \r
        void clear() { x = 0; y = 0; }\r
+       \r
+       bool operator==(const point& rhs) {\r
+               return x == rhs.x && y == rhs.y;\r
+       }\r
 };\r
 \r
 template<typename T>\r
@@ -97,30 +103,7 @@ enum class layer_type
 layer_type int_to_layer_type(std::uint32_t x, std::uint32_t y);\r
 std::wstring layer_type_to_string(layer_type b);\r
 \r
-enum class blend_mode\r
-{\r
-       InvalidBlendMode = -1,\r
-       Normal = 'norm',\r
-       Darken = 'dark',\r
-       Lighten = 'lite',\r
-       Hue = 'hue ',\r
-       Saturation = 'sat ',\r
-       Color = 'colr',\r
-       Luminosity = 'lum ',\r
-       Multiply = 'mul ',\r
-       Screen = 'scrn',\r
-       Dissolve = 'diss',\r
-       Overlay = 'over',\r
-       HardLight = 'hLit',\r
-       SoftLight = 'sLit',\r
-       Difference = 'diff',\r
-       Exclusion = 'smud',\r
-       ColorDodge = 'div ',\r
-       ColorBurn = 'idiv'\r
-};\r
-\r
-blend_mode int_to_blend_mode(std::uint32_t x);\r
-std::wstring blend_mode_to_string(blend_mode b);\r
+caspar::core::blend_mode int_to_blend_mode(std::uint32_t x);\r
 \r
 enum class color_mode\r
 {\r