TCanvas should not have width and height property
Original Reporter info from Mantis: Ignace
-
Reporter name: Ignace Lamine
Original Reporter info from Mantis: Ignace
- Reporter name: Ignace Lamine
Description:
TCanvas in Lazarus has width and Height property while TCanvas in Delphi does not. TCanvas should not have width and height property.
When I have following code in a form with a TPaintBox on it, Lazarus crashes while Delphi works:
with Paintbox1.Canvas.Pen do
with Paintbox1.canvas do
begin
width := 2;
moveto(10,10);
lineto(20,20);
end;
Lazarus thinks width refers to the canvas.
Additional information:
I encountered a similar problem in real life when translating a delphi component to lazarus. It gave me weird results where a line was drawn with a linewidth equal to the canvas width instead of the pen width.
Mantis conversion info:
- Mantis ID: 8891
- Version: 0.9.22
- Fixed in version: 0.9.23 (SVN)
- Fixed in revision: 11155 (#3a7183c0)
- Target version: 1.0.0
- LazTarget: 1.0