28 painter->setCompositionMode( mCompositionMode );
30 if ( mCompositionMode == QPainter::CompositionMode_SourceOver )
33 drawSource( painter );
38 if ( sourceIsPixmap() )
41 pixmap = sourcePixmap( Qt::LogicalCoordinates, &offset );
46 pixmap = sourcePixmap( Qt::DeviceCoordinates, &offset );
47 painter->setWorldTransform( QTransform() );
50 painter->drawPixmap( offset, pixmap );
void draw(QPainter *painter) override
QPainter::CompositionMode compositionMode() const
Returns the composition (blending) mode used for rendering the item.
void setCompositionMode(QPainter::CompositionMode mode)
Sets the composition (blending) mode used for rendering the item.