Line
The Line function draws a line using current pen.
Line
nXStart, nYStart, nXEnd, nYEnd [,bAntiAliased]
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
-
bAntiAliased
-
Optional. Specifies whether the line will be antialiased. The default value is False (the line is aliased).
Remarks
VBALine function is the same as Line and included
for compatibility with Visual Basic and Visual Basic for Applications
to avoid compilation errors.
The anlialiasing is supported for solid lines only.
If you use antialiased lines and build the GIF images, you should call the BuildPalette method
just before GIF image calling.
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)
%>