I'm trying to draw a line on an instance of TImage, I have wrote this code with Lazarus 0.9.25:
procedure TForm1.FormCreate(Sender: TObject);
begin
Form1.Color := clBlack;
Image1.Picture.LoadFromFile('Tigers.jpg');
Image1.Picture.Bitmap.Canvas.Pen.Color := clWhite;
Image1.Picture.Bitmap.Canvas.Line(0, 0, 200, 200);
end;
where Image TImage type on Form1 of TForm.
This code work ok on Linux (Fedora), I see a white line, but on Windows (WinXP) I see a black line.
If I set "Form1.Color := clRed;" on Windows I see a red line, in Linux is always ok, I see a white line.
In conclusion, in Windows the line color is the same of the Form color, Why?
Can you help me?
Goodbye