Autor Beitrag
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10181
Erhaltene Danke: 1254

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 08.05.12 12:54 
Die Unit im Anhang stellt diese Prozedur bereit:
ausblenden Delphi-Quelltext
1:
procedure AlphaImgs(Image1, Image2: TGraphic; ResultBitmap: TBitmap; AlphaValue: Byte);					
Damit können zwei Bilder in TGraphic-Kontainern zu einem verschmolzen werden, wobei der AlphaBlend-Wert angibt, wieviel vom zweiten Bild zu sehen sein soll: 0 bedeutet, dass nur das erste Bild zu sehen ist, 255 nur das zweite. Das erste Bild ist als Hintergrund zu verstehen, auf den das zweite Bild gezeichnet werden soll. Ist das zweite Bild größer als das erste, wird nur ein überdeckender Ausschnitt verwendet.

Beispielaufruf:
ausblenden Delphi-Quelltext
1:
AlphaImgs(Image1.Picture.Graphic, Image2.Picture.Graphic, Image3.Picture.Bitmap, tbAlpha.Position);					


Dieser Beitrag basiert auf einem Vorschlag von user profile iconelundril.


UAlphaBlend.pas  (1.67 KB) Download (Rev 0)
 (534x, 534x gesamt)
Beschreibung: Die Unit mit dem Quelltext
AlphaBlendDemo.zip  (2.36 KB) Download (Rev 0)
 (878x, 878x gesamt)
Beschreibung: Ein Demo-Projekt
_________________
There are 10 types of people - those who understand binary and those who don´t.