SetBkColor

The SetBkColor function sets the current background color to the specified color value

SetBkColor nColor

Parameters

nColor
Specifies the new background color.

Remarks

This function fills the gaps between styled lines drawn using a pen created by the CreatePen function.
If the background mode is OPAQUE, the background color is used to fill gaps between styled lines, gaps between hatched lines in brushes, and character cells.

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

obj.CreatePen "PS_SOLID",2,2
obj.CreateBrush "BS_HATCHED",3,"HS_DIAGCROSS"
obj.SetBkColor 0
obj.Rectangle 40,40,size/2,size-41
obj.SetBkColor 1
obj.Rectangle size/2,40,size-41,size-41
obj.SetBkColor 2
obj.Rectangle 40,size-38,size-41,size-4

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