ExtFloodFill

The ExtFloodFill function fills an area of the image with the current brush

ExtFloodFill nXStart, nYStart, nColor, sFillType

Parameters

nXStart
Specifies the x-coordinate of the point where filling is to begin.

nYStart
Specifies the y-coordinate of the point where filling is to begin.

nColor
Specifies the color of the boundary or of the area to be filled. The interpretation of nColor depends on the value of the sFillType parameter.

sFillType
String specifying the type of fill operation to be performed. It must be one of the following values:
StringMeaning
"FLOODFILLBORDER" The fill area is bounded by the color specified by the nColor parameter.
"FLOODFILLSURFACE" The fill area is defined by the color that is specified by nColor. Filling continues outward in all directions as long as the color is encountered. This style is useful for filling areas with multicolored boundaries.

Example
View result

<%@ Language=VBScript %>
<%
Response.ContentType="image/gif"
set obj=Server.CreateObject("shotgraph.image")

size=401
obj.CreateImage size,size,4
obj.SetColor 0,255,255,255
obj.SetColor 1,0,0,0
obj.SetColor 2,204,0,0
obj.SetColor 3,153,153,0
obj.SetBgColor 0
obj.FillRect 0,0,size-1,size-1

obj.CreatePen "PS_SOLID",2,1
obj.Ellipse 100,100,size-101,size-101
obj.Line 0,0,size-1,size-1
obj.SetBgColor 3
obj.ExtFloodFill 0,size/2,1,"FLOODFILLBORDER"
obj.CreateBrush "BS_HATCHED",2,"HS_CROSS"
obj.ExtFloodFill size/2+10,size/2,1,"FLOODFILLBORDER"

img=obj.GifImage(-1,1,"")
Response.BinaryWrite(img)
%>