1 | // Aseprite Document Library |
2 | // Copyright (c) 2001-2017 David Capello |
3 | // |
4 | // This file is released under the terms of the MIT license. |
5 | // Read LICENSE.txt for more information. |
6 | |
7 | #ifndef DOC_SORT_PALETTE_H_INCLUDED |
8 | #define DOC_SORT_PALETTE_H_INCLUDED |
9 | #pragma once |
10 | |
11 | namespace doc { |
12 | |
13 | class Remap; |
14 | class Palette; |
15 | |
16 | enum class SortPaletteBy { |
17 | RED, |
18 | GREEN, |
19 | BLUE, |
20 | ALPHA, |
21 | HUE, |
22 | SATURATION, |
23 | VALUE, |
24 | LIGHTNESS, |
25 | LUMA, |
26 | }; |
27 | |
28 | // Creates a Remap to sort the palette. It doesn't apply the remap. |
29 | Remap sort_palette(const Palette* palette, |
30 | const SortPaletteBy channel, |
31 | const bool ascending); |
32 | |
33 | } // namespace doc |
34 | |
35 | #endif |
36 | |