Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/Internals/CompositorHelper.h @ 848:80829436ce0c am-mainline
starting to re-implement radiography editor with latest framework
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 13 Jun 2019 16:47:02 +0200 |
parents | 266e2b0b9abc |
children | 6176917ef890 |
comparison
equal
deleted
inserted
replaced
842:2b245953b44b | 848:80829436ce0c |
---|---|
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "../Scene2D.h" | 24 #include "../Scene2D.h" |
25 | 25 #include "../ScenePoint2D.h" |
26 #include <boost/noncopyable.hpp> | 26 #include <boost/noncopyable.hpp> |
27 | 27 |
28 #include <map> | 28 #include <map> |
29 | 29 |
30 namespace OrthancStone | 30 namespace OrthancStone |
31 { | 31 { |
32 class ICompositor | |
33 { | |
34 public: | |
35 virtual unsigned int GetWidth() const = 0; | |
36 virtual unsigned int GetHeight() const = 0; | |
37 virtual void Refresh() = 0; | |
38 | |
39 ScenePoint2D GetPixelCenterCoordinates(int x, int y) const | |
40 { | |
41 return ScenePoint2D( | |
42 static_cast<double>(x) + 0.5 - static_cast<double>(GetWidth()) / 2.0, | |
43 static_cast<double>(y) + 0.5 - static_cast<double>(GetHeight()) / 2.0); | |
44 } | |
45 | |
46 }; | |
47 | |
32 namespace Internals | 48 namespace Internals |
33 { | 49 { |
34 class CompositorHelper : protected Scene2D::IVisitor | 50 class CompositorHelper : protected Scene2D::IVisitor |
35 { | 51 { |
36 public: | 52 public: |