src/gui/painting/qmemrotate.cpp
changeset 33 3e2da88830cd
parent 18 2f34d5167611
--- a/src/gui/painting/qmemrotate.cpp	Tue Jul 06 15:10:48 2010 +0300
+++ b/src/gui/painting/qmemrotate.cpp	Wed Aug 18 10:37:55 2010 +0300
@@ -594,4 +594,55 @@
     qt_memrotate90_template(src, srcWidth, srcHeight, srcStride, reinterpret_cast<qrgb_gl_rgba *>(dest), dstStride);
 }
 
+void qt_memrotate90_16(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
+{
+    qt_memrotate90((const ushort *)srcPixels, w, h, sbpl, (ushort *)destPixels, dbpl);
+}
+
+void qt_memrotate180_16(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
+{
+    qt_memrotate180((const ushort *)srcPixels, w, h, sbpl, (ushort *)destPixels, dbpl);
+}
+
+void qt_memrotate270_16(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
+{
+    qt_memrotate270((const ushort *)srcPixels, w, h, sbpl, (ushort *)destPixels, dbpl);
+}
+
+void qt_memrotate90_32(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
+{
+    qt_memrotate90((const uint *)srcPixels, w, h, sbpl, (uint *)destPixels, dbpl);
+}
+
+void qt_memrotate180_32(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
+{
+    qt_memrotate180((const uint *)srcPixels, w, h, sbpl, (uint *)destPixels, dbpl);
+}
+
+void qt_memrotate270_32(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
+{
+    qt_memrotate270((const uint *)srcPixels, w, h, sbpl, (uint *)destPixels, dbpl);
+}
+
+MemRotateFunc qMemRotateFunctions[QImage::NImageFormats][3] =
+// 90, 180, 270
+{
+    { 0, 0, 0 },      // Format_Invalid,
+    { 0, 0, 0 },      // Format_Mono,
+    { 0, 0, 0 },      // Format_MonoLSB,
+    { 0, 0, 0 },      // Format_Indexed8,
+    { qt_memrotate90_32, qt_memrotate180_32, qt_memrotate270_32 },      // Format_RGB32,
+    { qt_memrotate90_32, qt_memrotate180_32, qt_memrotate270_32 },      // Format_ARGB32,
+    { qt_memrotate90_32, qt_memrotate180_32, qt_memrotate270_32 },      // Format_ARGB32_Premultiplied,
+    { qt_memrotate90_16, qt_memrotate180_16, qt_memrotate270_16 },      // Format_RGB16,
+    { 0, 0, 0 },      // Format_ARGB8565_Premultiplied,
+    { 0, 0, 0 },      // Format_RGB666,
+    { 0, 0, 0 },      // Format_ARGB6666_Premultiplied,
+    { 0, 0, 0 },      // Format_RGB555,
+    { 0, 0, 0 },      // Format_ARGB8555_Premultiplied,
+    { 0, 0, 0 },      // Format_RGB888,
+    { 0, 0, 0 },      // Format_RGB444,
+    { 0, 0, 0 }       // Format_ARGB4444_Premultiplied,
+};
+
 QT_END_NAMESPACE