DrawLine
Draws a line in a pixmap.
Syntax
-
DrawLine(pm, x0, y0, x1, y1, c)-
pmis a pixmap -
x0,y0,x1, andy1are integers -
cis a colour
-
Description
DrawLine(pm, x0, y0, x1, y1, c) returns pm with a line drawn between (x0, y0) and (x1, y1) with colour c. The line is drawn as a single-pixel solid line with no antialiasing.
Examples
x ≔ 600;
n ≔ 360;
pm ≔ CreatePixmap(x, x);
for(i, 1, n,
(
pm ≔ DrawLine(
pm,
RandomInt(3⋅x) − x,
RandomInt(3⋅x) − x,
RandomInt(3⋅x) − x,
RandomInt(3⋅x) − x,
"black")
)
);
GaussianBlur(ComponentHighlight(pm), 2, 3)

MotionBlur(pm, 100)
