Kage Studio 0.7.230612
A Simple Free and Open Source 2D Animation Software
Loading...
Searching...
No Matches
unre.h
Go to the documentation of this file.
1/*
2 * Kage Studio - a simple free and open source vector-based 2D animation software
3 * Copyright (C) 2011~2022 Mj Mendoza IV
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 * MA 02110-1301, USA. Or, see <https://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef GTKMM_KAGE_MANAGER_UNRE_UNRE_H
23 #define GTKMM_KAGE_MANAGER_UNRE_UNRE_H
24
25 #include <vector>
26 #include <iostream>
27
28 #include "../data/vectordata.h"
29 #include "../data/point.h"
30
31 #include "kagedo.h"
32
33 using namespace std;
34
35 class UnRe {
36 public:
37 UnRe();
38 virtual ~UnRe();
39
40 void stackDo(unsigned int p_layer, unsigned int p_frame, vector<VectorData> p_data);
41 KageDo undo();
42 KageDo redo();
44
45 void clear();
46
47 void applyZoom(PointData p_originBefore, PointData p_originAfter, PointData p_zoomReference, double p_zoomRatio);
48 protected:
49 unsigned int _stackIndex;
50 vector<KageDo> _undoStack;
51
53 PointData applyZoomRatio(PointData p_zoomReference, double p_zoomRatio, PointData p_value);
54 };
55#endif //GTKMM_KAGE_MANAGER_UNRE_UNRE_H
Definition: kagedo.h:31
Definition: point.h:27
Definition: unre.h:35
virtual ~UnRe()
Definition: unre.cpp:28
UnRe()
Definition: unre.cpp:24
vector< KageDo > _undoStack
Definition: unre.h:50
void applyZoom(PointData p_originBefore, PointData p_originAfter, PointData p_zoomReference, double p_zoomRatio)
Definition: unre.cpp:117
unsigned int _stackIndex
Definition: unre.h:49
void stackDo(unsigned int p_layer, unsigned int p_frame, vector< VectorData > p_data)
Definition: unre.cpp:37
void clear()
Definition: unre.cpp:32
PointData applyZoomRatio(PointData p_zoomReference, double p_zoomRatio, PointData p_value)
for use of applyZoom
Definition: unre.cpp:94
KageDo undo()
Definition: unre.cpp:52
KageDo previewUndo()
Definition: unre.cpp:84
KageDo redo()
Definition: unre.cpp:63