Mercurial > hg > orthanc-stone
diff 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 |
line wrap: on
line diff
--- a/Framework/Scene2D/Internals/CompositorHelper.h Wed Jun 12 09:52:25 2019 +0200 +++ b/Framework/Scene2D/Internals/CompositorHelper.h Thu Jun 13 16:47:02 2019 +0200 @@ -22,13 +22,29 @@ #pragma once #include "../Scene2D.h" - +#include "../ScenePoint2D.h" #include <boost/noncopyable.hpp> #include <map> namespace OrthancStone { + class ICompositor + { + public: + virtual unsigned int GetWidth() const = 0; + virtual unsigned int GetHeight() const = 0; + virtual void Refresh() = 0; + + ScenePoint2D GetPixelCenterCoordinates(int x, int y) const + { + return ScenePoint2D( + static_cast<double>(x) + 0.5 - static_cast<double>(GetWidth()) / 2.0, + static_cast<double>(y) + 0.5 - static_cast<double>(GetHeight()) / 2.0); + } + + }; + namespace Internals { class CompositorHelper : protected Scene2D::IVisitor