 |
|
 |
| |
ShotGraph普通的画图的原理
|
出处:PConline
责任编辑:zwg
|
| [02-4-7 14:57]
|
作者:飞刀/aspcn
|
|
下面的是一个简单的例子来说怎样用 shotgraph画图。
The size of the image is 201x201.
VBScript 中的代码:
set obj=CreateObject("shotgraph.image")
size=201
'Calling the CreateImage method
obj.CreateImage size,size,4
'Set 4 colors for drawing
obj.SetColor 0,255,255,255
obj.SetColor 1,0,0,0
obj.SetColor 2,255,108,0
obj.SetColor 3,0,0,204
'Crearing the painting area with color 0
obj.SetBgColor 0
obj.FillRect 0,0,size-1,size-1
'Color 0 will be used for drawing
obj.SetDrawColor 1
'Drawing the line
obj.Line size-1,0,0,size-1
'Color 2 will be used for filling
obj.SetBgColor 2
'Draw the big circle
obj.Ellipse 5,5,size-6,size-6
'Color 2 will be used for filling
obj.SetBgColor 3
'Draw the small circle
obj.Ellipse 5,(size-5)/4,size/2,(size-5)*3/4
'Create the image file named test.gif
obj.GifImage 0,1,"test.gif"
[上一页]
[下一页]
相关文章:
单机上使用ASP(1)
单机上使用ASP(2)
单机上使用ASP(3)
访问数据库(1)
动手写个小组件(组件入门)_asp
ASP中使用组件搜索
AspcnUP 组件的使用方法
ASP Charge 组件的例程
ASP SCRIPT: 计数器(使用GrapShot组件)
ASP中使用组件搜索
|
|
|
 |
|
 |