ImageGear for C and C++ on Windows v20.1 - Updated
IG_DIB_flood_fill
API Reference Guide > Core Component API Reference > Core Component Functions Reference > DIB Functions > IG_DIB_flood_fill

This function fills an area with a color, starting at the specified point.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_DIB_flood_fill(
        HIGEAR hIGear,
        AT_INT xPos, 
        AT_INT yPos, 
        LPAT_PIXEL lpFillPixel,
        LPAT_PIXEL lpBorderPixel
);

Arguments:

Name Type Description
hIGear HIGEAR Image to process.
xPos AT_INT X coordinate of a point inside the area to be filled.
yPos AT_INT X coordinate of a point inside the area to be filled.
lpFillPixel LPAT_PIXEL Fill color.
lpBorderPixel LPAT_PIXEL Color of the border surrounding the area.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++, except:
Indexed RGB – 1 bpp;
Grayscale – 1 bpp.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Sample:

Pixel Access

Remarks:

There are two ways to specify the area:

Is this page helpful?
Yes No
Thanks for your feedback.