Help > REFERENCE OF THE BUILT-IN FUNCTIONS > User Interface and Graphics > fill


fill (int_x, int_y, int_colour);

Implements “flood fill” with specified colour in an enclosed area. The parameters X and Y can be any point within the area, and the colour of the pixel at position (x,y) defines the background colour that will be replaced by the fill colour. The area is filled using the colour specified in the last parameter of the function.


The fill() function requires reading from the display memory. Some cheap displays on the market don’t have the relevant data pins exposed and available for use. The function will be unable to operate normally with those displays.