transparente pixmap, alpha blending qt 3.3.7

Alles rund um die Programmierung mit Qt
Antworten
kp
Beiträge: 14
Registriert: 2. Mai 2007 10:17

transparente pixmap, alpha blending qt 3.3.7

Beitrag von kp »

kann mir bitte jemand helfen, wie ich unter Qt 3.3.7 einer Pixmap einen Alpha-Wert zuweisen kann um die Pixmap transparent darzustellen. Ich möchte z.B. ein rotes Polygon mit einem transparentwert von z. B. 125 (halbtransparent) darstellen!

ich habe folgenden Code:

QPixmap pix = pixmap; // pixmap ist die globale pixmap
p.begin( &pix );
p.setPen( Qt::NoPen );
QBrush brush( QColor( 255, 0, 255 ) ); //magenta
p.setBrush( brush );
p.drawPolygon( a );
p.end();
bitBlt( this, 0, 0, &pix, Qt::CopyROP );

Bitte dringends um Hilfe, vielen Dank!
Antworten