Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi TImage Canvas Transparent (https://www.delphipraxis.net/9868-timage-canvas-transparent.html)

toms 6. Okt 2003 17:12


TImage Canvas Transparent
 
Hi!

Wenn ich Text auf ein TImage (Canvas) ausgebe, wird
der Bildhintergrund weiss.
Wie kann ich den Bildhintergrund transparent behalten?

Folgender Code funktioniert nicht:
(und alle Varianten davon, einmal den Brush.Style setzen,
einmal nicht, usw...)

Delphi-Quellcode:
 Image1.Canvas.Pen.Color := clBlack;
 SetBkMode(Image1.Canvas.Handle, TRANSPARENT);
 Image1.Canvas.Brush.Style := bsClear;
 Image1.Canvas.TextOut(2, 3, 'Test');
Auch die Transparent Eigenschaft beim TImage auf True zu setzen hilft nichts.

Mario 7. Okt 2003 09:23

Re: TImage Canvas Transparent
 
Das funktioniert bei mir problemlos:
Delphi-Quellcode:
  with Form1.Canvas do begin
    brush.style:=bsclear;
    TextOut(10,10,'TEST');
  end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:08 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz