Changeset 59 for trunk/src/kernel/qpainter_pm.cpp
- Timestamp:
- Jan 29, 2006, 8:56:21 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel/qpainter_pm.cpp
r8 r59 505 505 if ( (pdev->devFlags & QInternal::CompatibilityMode) != 0 ) 506 506 setf(Qt2Compat); 507 else if ( dt == QInternal::Pixmap ) // device is a pixmap 508 ((QPixmap*)pdev)->detach(); // will modify it 507 else if ( dt == QInternal::Pixmap ) { // device is a pixmap 508 QPixmap *pm = (QPixmap*) pdev; // will modify it 509 pm->detach(); 510 // Ensure the auxiliary masked bitmap created for masking is destroyed 511 // (to cause it to be recreated when the pixmap is blitted next time). 512 // Also ensure the alpha channel of the pixmap is unfolded -- any GPI 513 // call will clear the high byte that may be storing the alpha bits, 514 // so the pixmap will appear as fully transparent. 515 if ( pm->data->mask ) 516 pm->prepareForMasking( FALSE, TRUE ); 517 if ( pm->data->hasRealAlpha ) 518 pm->unfoldAlphaChannel(); 519 } 509 520 510 521 hps = 0; … … 802 813 } 803 814 804 /*805 This function adjusts the raster operations for painting into a QBitmap on806 Windows.807 808 //@@TODO (dmik): think of it. should it be the same on OS/2? see also809 // qcolor_pm.cpp, qpixmap.cpp (qt_xForm_helper()), qpaintdevice_pm.cpp (bitBlt())810 811 For bitmaps und Windows, color0 is 0xffffff and color1 is 0x000000 -- so we812 have to use adjusted ROPs in this case to get the same effect as on Unix.813 */814 //@@TODO (dmik): possibly remove815 //Qt::RasterOp qt_map_rop_for_bitmaps( Qt::RasterOp r )816 //{817 // static const Qt::RasterOp ropCodes[] = {818 // Qt::CopyROP, // CopyROP819 // Qt::AndROP, // OrROP820 // Qt::NotXorROP, // XorROP821 // Qt::NotOrROP, // NotAndROP822 // Qt::NotCopyROP, // NotCopyROP823 // Qt::NotAndROP, // NotOrROP824 // Qt::XorROP, // NotXorROP825 // Qt::OrROP, // AndROP826 // Qt::NotROP, // NotROP827 // Qt::SetROP, // ClearROP828 // Qt::ClearROP, // SetROP829 // Qt::NopROP, // NopROP830 // Qt::OrNotROP, // AndNotROP831 // Qt::AndNotROP, // OrNotROP832 // Qt::NorROP, // NandROP833 // Qt::NandROP // NorROP834 // };835 // return ropCodes[r];836 //}837 838 815 void QPainter::setRasterOp( RasterOp r ) 839 816 { … … 861 838 if ( bg_mode != TransparentMode ) 862 839 qt_GpiSetBackMix( hps, qt_ropCodes[r], cpen.style() == NoPen ); 863 864 //@@TODO (dmik): remove? see above todo (qt_map_rop_for_bitmaps())865 // if ( pdev->devType()==QInternal::Pixmap && ((QPixmap*)pdev)->isQBitmap() )866 // SetROP2( hdc, ropCodes[ qt_map_rop_for_bitmaps(r) ] );867 // else868 // SetROP2( hdc, ropCodes[r] );869 840 } 870 841
Note:
See TracChangeset
for help on using the changeset viewer.