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.
Color to use for the filling operation. A suitable color value can be obtained by using the ARGB() method.
Example





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

FloodFill(Int32,Int32,Int32,GdPictureColor) 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 GdPictureColor _

) As GdPictureStatus
public GdPictureStatus FloodFill( 

   int ImageID,

   int XStart,

   int YStart,

   GdPictureColor FillColor

)
public function FloodFill( 

    ImageID: Integer;

    XStart: Integer;

    YStart: Integer;

    FillColor: GdPictureColor

): GdPictureStatus; 
public function FloodFill( 

   ImageID : int,

   XStart : int,

   YStart : int,

   FillColor : GdPictureColor

) : GdPictureStatus;
public: GdPictureStatus FloodFill( 

   int ImageID,

   int XStart,

   int YStart,

   GdPictureColor FillColor

) 
public:

GdPictureStatus FloodFill( 

   int ImageID,

   int XStart,

   int YStart,

   GdPictureColor 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
Color to use for the filling operation. A suitable color value can be obtained by using the ARGB() 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, Color.Red);

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

    gdpictureImaging.ReleaseGdPictureImage(imageID);

}
See Also