DrawLine
Draws a line in a pixmap.
Syntax
-
DrawLine(pm, x0, y0, x1, y1, c)
-
pm
is a pixmap -
x0
,y0
,x1
, andy1
are integers -
c
is 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)