line. Drawing a line on an image

^image.line(x0;y0;x1;y1;color)

The method draws on the image a line of specified color from (x0:y0) to (x1:y1).

Example
$square[^image::create(100;100;0x000000)]
^square.line(0;0;100;100;0xFFFFFF)
$
response:body[^square.gif[]]

Browser will display a black 100x100 square diagonally crossed by a white line.


Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 30.03.2004