Modified the OnClick code such to draw the second line in red and with width 5. When I now click on the form a few red pixels appear in the center of the green downward line.
Thinking about it, I think this is as expected. "Color-transparency" (i.e. that what you have when you set Transparent to true) is achieved by means of a mask created from the pixels having the TransparentColor. It seems that this mask is not updated when you paint over this image a second time. Therefore everything is blocked by the mask except for the pixels of the green line, and you paint over the image a second time only the pixels at the intersection between both lines become visible.
This is different from "alpha-channel transparency" (the kind of transparency in png images) where a fourth color channel exists to define the amount of transparency. The alpha-channel can be understood as an integrated mask, too, but when a new opaque line is drawn over an existing image, the alpha-channel of the line pixels is automatically set such that the line appears.
What can be done against this issue? We must force the image to update its mask. Looking at the source code of TRasterImage, an ancestor of TBitmap, I found the procedure ReleaseMaskHandle. This sounds promising, and, in fact, when I call this at the begin of the OnClick procedure, the second upward line does appear when the form is clicked:
procedure TForm1.FormClick(Sender: TObject);
begin
with Image1 do
begin
Picture.Bitmap.ReleaseMaskHandle;
Canvas.Pen.Color := clRed;
Canvas.Pen.Style := psSolid;
Canvas.Pen.Width := 5;
Canvas.MoveTo(0,Height-1); // draw a second line on BGImg from bottom left to top right ...
Canvas.LineTo(Width-1,0); // ... when I click somewhere on the form
end;
end;