GdPicture image identifier.
Specifies the x-coordinate, in pixel, of the point where filling is to start.
Specifies the y-coordinate, in pixel, of the point where filling is to start.
The filling color. A suitable color value can be obtained by using the ARGBI() method.
Example





In This Topic
GdPicture14 Namespace / GdPictureImaging Class / FloodFill Method / FloodFill(Int32,Int32,Int32,Int32) Method

FloodFill(Int32,Int32,Int32,Int32) Method

In This Topic
Fills an area of unified color in a GdPicture image with a specific color.
Syntax
'Declaration

 

Public Overloads Function FloodFill( _

   ByVal ImageID As Integer, _

   ByVal XStart As Integer, _

   ByVal YStart As Integer, _

   ByVal FillColor As Integer _

) As GdPictureStatus
public GdPictureStatus FloodFill( 

   int ImageID,

   int XStart,

   int YStart,

   int FillColor

)
public function FloodFill( 

    ImageID: Integer;

    XStart: Integer;

    YStart: Integer;

    FillColor: Integer

): GdPictureStatus; 
public function FloodFill( 

   ImageID : int,

   XStart : int,

   YStart : int,

   FillColor : int

) : GdPictureStatus;
public: GdPictureStatus FloodFill( 

   int ImageID,

   int XStart,

   int YStart,

   int FillColor

) 
public:

GdPictureStatus FloodFill( 

   int ImageID,

   int XStart,

   int YStart,

   int FillColor

) 

Parameters

ImageID
GdPicture image identifier.
XStart
Specifies the x-coordinate, in pixel, of the point where filling is to start.
YStart
Specifies the y-coordinate, in pixel, of the point where filling is to start.
FillColor
The filling color. A suitable color value can be obtained by using the ARGBI() method.

Return Value

A member of the GdPictureStatus enumeration.
Remarks
This method or an overload of it is used in the "Image Processing" VB.NET Demo.
Example
Filling an area of unified color in a jpeg image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())

{

    // LoadInMemory parameter is set to true in order to be able to update the input file.

    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg", true);

 

    // Fills an area of unified color.                

    gdpictureImaging.FloodFill(imageID, 5, 5, gdpictureImaging.ARGBI(255, 255, 0, 0));

    gdpictureImaging.SaveAsPNG(imageID, "image.png");

    gdpictureImaging.ReleaseGdPictureImage(imageID);

}
See Also