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_SHIFT_MASKED_CEL_H_INCLUDED
8#define APP_CMD_SHIFT_MASKED_CEL_H_INCLUDED
9#pragma once
10
11#include "app/cmd.h"
12#include "app/cmd/with_cel.h"
13
14namespace app {
15namespace cmd {
16 using namespace doc;
17
18 class ShiftMaskedCel : public Cmd
19 , public WithCel {
20 public:
21 ShiftMaskedCel(Cel* cel, int dx, int dy);
22
23 protected:
24 void onExecute() override;
25 void onUndo() override;
26 size_t onMemSize() const override {
27 return sizeof(*this);
28 }
29
30 private:
31 void shift(int dx, int dy);
32
33 int m_dx, m_dy;
34 };
35
36} // namespace cmd
37} // namespace app
38
39#endif
40