1// Aseprite
2// Copyright (C) 2016 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_BOUNDS_H_INCLUDED
8#define APP_CMD_SET_CEL_BOUNDS_H_INCLUDED
9#pragma once
10
11#include "app/cmd.h"
12#include "app/cmd/with_cel.h"
13#include "gfx/rect.h"
14
15namespace app {
16namespace cmd {
17 using namespace doc;
18
19 class SetCelBoundsF : public Cmd
20 , public WithCel {
21 public:
22 SetCelBoundsF(Cel* cel, const gfx::RectF& bounds);
23
24 protected:
25 void onExecute() override;
26 void onUndo() override;
27 void onFireNotifications() override;
28 size_t onMemSize() const override {
29 return sizeof(*this);
30 }
31
32 private:
33 gfx::RectF m_oldBounds;
34 gfx::RectF m_newBounds;
35 };
36
37} // namespace cmd
38} // namespace app
39
40#endif
41