...einen Text transparent auf ein TImage schreiben?
|
Autor:
Thomas Stutz |
[ Tip ausdrucken ] | | |
procedure TForm1.Button1Click(Sender: TObject);
begin
with Image1.Picture.Bitmap.Canvas do
begin
Font.Color := clBlue;
Brush.Style := bsclear;
Font.Size := 13;
TextOut(10, 10, 'Transparent Text!!');
end;
end;
{**** Or / Oder ****}
procedure TForm1.Button1Click(Sender: TObject);
var
OldBkMode: integer;
begin
with Image1.Picture.Bitmap do
begin
Canvas.Font.Color := clBlue;
OldBkMode := SetBkMode(Canvas.Handle, Ord(TRANSPARENT));
Canvas.Font.Size := 13;
Canvas.TextOut(10, 10, 'Transparent Text!!');
SetBkMode(Canvas.Handle, OldBkMode);
end;
end;
Bewerten Sie diesen Tipp:
|
|
|