comparison Framework/Radiography/RadiographyLayerResizeTracker.h @ 415:c0589c3173fd

finished reorganization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 13 Nov 2018 10:36:53 +0100
parents
children b70e9be013e4
comparison
equal deleted inserted replaced
414:f7616c010056 415:c0589c3173fd
1 /**
2 * Stone of Orthanc
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4 * Department, University Hospital of Liege, Belgium
5 * Copyright (C) 2017-2018 Osimis S.A., Belgium
6 *
7 * This program is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU Affero General Public License
9 * as published by the Free Software Foundation, either version 3 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Affero General Public License for more details.
16 *
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 **/
20
21
22 #pragma once
23
24 #include "../Toolbox/UndoRedoStack.h"
25 #include "../Widgets/IWorldSceneMouseTracker.h"
26 #include "RadiographyScene.h"
27
28 namespace OrthancStone
29 {
30 class RadiographyLayerResizeTracker : public IWorldSceneMouseTracker
31 {
32 private:
33 class UndoRedoCommand;
34
35 UndoRedoStack& undoRedoStack_;
36 RadiographyScene::LayerAccessor accessor_;
37 bool roundScaling_;
38 double originalSpacingX_;
39 double originalSpacingY_;
40 double originalPanX_;
41 double originalPanY_;
42 Corner oppositeCorner_;
43 double oppositeX_;
44 double oppositeY_;
45 double baseScaling_;
46
47 public:
48 RadiographyLayerResizeTracker(UndoRedoStack& undoRedoStack,
49 RadiographyScene& scene,
50 size_t layer,
51 double x,
52 double y,
53 Corner corner,
54 bool roundScaling);
55
56 virtual bool HasRender() const
57 {
58 return false;
59 }
60
61 virtual void Render(CairoContext& context,
62 double zoom);
63
64 virtual void MouseUp();
65
66 virtual void MouseMove(int displayX,
67 int displayY,
68 double sceneX,
69 double sceneY);
70 };
71 }