TAgg2D.Rectangle(x1, y1, x2, y2)
Description
Draws rectangle at defined coordinates.
Parameters
x1: double
X coordinate of rectangle's Top Left corner [in subpixels].
y1: double
Y coordinate of rectangle's Top Left corner [in subpixels].
x2: double
X coordinate of rectangle's Bottom Right corner [in subpixels].
y2: double
Y coordinate of rectangle's Bottom Right corner [in subpixels].
Example
if VG.Attach(Image1.Picture.Bitmap) then begin VG.ClearAll(255, 255, 255); Randomize; // Draw 100 random rectangles for i := 1 to 100 do begin VG.LineColor(random(255), random(255), random(255), random(255)); VG.FillColor(random(255), random(255), random(255), random(255)); VG.LineWidth(random(100) / 10); VG.Rectangle(random(ClientWidth - 20) + 10.5, random(ClientHeight - 20) + 10.5, random(ClientWidth - 20) + 10.5, random(ClientHeight - 20) + 10.5); end; end;



