| 首页 | 新闻 | 网页 | 设计 | 色彩 | 原创 | 视觉 | 素材 | 动漫 | 酷站 | 策划 | 文案 | 访谈 | 运营 | 编程 | 数据库 | 服务器 | 下载 | 图库 | 
您的位置: 幽幽天空 > 网页 > 编程开发 > Java教程 > JSP入门教程 > 文章正文 用户登录
借助js在flash中運
Flash JSAPI 入门
JS to Flash
flash中实现js的图
flash与js通讯
怎么用flash用jav
怎么用flash用jav
帮助你在Flash中操
学习AS绘图
as+js,打造页面f

用js绘图           

用js绘图

作者:佚名 来源:不详 更新:2004-9-25 错误报告 我要投稿
<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() //清除,清除后无法恢复!

文章录入:skyuu    责任编辑:skyuu 
  • 上一篇文章:

  • 下一篇文章:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    发表评论:
    姓名:  评 分: 1分 2分 3分 4分 5分
     
  • 严禁发表危害国家安全、政治、黄色淫秽等内容的评论。
  • 用户需对自己在使用幽幽天空服务过程中的行为承担法律责任。
  • 本站管理员有权保留或删除评论内容。
  • 评论内容只代表机友个人观点,与本网站立场无关。