1 | // Aseprite |
2 | // Copyright (C) 2001-2015 David Capello |
3 | // |
4 | // This program is distributed under the terms of |
5 | // the End-User License Agreement for Aseprite. |
6 | |
7 | #ifndef APP_CMD_SET_CEL_OPACITY_H_INCLUDED |
8 | #define APP_CMD_SET_CEL_OPACITY_H_INCLUDED |
9 | #pragma once |
10 | |
11 | #include "app/cmd.h" |
12 | #include "app/cmd/with_cel.h" |
13 | |
14 | namespace app { |
15 | namespace cmd { |
16 | using namespace doc; |
17 | |
18 | class SetCelOpacity : public Cmd |
19 | , public WithCel { |
20 | public: |
21 | SetCelOpacity(Cel* cel, int opacity); |
22 | |
23 | protected: |
24 | void onExecute() override; |
25 | void onUndo() override; |
26 | void onFireNotifications() override; |
27 | size_t onMemSize() const override { |
28 | return sizeof(*this); |
29 | } |
30 | |
31 | private: |
32 | int m_oldOpacity; |
33 | int m_newOpacity; |
34 | }; |
35 | |
36 | } // namespace cmd |
37 | } // namespace app |
38 | |
39 | #endif |
40 | |