Line

The Line function draws a line using current pen.

Line nXStart, nYStart, nXEnd, nYEnd

Parameters

nXStart
Specifies the x-coordinate of the line's starting point

nYStart
Specifies the y-coordinate of the line's starting point

nXEnd
Specifies the x-coordinate of the line's ending point

nYEnd
Specifies the y-coordinate of the line's ending point

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.CreatePen "PS_DOT",1,1
obj.Line 0,size/2,size-1,size/2
obj.Line size/2,0,size/2,size-1
obj.CreatePen "PS_SOLID",5,2
obj.Line 0,0,size-1,size-1
obj.CreatePen "PS_SOLID",5,3
obj.Line 0,size-1,size-1,0

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