![]() |
Re: Transparenz in TImage mit WinXP SP2 versagt ?
Also ich habe folgenden Code genommen:
Delphi-Quellcode:
Nur funktioniers damit nicht...!
iMiniMap.Picture.Bitmap.Transparent := true;
iMiniMap.Picture.Bitmap.TransparentMode := tmFixed; iMiniMap.Picture.Bitmap.TransparentColor := clBlack; Und die Farbe ist zu 100% Schwarz:
Delphi-Quellcode:
iMiniMap.Canvas.Pen.Color := clBlack;
iMiniMap.Canvas.Brush.Color := clBlack; iMiniMap.Canvas.Rectangle(0,0,100,100); |
Re: Transparenz in TImage mit WinXP SP2 versagt ?
Also es funktioniert immer noch nicht :(
PS: Habe jetzt die Variante von Kotas verwendet (#11) |
Re: Transparenz in TImage mit WinXP SP2 versagt ?
Delphi-Quellcode:
Bin jetzt mal neu in dem Thema aber du meinst das doch so oder?
Image1.Picture.Bitmap.Width := ImageList1.Width;
Image1.Picture.Bitmap.Height := ImageList1.Height; ImageList1.Draw(Image1.Picture.Bitmap.Canvas,0,0,0); Also in meiner ImageList ist ein Bild das nen rosa rand hat, der Transparent sein soll. In der ImageList die Transparenz auf diese Farbe gestellt, Image1.Transparent := true gestellt und oben den Code innen Button eingefügt und es geht. Oder versteh ich da was falsch? Weil dann erklärt mir das bitte^^ Gruß Neutral General |
Re: Transparenz in TImage mit WinXP SP2 versagt ?
Hallo!
Ich habe WinXP mit dem SP2 und bei mir kann ich jetzt durch zusammenschreiben eurer Vorschläge auch ein bmp per Canvas auf ein in einem Image geladenes jpg malen. Ich habe keine Angabe der Farbe gemacht, wobei bei meinem Quellcode damit die Farbe weiß standardmäßig als Hintergrund transparent wird.
Delphi-Quellcode:
procedure bildAufFeldMalen(dateiname: string);
var bild: TBitmap; begin bild := TBitmap.Create(); bild.width := 30; bild.height := 30; bild.LoadFromFile(dateiname); bild.Transparent := true; Form_Spielbrett.Image_Spielbrett.Canvas.Draw(10,10,bild); bild.Free; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:36 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz