I would like to draw simple lines using coordinates retrieved from hardware source (about 15000 to 20000 true/false points per second) to display logic level (scope-like view).
I chose TImage as simplest way of drawing while avoiding to draw directly to form itself.
I used simple code that is invoked on click event (Image1 is TImage):
with Image1 do
begin
Canvas.Pen.Color := clWhite;
Canvas.Pen.Width := 1;
Canvas.Pen.Style := psSolid;
Canvas.MoveTo (0, 0);
Canvas.LineTo (100, 100);
end;
I get the white line, but whole Canvas is filled with black color. I tried searching for methods that suppress this or at least set complete transparency, and here in forums too.
There is no clear solution to this problem.
So, how to write code that draws only lines without affecting background ?