TAgg2D.Line (x1, y1, x2, y2)
Description
Draws line from the start point (including) to the end point (including).
Start and end points must be different to render a visible line.
Parameters
x1: double
X coordinate of line start point [in subpixels].
y1: double
Y coordinate of line start point [in subpixels].
x2: double
X coordinate of line end point [in subpixels].
y2: double
Y coordinate of line end point [in subpixels].
Example
if VG.Attach(Image1.Picture.Bitmap) then begin VG.ClearAll(255, 255, 255); Randomize; // Draw 100 random lines for i := 1 to 100 do begin VG.LineColor(random(255), random(255), random(255), random(255)); VG.LineWidth(random(100) / 10); VG.Line(random(ClientWidth - 20) + 10.5, random(ClientHeight - 20) + 10.5, random(ClientWidth - 20) + 10.5, random(ClientHeight - 20) + 10.5); end; end;



