搜索引擎 软件注册码 电脑知识 软件运用技巧 QQ宝典 网站开发 网页制作 图形图像
数据库类 程序设计 电脑硬件 网络技术 免费留言簿 索尼爱立信 免费邮箱
游戏攻略 游戏秘技 魔兽私服技术 网游专区 免费主页空间
您的位置:首页-> 资讯中心-> 电脑资讯-> 网站开发-> ASP编程

ASP编程

ASP编程
ASP.NET编程
PHP编程
JSP编程
XML编程
数据库

本类阅读TOP10

·如何利用ASP把图片上传到数据库
·访问数据库(6)
·asp中常用的文件处理函数
·ASP SCRIPT: 计数器(使用GrapShot组件)
·ADO数据访问一点通
·显示以OLE对象存储图片的方法
·实用篇:用asp实现QQ在线查询
·关于ASPNET在IIS中的经验总结
·使用ASP读出文本文件并显示
·ASP中一个字符串处理类加强版(VBScript)

 
精品推荐

ShotGraph普通的画图的原理

作者:未知 来源:未知 加入时间:2007-6-11 点击量:34

 
ShotGraph普通的画图的原理

ShotGraph 能在以下的环境中使用:

  • Visual Basic
  • VBScript
  • Visual Basic for applications (VBA), Word, Excel, etc.
  • Active Server Pages (ASP) engine with Internet Information Server
  • Perl for Windows
  • others


ShotGraph size=3>COOL代码:


  • href=http://www.dvbbs.net/tech/asp/"">上载文件
  • href=http://www.dvbbs.net/tech/asp/"">计数器
  • href=http://www.dvbbs.net/tech/asp/"">画GIF动画图形
  • href=http://www.dvbbs.net/tech/asp/"">画图形


我们来先来简单的:


Step by step



  1. 首先建立一个对象 "shotgraph.image".
  2. 使用 href=http://www.dvbbs.net/tech/asp/"">CreateImage
    方法。
  3. 使用 href=http://www.dvbbs.net/tech/asp/""
    ?>SetColor 方法一次或者多次来定义画图要使用的颜色。
  4. 清除你图区中的所有内容,必要时使用 href=http://www.dvbbs.net/tech/asp/"">FillRect
    普遍认为方法.
  5. 使用有效的方法画图.
  6. 使用 href=http://www.dvbbs.net/tech/asp/"">GifImage
    函数. 你的图画就完成了!




下面的是一个简单的例子来说怎样用 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和PERL中的代码:
asp

$obj=CreateObject("shotgraph.image")

$size=201
$obj->CreateImage($size,$size,4)
$obj->SetColor(0,255,255,255)
$obj->SetColor(1,0,0,0)
$obj->SetColor(2,255,108,0)
$obj->SetColor(3,0,0,204)
$obj->SetBgColor(0)
$obj->FillRect(0,0,$size-1,$size-1)

$obj->SetDrawColor(1)
$obj->Line($size-1,0,0,$size-1)
$obj->SetBgColor(2)
$obj->Ellipse(5,5,$size-6,$size-6)
$obj->SetBgColor(3)
$obj->Ellipse(5,($size-5)/4,$size/2,($size-5)*3/4)

$obj->GifImage(0,1,"test.gif")

  



相关文章
  • ShotGraph函数介绍FindInBinary
  • 显示以OLE对象存储图片的方法
  • Form域中用Post提交容量大的数据
  • 如何利用ASP把图片上传到数据库
  • 网页中用隐藏帧来实现三个应用
  • asp中常用的文件处理函数
  • ADO数据访问一点通
  • 访问数据库(3)
  • AspEmail FAQ
  • 用ASP生成二维饼图
  • 相关软件

  • 卡巴斯基(Kaspersky) 7.0
  • AspStudio V0.77
  • ASP代码加密器 V2.0.53 正式版
  • Kaspersky Internet Security 2006 V6.0.12.175 汉化补丁
  • Kaspersky Internet Security 2006 V6.0.15.222
  • Kaspersky Personal Security Suite V1.0.22
  • Kaspersky Anti-Virus(AVP) 每周病毒库(2005.10.28)
  • Kaspersky Anti-Virus(AVP) Personal V5.0.388 汉化补丁
  • ExcelEverywhere for ASP & ASP.NET V3.4.1
  • Aspose.Word V3.1.4.0