Mercurial > hg > orthanc-stone
diff Framework/Scene2D/Internals/FixedPointAligner.cpp @ 617:7efa2543699d
simplification
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 02 May 2019 18:21:59 +0200 |
parents | b716763571ad |
children | 059e1fd05fd6 |
line wrap: on
line diff
--- a/Framework/Scene2D/Internals/FixedPointAligner.cpp Thu May 02 13:27:41 2019 +0200 +++ b/Framework/Scene2D/Internals/FixedPointAligner.cpp Thu May 02 18:21:59 2019 +0200 @@ -26,13 +26,10 @@ namespace Internals { FixedPointAligner::FixedPointAligner(Scene2D& scene, - const ScenePoint2D& p, - unsigned int canvasWidth, - unsigned int canvasHeight) : - scene_(scene) + const ScenePoint2D& p) : + scene_(scene), + canvas_(p) { - canvas_ = ScenePoint2D(p.GetX() - static_cast<double>(canvasWidth) / 2.0, - p.GetY() - static_cast<double>(canvasHeight) / 2.0); pivot_ = canvas_.Apply(scene_.GetCanvasToSceneTransform()); }