forked from aseprite/aseprite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blend_mode.cpp
41 lines (36 loc) · 1.33 KB
/
blend_mode.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Aseprite Document Library
// Copyright (c) 2001-2017 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "doc/blend_mode.h"
namespace doc {
std::string blend_mode_to_string(BlendMode blendMode)
{
switch (blendMode) {
case BlendMode::NORMAL: return "normal";
case BlendMode::MULTIPLY: return "multiply";
case BlendMode::SCREEN: return "screen";
case BlendMode::OVERLAY: return "overlay";
case BlendMode::DARKEN: return "darken";
case BlendMode::LIGHTEN: return "lighten";
case BlendMode::COLOR_DODGE: return "color_dodge";
case BlendMode::COLOR_BURN: return "color_burn";
case BlendMode::HARD_LIGHT: return "hard_light";
case BlendMode::SOFT_LIGHT: return "soft_light";
case BlendMode::DIFFERENCE: return "difference";
case BlendMode::EXCLUSION: return "exclusion";
case BlendMode::HSL_HUE: return "hsl_hue";
case BlendMode::HSL_SATURATION: return "hsl_saturation";
case BlendMode::HSL_COLOR: return "hsl_color";
case BlendMode::HSL_LUMINOSITY: return "hsl_luminosity";
case BlendMode::ADDITION: return "addition";
case BlendMode::SUBTRACT: return "subtract";
case BlendMode::DIVIDE: return "divide";
default: return "unknown";
}
}
} // namespace doc