1 | // Aseprite |
2 | // Copyright (C) 2019-2022 Igara Studio S.A. |
3 | // Copyright (C) 2001-2018 David Capello |
4 | // |
5 | // This program is distributed under the terms of |
6 | // the End-User License Agreement for Aseprite. |
7 | |
8 | #ifndef APP_MODULES_GFX_H_INCLUDED |
9 | #define APP_MODULES_GFX_H_INCLUDED |
10 | #pragma once |
11 | |
12 | #include "app/color.h" |
13 | #include "app/pref/preferences.h" |
14 | #include "doc/color_mode.h" |
15 | #include "gfx/color.h" |
16 | #include "gfx/rect.h" |
17 | #include "gfx/size.h" |
18 | #include "ui/base.h" |
19 | |
20 | namespace os { |
21 | class Surface; |
22 | } |
23 | |
24 | namespace ui { |
25 | class Graphics; |
26 | } |
27 | |
28 | namespace app { |
29 | class Site; |
30 | |
31 | gfx::Color grid_color1(); |
32 | gfx::Color grid_color2(); |
33 | |
34 | void draw_checkered_grid(ui::Graphics* g, |
35 | const gfx::Rect& rc, |
36 | const gfx::Size& tile); |
37 | |
38 | void draw_checkered_grid(ui::Graphics* g, |
39 | const gfx::Rect& rc, |
40 | const gfx::Size& tile, |
41 | DocumentPreferences& docPref); |
42 | |
43 | void draw_color(ui::Graphics* g, |
44 | const gfx::Rect& rc, |
45 | const app::Color& color, |
46 | const doc::ColorMode colorMode); |
47 | |
48 | void draw_color_button(ui::Graphics* g, |
49 | const gfx::Rect& rc, |
50 | const app::Color& color, |
51 | const doc::ColorMode colorMode, |
52 | const bool hot, |
53 | const bool drag); |
54 | |
55 | void draw_tile(ui::Graphics* g, |
56 | const gfx::Rect& rc, |
57 | const Site& site, |
58 | const doc::tile_t tile); |
59 | |
60 | void draw_tile_button(ui::Graphics* g, |
61 | const gfx::Rect& rc, |
62 | const Site& site, |
63 | doc::tile_t tile, |
64 | const bool hot, |
65 | const bool drag); |
66 | |
67 | void draw_alpha_slider(ui::Graphics* g, |
68 | const gfx::Rect& rc, |
69 | const app::Color& color); |
70 | |
71 | void draw_alpha_slider(os::Surface* s, |
72 | const gfx::Rect& rc, |
73 | const app::Color& color); |
74 | |
75 | } // namespace app |
76 | |
77 | #endif |
78 | |