Mercurial > hg > orthanc-stone
annotate OrthancStone/Sources/Scene2D/MagnifyingGlassTracker.h @ 2146:743fa9c74443 dicom-sr tip
integration mainline->dicom-sr
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 16 Aug 2024 18:09:53 +0200 |
parents | 16c01cc201e7 |
children |
rev | line source |
---|---|
1993 | 1 /** |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
2124
16c01cc201e7
updated copyright, as Osimis is not active on Orthanc anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2114
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
2114
c23eef785569
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2077
diff
changeset
|
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1993 | 7 * |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU Lesser General Public License | |
10 * as published by the Free Software Foundation, either version 3 of | |
11 * the License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * Lesser General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU Lesser General Public | |
19 * License along with this program. If not, see | |
20 * <http://www.gnu.org/licenses/>. | |
21 **/ | |
22 | |
23 | |
24 #pragma once | |
25 | |
26 #include "../Scene2DViewport/OneGesturePointerTracker.h" | |
27 #include "../Viewport/ViewportLocker.h" | |
28 | |
29 #include <boost/weak_ptr.hpp> | |
30 | |
31 namespace OrthancStone | |
32 { | |
33 class MagnifyingGlassTracker : public OneGesturePointerTracker | |
34 { | |
35 private: | |
36 boost::weak_ptr<IViewport> viewport_; | |
37 ScenePoint2D pivot_; | |
38 AffineTransform2D originalSceneToCanvas_; | |
39 AffineTransform2D originalCanvasToScene_; | |
40 | |
1994 | 41 void Update(const ViewportLocker& locker, |
1993 | 42 const PointerEvent& event); |
43 | |
44 public: | |
45 MagnifyingGlassTracker(boost::weak_ptr<IViewport> viewport, | |
46 const PointerEvent& event); | |
47 | |
48 virtual void PointerUp(const PointerEvent& event, | |
49 const Scene2D& scene) ORTHANC_OVERRIDE; | |
50 | |
51 virtual void PointerMove(const PointerEvent& event, | |
52 const Scene2D& scene) ORTHANC_OVERRIDE; | |
53 | |
54 virtual void Cancel(const Scene2D& scene) ORTHANC_OVERRIDE; | |
55 }; | |
56 } |