summaryrefslogtreecommitdiff
authorsimon <simon>2002-03-11 16:17:56 (UTC)
committer simon <simon>2002-03-11 16:17:56 (UTC)
commit3e3a8c86d441ba5e3fd6235747e9a0465085647f (patch) (unidiff)
tree5d36545a55d5d2d4c1988a4e93962a3325c9e873
parent523dbf7c0c6fb585f6067ff3adf032d8ff77815d (diff)
downloadopie-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
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--qt/qte232-for-qpe150.patch42
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
@@ -41,24 +41,66 @@
41 if ( sound_stereo ) { 41 if ( sound_stereo ) {
42 if ( chunkdata.channels == 1 ) { 42 if ( chunkdata.channels == 1 ) {
43 r = l; 43 r = l;
44 } else { 44 } else {
45 - if ( chunkdata.wBitsPerSample == 8 ) { 45 - if ( chunkdata.wBitsPerSample == 8 ) {
46 - r = (data[out++] - 128) * 128; 46 - r = (data[out++] - 128) * 128;
47 - } else { 47 - } else {
48 - r = ((short*)data)[out/2]; 48 - r = ((short*)data)[out/2];
49 - out += 2; 49 - out += 2;
50 - } 50 - }
51 + r = getOneSample(); 51 + r = getOneSample();
52 } 52 }
53 } else { 53 } else {
54 if ( chunkdata.channels == 2 ) { 54 if ( chunkdata.channels == 2 ) {
55 - if ( chunkdata.wBitsPerSample == 8 ) { 55 - if ( chunkdata.wBitsPerSample == 8 ) {
56 - r = (data[out++] - 128) * 128; 56 - r = (data[out++] - 128) * 128;
57 - } else { 57 - } else {
58 - r = ((short*)data)[out/2]; 58 - r = ((short*)data)[out/2];
59 - out += 2; 59 - out += 2;
60 - } 60 - }
61 + r = getOneSample(); 61 + r = getOneSample();
62 l = l + r; 62 l = l + r;
63 } 63 }
64 } 64 }
65
66 --- src/kernel/qpixmap_qws.cpp.origMon Mar 11 17:00:03 2002
67 +++ src/kernel/qpixmap_qws.cppMon Mar 11 17:01:05 2002
68@@ -585,6 +585,13 @@ QPixmap QPixmap::xForm( const QWMatrix &
69 QWMatrix mat( 1, 0, 0, 1, -xmin, -ymin );// true matrix
70 mat = matrix * mat;
71
72+ // calculate new width and height
73+ QPointArray a( QRect( 0,0,ws,hs ) );
74+ a = mat.map( a );
75+ QRect r = a.boundingRect().normalize();
76+ w = r.width();
77+ h = r.height();
78+
79 if ( matrix.m12() == 0.0F && matrix.m21() == 0.0F &&
80 matrix.m11() >= 0.0F && matrix.m22() >= 0.0F &&
81 depth() == defaultDepth() // ### stretchBlt limitation
82@@ -593,11 +600,6 @@ QPixmap QPixmap::xForm( const QWMatrix &
83 if ( mat.m11() == 1.0F && mat.m22() == 1.0F )
84 return *this; // identity matrix
85
86 -h = qRound( mat.m22()*hs );
87 -w = qRound( mat.m11()*ws );
88 -h = QABS( h );
89 -w = QABS( w );
90-
91 if(w==0 || h==0) {
92 return *this;
93 }
94@@ -618,12 +620,6 @@ QPixmap QPixmap::xForm( const QWMatrix &
95 }
96 return pm;
97
98 - } else { // rotation or shearing
99 -QPointArray a( QRect(0,0,ws,hs) );
100 -a = mat.map( a );
101 -QRect r = a.boundingRect().normalize();
102 -w = r.width();
103 -h = r.height();
104 }
105 bool invertible;
106 mat = mat.invert( &invertible ); // invert matrix