Bypass navigation menu
RGB Classic Games
Keeping the classics alive
Currently hosting 566 great games!
Return to Chapter 2

ExtPaint(X, Y, FillColor, BoundaryColor)

Fills an enclosed shape starting at X, Y with the specified fill color stopping at the specified boundary color.

An example of using the ExtPaint function would be if you drew a circle in red and wanted to fill the interior with a blue. If you gave the starting position as the center of the circle, the fill color as blue, and the boundary color as red; the interior would be filled with blue while leaving the red border of the circle alone.

Parameters

X - Starting horizontal position to paint
Y - Starting vertical position to paint
FillColor - Color used to fill the paint area
BoundaryColor - Color at which to stop painting

Examples

BASIC

CALL ExtPaint(100, 10, 5, 14)

PASCAL

ExtPaint(100, 10, 5, 14);

BGI equivalent

void floodfill(int x, int y, int border);