Task is very simple - draw red circle on TImage canvas with 50% transparency fill.
I tried to set different values (0, $ffff, $ffff div 2) to Brush.FPColor alpha, but result is the same - no transparency.
procedure TForm1.FormCreate(Sender: TObject);
begin
with Image1.Canvas do
begin
DrawingMode := dmAlphaBlend; // no any effect with/without this
Brush.Color:=clBlack;
Pen.Style:=psClear;
Clear;
Brush.Color:=clGreen;
Ellipse(50, 50, 150, 150);
// How to draw second circle with 50% transparency?
//Brush.Color:=clRed;
Brush.FPColor:=FPColor($ffff,0000,0000, $ffff div 2);
Ellipse(80, 80, 200, 200);
end;
end;
How to make this?
Thanks.