Forum > Other
[BUG?]TImage (another one)
(1/1)
mathx:
Hello,
I'm evaluating lazarus/FPC to possibly switch to it. However, I can't get a simple TImage demo to work. A few issues:
1- First, I was unable to see any bitmap I loaded (design or runtime). Took me a while to figure out the visible property of the TImage was (by default) false. It really should be true (just a suggestion).
2- If I try to put a value into (TImage).canvas.pen.color gotten from a call to random(256*256*256) after a while (a few iterations) I get an Access Violation...
--- Code: ---var
i: integer;
r: TColor;
begin
for i:= 0 to NUMLINES -1 do begin
r:= random(256*256*256);
//writeln(r, ' ', i);
canvas.Pen.Color:= r;
canvas.MoveTo(Random(500), Random(250));
canvas.LineTo(Random(500), Random(250));
end;
end;
--- End code ---
3- If I run this code on a TImage, if visible is true it paints the lines, but then draws a black rectangle above it...
Thanks
mathx:
Oh yeah, and I'm on win32, with latest (at least I think it is the latest) snapshot
Navigation
[0] Message Index