Here you are:
procedure TForm1.Timer1Timer(Sender: TObject);
var
col: TBGRAPixel;
r, w: integer;
begin
Tik+=1;
if Tik>100 then Timer1.Enabled:=False;
col := BGRA(200, 0, 0, 200);
r := max(round(Tik) * 100 div 100, 25);
w :=max(round(Tik / 2), 40);
BMP1.FillRect(0, 0, 200, 200, clWhite);
BMP1.FillRoundRectAntialias(75, 75, 125, 125, 100, 100, col, [rrDefault]);
BMP2.FillRect(0, 0, 200, 200, clWhite);
BMP2.FillRoundRectAntialias(100 - r, 100 - r, 100 + r, 100 + r, 100, 100, col, [rrDefault]);
Mask.FillRect(0, 0, 200, 200, clBlack);
Mask.FillRoundRectAntialias(100 - w, 100 - w, 100 + w, 100 + w, 20, 20, BGRAWhite, [rrDefault]);
BMP3.FillRect(0, 0, 200, 200, clWhite);
BMP2.ApplyMask(Mask);
BMP3.PutImage(0, 0, BMP2, dmDrawWithTransparency);
BMP1.Draw(Canvas, 50, 50, True);
BMP2.Draw(Canvas, 300, 50, True);
Mask.Draw(Canvas, 550, 50, True);
BMP3.Draw(Canvas, 800, 50, True);
end;
I made a mask of second shape and then grow first one in center of it.
It can be allot better but what is your opinion?
(See attachment)