QPixmap的setMask()和selfMask()是干么用的?
看了自带的说明,没弄明白//。。。。。
再就是clip是什么意思?看到好多次了,一直都晕着//。。。
原文:
void QPixmap::setMask ( const QBitmap & newmask )
Sets a mask bitmap.
The newmask bitmap defines the clip mask for this pixmap. Every pixel in newmask corresponds to a pixel in this pixmap. Pixel value 1 means opaque and pixel value 0 means transparent. The mask must have the same size as this pixmap.
Warning: Setting the mask on a pixmap will cause any alpha channel data to be cleared. For example:
QPixmap alpha( "image-with-alpha.png" );
QPixmap alphacopy = alpha;
alphacopy.setMask( *alphacopy.mask() );
bool QPixmap::selfMask () const
Returns TRUE if the pixmap's mask is identical to the pixmap itself; otherwise returns FALSE.