GradientRect nXStart, nYStart, nXEnd, nYEnd, nC1, nC2 [,bHorizontal]
<%
Set g=CreateObject("shotgraph.image")
' Chart size
xsize=300
ysize=200
' Image size
maxx=320
maxy=240
' Basis points of chart rectangle
x1=(maxx-xsize)\2
y1=(maxy-ysize)\2
x2=x1+xsize-1
y2=y1+ysize-1
Main()
Sub Main()
g.CreateImage maxx,maxy,256
' Background color
g.SetColor 0,255,255,255
' Drawing color (black)
g.SetColor 1,0,0,0
g.SetBgColor 0
' Starting color for gradient
g.SetColor 2,0,0,255
' Ending color for gradient
g.SetColor 3,201,201,255
g.SetDrawColor 1
' Fill the whole image with background
g.FillRect 0,0,maxx-1,maxy-1
' Drawing chart rectangle
g.Rectangle x1,y1,x2,y2
' Drawing dotted line
g.CreatePen "PS_DOT",1,1
g.SetBkMode "TRANSPARENT"
g.Line x1,maxy\2,x2,maxy\2
' Set brush to zero for outbounding rectangles
g.CreateBrush "BS_NULL",0,""
g.SetDrawColor 1
DrawBar x1+10,100,50
DrawBar x1+110,150,50
DrawBar x1+210,160,50
' Recalculate palette
g.BuildPalette 4
g.GifImage -1,0,"test.gif"
End Sub
' This sub draws fountain filled bar
' and outline rectangle
Sub DrawBar(x,height,width)
g.GradientRect x,y2-height-1,x+width,y2,3,2
g.Rectangle x,y2-height-1,x+width,y2
End Sub
%>