src/gui/painting/qmemrotate.cpp
changeset 33 3e2da88830cd
parent 18 2f34d5167611
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
   592                                     quint32 *dest, int dstStride)
   592                                     quint32 *dest, int dstStride)
   593 {
   593 {
   594     qt_memrotate90_template(src, srcWidth, srcHeight, srcStride, reinterpret_cast<qrgb_gl_rgba *>(dest), dstStride);
   594     qt_memrotate90_template(src, srcWidth, srcHeight, srcStride, reinterpret_cast<qrgb_gl_rgba *>(dest), dstStride);
   595 }
   595 }
   596 
   596 
       
   597 void qt_memrotate90_16(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
       
   598 {
       
   599     qt_memrotate90((const ushort *)srcPixels, w, h, sbpl, (ushort *)destPixels, dbpl);
       
   600 }
       
   601 
       
   602 void qt_memrotate180_16(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
       
   603 {
       
   604     qt_memrotate180((const ushort *)srcPixels, w, h, sbpl, (ushort *)destPixels, dbpl);
       
   605 }
       
   606 
       
   607 void qt_memrotate270_16(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
       
   608 {
       
   609     qt_memrotate270((const ushort *)srcPixels, w, h, sbpl, (ushort *)destPixels, dbpl);
       
   610 }
       
   611 
       
   612 void qt_memrotate90_32(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
       
   613 {
       
   614     qt_memrotate90((const uint *)srcPixels, w, h, sbpl, (uint *)destPixels, dbpl);
       
   615 }
       
   616 
       
   617 void qt_memrotate180_32(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
       
   618 {
       
   619     qt_memrotate180((const uint *)srcPixels, w, h, sbpl, (uint *)destPixels, dbpl);
       
   620 }
       
   621 
       
   622 void qt_memrotate270_32(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
       
   623 {
       
   624     qt_memrotate270((const uint *)srcPixels, w, h, sbpl, (uint *)destPixels, dbpl);
       
   625 }
       
   626 
       
   627 MemRotateFunc qMemRotateFunctions[QImage::NImageFormats][3] =
       
   628 // 90, 180, 270
       
   629 {
       
   630     { 0, 0, 0 },      // Format_Invalid,
       
   631     { 0, 0, 0 },      // Format_Mono,
       
   632     { 0, 0, 0 },      // Format_MonoLSB,
       
   633     { 0, 0, 0 },      // Format_Indexed8,
       
   634     { qt_memrotate90_32, qt_memrotate180_32, qt_memrotate270_32 },      // Format_RGB32,
       
   635     { qt_memrotate90_32, qt_memrotate180_32, qt_memrotate270_32 },      // Format_ARGB32,
       
   636     { qt_memrotate90_32, qt_memrotate180_32, qt_memrotate270_32 },      // Format_ARGB32_Premultiplied,
       
   637     { qt_memrotate90_16, qt_memrotate180_16, qt_memrotate270_16 },      // Format_RGB16,
       
   638     { 0, 0, 0 },      // Format_ARGB8565_Premultiplied,
       
   639     { 0, 0, 0 },      // Format_RGB666,
       
   640     { 0, 0, 0 },      // Format_ARGB6666_Premultiplied,
       
   641     { 0, 0, 0 },      // Format_RGB555,
       
   642     { 0, 0, 0 },      // Format_ARGB8555_Premultiplied,
       
   643     { 0, 0, 0 },      // Format_RGB888,
       
   644     { 0, 0, 0 },      // Format_RGB444,
       
   645     { 0, 0, 0 }       // Format_ARGB4444_Premultiplied,
       
   646 };
       
   647 
   597 QT_END_NAMESPACE
   648 QT_END_NAMESPACE