Title: [94188] trunk/Source/WebCore
Revision
94188
Author
[email protected]
Date
2011-08-31 07:50:31 -0700 (Wed, 31 Aug 2011)

Log Message

[Qt] Add a convenience function to cast a QTransform to TransformationMatrix
https://bugs.webkit.org/show_bug.cgi?id=67246

Reviewed by Andreas Kling.

No new functionality so no new tests.

* platform/graphics/qt/TransformationMatrixQt.cpp:
(WebCore::TransformationMatrix::TransformationMatrix):
* platform/graphics/transforms/TransformationMatrix.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (94187 => 94188)


--- trunk/Source/WebCore/ChangeLog	2011-08-31 14:43:56 UTC (rev 94187)
+++ trunk/Source/WebCore/ChangeLog	2011-08-31 14:50:31 UTC (rev 94188)
@@ -1,3 +1,16 @@
+2011-08-31  No'am Rosenthal  <[email protected]>
+
+        [Qt] Add a convenience function to cast a QTransform to TransformationMatrix
+        https://bugs.webkit.org/show_bug.cgi?id=67246
+
+        Reviewed by Andreas Kling.
+
+        No new functionality so no new tests.
+
+        * platform/graphics/qt/TransformationMatrixQt.cpp:
+        (WebCore::TransformationMatrix::TransformationMatrix):
+        * platform/graphics/transforms/TransformationMatrix.h:
+
 2011-08-31  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r94176.

Modified: trunk/Source/WebCore/platform/graphics/qt/TransformationMatrixQt.cpp (94187 => 94188)


--- trunk/Source/WebCore/platform/graphics/qt/TransformationMatrixQt.cpp	2011-08-31 14:43:56 UTC (rev 94187)
+++ trunk/Source/WebCore/platform/graphics/qt/TransformationMatrixQt.cpp	2011-08-31 14:50:31 UTC (rev 94188)
@@ -42,6 +42,14 @@
     return QTransform(a(), b(), c(), d(), e(), f());
 }
 
+TransformationMatrix::TransformationMatrix(const QTransform& transform)
+{
+    setMatrix(transform.m11(), transform.m12(), 0, transform.m13(),
+              transform.m21(), transform.m22(), 0, transform.m23(),
+              0, 0, 1, 0,
+              transform.m31(), transform.m32(), 0, transform.m33());
 }
 
+}
+
 // vim: ts=4 sw=4 et

Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h (94187 => 94188)


--- trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h	2011-08-31 14:43:56 UTC (rev 94187)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h	2011-08-31 14:50:31 UTC (rev 94188)
@@ -80,6 +80,10 @@
         setMatrix(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44);
     }
 
+#if PLATFORM(QT)
+    TransformationMatrix(const QTransform&);
+#endif
+
     void setMatrix(double a, double b, double c, double d, double e, double f)
     {
         m_matrix[0][0] = a; m_matrix[0][1] = b; m_matrix[0][2] = 0; m_matrix[0][3] = 0; 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to