Sign in Join
Wiki copytemporary

Canvas line: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11The **Canvas.Line(x1, y1, x2, y2)** statement will draw a line from point (x1, y1) to (x2, y2).
22
33The coordinates of the canvas are:
44
5-<figure>
6-<img src="canvas2.png" title="canvas2.png" />
7-<figcaption>canvas2.png</figcaption>
8-</figure>
5+![](/wiki-images/d/d7/Canvas2.png)
96
107This code will draw the diagonals in a form:
118
129``` pascal
1310procedure TForm1.Form1Paint(Sender: TObject);
1411begin
1512 Canvas.Line(0, 0, Width-1, Height-1);
1613 Canvas.Line(0, Height-1, Width-1 ,0);
1714end;
1815```
1916
2017## See also
2118
2219- [[Drawing with canvas]]
2320
2421---
2522*From the Free Pascal wiki, page "Canvas line", as it stood on 2020-02-07 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
2623Category: GUI
2724Category: LCL

Back to history