author | simon <simon> | 2002-03-11 16:17:56 (UTC) |
---|---|---|
committer | simon <simon> | 2002-03-11 16:17:56 (UTC) |
commit | 3e3a8c86d441ba5e3fd6235747e9a0465085647f (patch) (side-by-side diff) | |
tree | 5d36545a55d5d2d4c1988a4e93962a3325c9e873 | |
parent | 523dbf7c0c6fb585f6067ff3adf032d8ff77815d (diff) | |
download | opie-3e3a8c86d441ba5e3fd6235747e9a0465085647f.zip opie-3e3a8c86d441ba5e3fd6235747e9a0465085647f.tar.gz opie-3e3a8c86d441ba5e3fd6235747e9a0465085647f.tar.bz2 |
- sync with qtopia cvs: adds patch which fixes qpixmaps loosing their
masks when scaling using certain scaling factors
-rw-r--r-- | qt/qte232-for-qpe150.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/qt/qte232-for-qpe150.patch b/qt/qte232-for-qpe150.patch index 3acb3d1..c01f1f3 100644 --- a/qt/qte232-for-qpe150.patch +++ b/qt/qte232-for-qpe150.patch @@ -17,48 +17,90 @@ + } + return sample; + } void getSample(int& l, int& r) { l = r = 0; @@ -152,38 +165,22 @@ private: if ( out >= max ) { max = dev->readBlock((char*)data, (uint)QMIN(sound_buffer_size,wavedata_remaining)); - wavedata_remaining -= max; out = 0; if ( max <= 0 ) { max = 0; return; } } - if ( chunkdata.wBitsPerSample == 8 ) { - l = (data[out++] - 128) * 128; - } else { - l = ((short*)data)[out/2]; - out += 2; - } + l = getOneSample(); if ( sound_stereo ) { if ( chunkdata.channels == 1 ) { r = l; } else { - if ( chunkdata.wBitsPerSample == 8 ) { - r = (data[out++] - 128) * 128; - } else { - r = ((short*)data)[out/2]; - out += 2; - } + r = getOneSample(); } } else { if ( chunkdata.channels == 2 ) { - if ( chunkdata.wBitsPerSample == 8 ) { - r = (data[out++] - 128) * 128; - } else { - r = ((short*)data)[out/2]; - out += 2; - } + r = getOneSample(); l = l + r; } } + +--- src/kernel/qpixmap_qws.cpp.orig Mon Mar 11 17:00:03 2002 ++++ src/kernel/qpixmap_qws.cpp Mon Mar 11 17:01:05 2002 +@@ -585,6 +585,13 @@ QPixmap QPixmap::xForm( const QWMatrix & + QWMatrix mat( 1, 0, 0, 1, -xmin, -ymin ); // true matrix + mat = matrix * mat; + ++ // calculate new width and height ++ QPointArray a( QRect( 0,0,ws,hs ) ); ++ a = mat.map( a ); ++ QRect r = a.boundingRect().normalize(); ++ w = r.width(); ++ h = r.height(); ++ + if ( matrix.m12() == 0.0F && matrix.m21() == 0.0F && + matrix.m11() >= 0.0F && matrix.m22() >= 0.0F && + depth() == defaultDepth() // ### stretchBlt limitation +@@ -593,11 +600,6 @@ QPixmap QPixmap::xForm( const QWMatrix & + if ( mat.m11() == 1.0F && mat.m22() == 1.0F ) + return *this; // identity matrix + +- h = qRound( mat.m22()*hs ); +- w = qRound( mat.m11()*ws ); +- h = QABS( h ); +- w = QABS( w ); +- + if(w==0 || h==0) { + return *this; + } +@@ -618,12 +620,6 @@ QPixmap QPixmap::xForm( const QWMatrix & + } + return pm; + +- } else { // rotation or shearing +- QPointArray a( QRect(0,0,ws,hs) ); +- a = mat.map( a ); +- QRect r = a.boundingRect().normalize(); +- w = r.width(); +- h = r.height(); + } + bool invertible; + mat = mat.invert( &invertible ); // invert matrix |