Mercurial > hg > orthanc-stone
diff Framework/Toolbox/AffineTransform2D.cpp @ 1279:7ec8fea061b9 broker
integration mainline->broker
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 04 Feb 2020 15:20:08 +0100 |
parents | 0ca50d275b9a 2d8ab34c8c91 |
children | 30deba7bc8e2 |
line wrap: on
line diff
--- a/Framework/Toolbox/AffineTransform2D.cpp Fri Jan 31 17:34:57 2020 +0100 +++ b/Framework/Toolbox/AffineTransform2D.cpp Tue Feb 04 15:20:08 2020 +0100 @@ -246,6 +246,16 @@ return t; } + AffineTransform2D AffineTransform2D::CreateRotation(double angle, // CW rotation + double cx, // rotation center + double cy) // rotation center + { + return Combine( + CreateOffset(cx, cy), + CreateRotation(angle), + CreateOffset(-cx, -cy) + ); + } AffineTransform2D AffineTransform2D::CreateOpenGLClipspace(unsigned int canvasWidth, unsigned int canvasHeight)