FillRect

The FillRect function fills a rectangle using the current brush.

FillRect nXStart, nYStart, nXEnd, nYEnd

Parameters

nXStart
Specifies the x-coordinate of the first base corner of the rectangle

nYStart
Specifies the y-coordinate of the first base corner of the rectangle

nXEnd
Specifies the x-coordinate of the second base corner of the rectangle

nYEnd
Specifies the y-coordinate of the second base corner of the rectangle

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,0,0,204
obj.SetColor 3,103,0,51
obj.SetBgColor 0
obj.FillRect 0,0,size-1,size-1

obj.CreateBrush "BS_SOLID",2,""
obj.FillRect size/6,size/6,size-1-size/6,size-1-size/6
obj.CreateBrush "BS_HATCHED",3,"HS_BDIAGONAL"
obj.FillRect size/2,size/2,size-2,size-2
obj.SetBkColor(1)
obj.CreateBrush "BS_HATCHED",0,"HS_FDIAGONAL"
obj.FillRect size/10,size/10,size/2-size/10,size/2-size/10

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