Name

fillToBorder( ) — flood-fill an area bounded by a given color

Synopsis

GD::Image::fillToBorder(x, y, bordercolor, colorindex)

The fillToBorder( ) method operates in the same way as the fill( ) method, except that it will fill the area defined as all pixels neighboring the pixel at x, yand bordered by the color given by bordercolor. This can be useful when dealing with images with shapes that are filled with dithered colors, or areas where all the pixels are not of exactly the same color.

Get Programming Web Graphics with Perl and GNU Softwar now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.