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_MASK_POSITION_H_INCLUDED 8 #define APP_CMD_SET_MASK_POSITION_H_INCLUDED 9 #pragma once 10 11 #include "app/cmd.h" 12 #include "app/cmd/with_document.h" 13 #include "gfx/point.h" 14 15 namespace app { 16 namespace cmd { 17 using namespace doc; 18 19 class SetMaskPosition : public Cmd 20 , public WithDocument { 21 public: 22 SetMaskPosition(Doc* doc, const gfx::Point& pos); 23 24 protected: 25 void onExecute() override; 26 void onUndo() override; onMemSize()27 size_t onMemSize() const override { 28 return sizeof(*this); 29 } 30 31 private: 32 void setMaskPosition(const gfx::Point& pos); 33 34 gfx::Point m_oldPosition; 35 gfx::Point m_newPosition; 36 }; 37 38 } // namespace cmd 39 } // namespace app 40 41 #endif 42