TransparentColor (Delphi)
Code
procedure TForm1.Button1Click(Sender: TObject);
var
Bitmap : TBitMap;
begin
Bitmap := TBitmap.Create;
try
with Bitmap do begin
LoadFromFile('factory.bmp');
Transparent := True;
TransParentColor := BitMap.canvas.pixels[50,50];
Form1.Canvas.Draw(0,0,BitMap);
TransparentMode := tmAuto;
Form1.Canvas.Draw(50,50,BitMap);
end;
finally
Bitmap.Free;
end;
end;
Uses
- Vcl.Graphics.TBitmap.Canvas ( fr | de | ja )
- Vcl.Graphics.TGraphic.Transparent ( fr | de | ja )
- Vcl.Graphics.TBitmap.TransparentMode ( fr | de | ja )
- Vcl.Graphics.TBitmap.TransparentColor ( fr | de | ja )
- Vcl.Graphics.TCanvas.Draw ( fr | de | ja )