动网论坛,站长建站首选,国内使用量最多的论坛软件 动网论坛官方技术讨论区 站长工具 申请属于您自己的免费论坛
首页 | 新闻资讯 | 网站运营 | 网络编程 | 数据库 | 服务器 | 网页设计 | 图像媒体 | 网络应用 | 搜索优化 | 资源下载 | 动网主机 | DVBOX
    本站内  互联网 ASP论坛  ASP.Net论坛  PHP论坛
  
   Jsp → 阅读文章

 用jsp绘图择

作者来源: 
阅读 1533 人次 , 2006-3-29 4:23:00 


<object id=directdraw
classid="clsid:369303c2-d7ac-11d0-89d5-00a0c90833e6"
style="positiion:absolute;top:0;left:0;width:320;height:200"
>
<param name="line0001" value="绘图指令1">
<param name="line0002" value="绘图指令2">
...
</object>
绘图指令分类:
(一)常见形状
1.矩形类 //rotation是以度为单位的旋转角度
rect(x ,y, width, height, rotation) //矩形
oval(x ,y, width, height, rotation) //椭圆
roundrect(x ,y, width, height, arcwidth, archeight, rotation)
2.弧形类
arc(x ,y, width, height, startangle, arcangle, rotation) //弧形
pie(x ,y, width, height, startangle, arcangle, rotation) //饼图
3.多边形类
polygon(npoints, x1, y1, x2, y2, [x3, y3, ....], rotation) //闭合
polyline(npoints, x1, y1, x2, y2, [xn, yn, ....], rotation) //不闭合
(二)效果函数
1.线条效果
setlinecolor(r, g, b) //设置画线颜色
setlinestyle(style) //style=(1:实线;2:虚线;0:隐藏)
2.填充效果
setfillcolor(r, g, b, backr, backg, backb)
setfillstyle(style) //style=(1:实心;2:透明;3:-;4:|;5:\;6:/;7:+;8:x)
(三)文字输出函数
setfont('字体',width,height,r,g,b) //设置字体
text('要输出的文字内容', x,y,z) //输出文字

控制函数 //定义<object>后在<script></script>里使用。
引用格式:directdraw.functionname()
rotate(x-rotation, y-rotation, z-rotation) //旋转
scale(x-scale,y-scale,z-scale) //缩放
translate(x-coordinate,y-coordinate,z-coordinate) //平移
setidentity() //复原
clear() //清除,清除后无法恢复!

 
 收藏本文  打印本文  论坛讨论  关闭窗口
· 上一篇:jsp的出错处理
· 下一篇:如何使用JSP连接DB2数据库
· 初学Java所需要注意的几点
· ASP与JSP的比较(1)
· JAVA/JSP学习系列之五
· 在JSP中使用JavaMail
· JSP技巧:发送动态图像(3)


关于本站 | 联系我们 | 业务合作 | 客户案例 | 诚聘英才 | 广告合作 | 收藏本站
海口动网先锋网络科技有限公司版权所有
Copyright © 2000 - 2006 Cndw.Com
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077