1// Aseprite
2// Copyright (C) 2022 Igara Studio S.A.
3// Copyright (C) 2001-2015 David Capello
4//
5// This program is distributed under the terms of
6// the End-User License Agreement for Aseprite.
7
8#ifndef APP_TOOLS_INK_TYPE_H_INCLUDED
9#define APP_TOOLS_INK_TYPE_H_INCLUDED
10#pragma once
11
12#include <string>
13
14namespace app {
15namespace tools {
16
17 enum class InkType {
18 DEFAULT = 0,
19 SIMPLE = 0,
20 ALPHA_COMPOSITING = 1,
21 COPY_COLOR = 2,
22 LOCK_ALPHA = 3,
23 SHADING = 4,
24
25 FIRST = DEFAULT,
26 LAST = SHADING,
27 };
28
29 inline bool inkHasOpacity(InkType inkType) {
30 return (inkType == InkType::ALPHA_COMPOSITING ||
31 inkType == InkType::LOCK_ALPHA);
32 }
33
34 std::string ink_type_to_string(InkType inkType);
35 std::string ink_type_to_string_id(InkType inkType);
36 InkType string_id_to_ink_type(const std::string& s);
37
38} // namespace tools
39} // namespace app
40
41#endif
42