fill. Filling one-color areas of an image

^image.fill(x;y;color)   

The method is used to fill single-color areas of an image with a new color. The area to fill is defined by a dot with coordinates (x;y), which is located within it.


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

Browser will display a black 100x100 square diagonally crossed by a white line. The lower section will be black and the upper-yellow.


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