Recent

Author Topic: [Help] Draw a line on TImage object (Linux vs Windows)  (Read 3345 times)

luigi65

  • New Member
  • *
  • Posts: 24
    • http://www.lodevelop.org
[Help] Draw a line on TImage object (Linux vs Windows)
« on: September 02, 2008, 08:06:51 pm »
I'm trying to draw a line on an instance of TImage,  I have wrote this code with Lazarus 0.9.25:

Code: [Select]

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

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: [Help] Draw a line on TImage object (Linux vs Windows)
« Reply #1 on: September 03, 2008, 03:25:03 am »
First, make sure you are using the latest 0.9.25 available. If the problem persists, please report this in the bug tracker and attach a test project.

 

TinyPortal © 2005-2018