diff Framework/Toolbox/AffineTransform2D.cpp @ 1259:69177b10e2b9

various fixes for RadiographyScene: support text layers outside the dicom layer, fix background in this case + extract dicom from rendered scene
author Alain Mazy <alain@mazy.be>
date Tue, 21 Jan 2020 16:52:37 +0100
parents 7912de3a15e0
children 2d8ab34c8c91
line wrap: on
line diff
--- a/Framework/Toolbox/AffineTransform2D.cpp	Tue Jan 14 15:22:10 2020 +0100
+++ b/Framework/Toolbox/AffineTransform2D.cpp	Tue Jan 21 16:52:37 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)