Changeset 115 for trunk/src/gui/painting/qwindowsurface_raster.cpp
- Timestamp:
- Aug 17, 2009, 7:06:32 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/painting/qwindowsurface_raster.cpp
r2 r115 199 199 #endif 200 200 201 #endif 202 203 #ifdef Q_WS_PM 204 QRect br = rgn.boundingRect(); 205 #if 1 206 qDebug("QRasterWindowSurface::flush: [%s] br=%d,%d/%d,%d", 207 QWidgetPrivate::name(widget).constData(), 208 br.x(), br.y(), br.width(), br.height()); 209 #endif 210 211 HPS wps = widget->getPS(); 212 213 // use the reflection + transformation matrix to flip the y axis 214 // @todo check if it's really slower than flipping the image bits instead 215 // @todo I guess we can use DIVE here; check it too 216 MATRIXLF m; 217 m.fxM11 = MAKEFIXED(1, 0); 218 m.fxM12 = 0; 219 m.lM13 = 0; 220 m.fxM21 = 0; 221 m.fxM22 = MAKEFIXED(-1, 0); 222 m.lM23 = 0; 223 m.lM31 = 0; 224 m.lM32 = widget->height() - 1; 225 GpiSetDefaultViewMatrix(wps, 8, &m, TRANSFORM_REPLACE); 226 227 QPoint wOffset = qt_qwidget_data(widget)->wrect.topLeft(); 228 QRect wbr = br.translated(-wOffset); 229 230 br.translate(offset); 231 232 BITMAPINFOHEADER2 bmh; 233 memset(&bmh, 0, sizeof(BITMAPINFOHEADER2)); 234 bmh.cbFix = sizeof(BITMAPINFOHEADER2); 235 bmh.cPlanes = 1; 236 bmh.cBitCount = 32; // @todo support 8-bit indexed colors? 237 bmh.cx = d->image->width(); 238 bmh.cy = d->image->height(); 239 240 // Note: target is inclusive-inclusive, source is inclusive-exclusive 241 POINTL ptls[] = { { wbr.left(), wbr.top() }, 242 { wbr.right(), wbr.bottom() }, 243 { br.left(), br.top() }, 244 { br.right() + 1, br.bottom() + 1 } }; 245 GpiDrawBits(wps, (PVOID) d->image->image.bits(), (PBITMAPINFO2) &bmh, 4, ptls, 246 ROP_SRCCOPY, BBO_IGNORE); 247 248 widget->releasePS(wps); 201 249 #endif 202 250
Note:
See TracChangeset
for help on using the changeset viewer.