Mercurial > hg > orthanc-stone
comparison Framework/Viewport/IViewport.h @ 905:88bf49aebc13
introduced ICompositor and allow SdlViewport to work with a CairoCompositor (to run on machines without OpenGL drivers)
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 17 Jul 2019 16:56:53 +0200 |
parents | 0aff28f15ea2 |
children | 685c9a2d115f |
comparison
equal
deleted
inserted
replaced
904:ecdb2ceaa925 | 905:88bf49aebc13 |
---|---|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 **/ | 19 **/ |
20 | 20 |
21 #pragma once | 21 #pragma once |
22 | 22 |
23 #include "../Scene2D/ICompositor.h" | |
23 #include "../Scene2D/Scene2D.h" | 24 #include "../Scene2D/Scene2D.h" |
24 #include "../Scene2D/ScenePoint2D.h" | 25 #include "../Scene2D/ScenePoint2D.h" |
25 | 26 |
26 namespace OrthancStone | 27 namespace OrthancStone |
27 { | 28 { |
46 virtual unsigned int GetCanvasHeight() const = 0; | 47 virtual unsigned int GetCanvasHeight() const = 0; |
47 | 48 |
48 virtual const std::string& GetCanvasIdentifier() const = 0; | 49 virtual const std::string& GetCanvasIdentifier() const = 0; |
49 | 50 |
50 virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) const = 0; | 51 virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) const = 0; |
52 | |
53 virtual ICompositor& GetCompositor() = 0; | |
54 | |
55 virtual const ICompositor& GetCompositor() const | |
56 { | |
57 IViewport* self = const_cast<IViewport*>(this); | |
58 return self->GetCompositor(); | |
59 } | |
51 }; | 60 }; |
52 } | 61 } |