用js繪圖
更新時(shí)間:2006年10月13日 00:00: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是以度為單位的旋轉(zhuǎn)角度
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) //不閉合
(二)效果函數(shù)
1.線條效果
SetLineColor(r, g, b) //設(shè)置畫線顏色
SetLineStyle(style) //style=(1:實(shí)線;2:虛線;0:隱藏)
2.填充效果
SetFillColor(r, g, b, backr, backg, backb)
SetFillStyle(style) //style=(1:實(shí)心;2:透明;3:-;4:|;5:\;6:/;7:+;8:x)
(三)文字輸出函數(shù)
SetFont('字體',width,height,r,g,b) //設(shè)置字體
Text('要輸出的文字內(nèi)容', x,y,z) //輸出文字
控制函數(shù) //定義<object>后在<script></script>里使用。
引用格式:DirectDraw.FunctionName()
rotate(x-rotation, y-rotation, z-rotation) //旋轉(zhuǎn)
scale(x-scale,y-scale,z-scale) //縮放
translate(x-coordinate,y-coordinate,z-coordinate) //平移
setIdentity() //復(fù)原
clear() //清除,清除后無法恢復(fù)!
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是以度為單位的旋轉(zhuǎn)角度
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) //不閉合
(二)效果函數(shù)
1.線條效果
SetLineColor(r, g, b) //設(shè)置畫線顏色
SetLineStyle(style) //style=(1:實(shí)線;2:虛線;0:隱藏)
2.填充效果
SetFillColor(r, g, b, backr, backg, backb)
SetFillStyle(style) //style=(1:實(shí)心;2:透明;3:-;4:|;5:\;6:/;7:+;8:x)
(三)文字輸出函數(shù)
SetFont('字體',width,height,r,g,b) //設(shè)置字體
Text('要輸出的文字內(nèi)容', x,y,z) //輸出文字
控制函數(shù) //定義<object>后在<script></script>里使用。
引用格式:DirectDraw.FunctionName()
rotate(x-rotation, y-rotation, z-rotation) //旋轉(zhuǎn)
scale(x-scale,y-scale,z-scale) //縮放
translate(x-coordinate,y-coordinate,z-coordinate) //平移
setIdentity() //復(fù)原
clear() //清除,清除后無法恢復(fù)!
相關(guān)文章
JSP動(dòng)態(tài)網(wǎng)站開發(fā)環(huán)境配置詳細(xì)方法
Sun推出的JSP(Java Server Pages)是一種執(zhí)行于服務(wù)器端的動(dòng)態(tài)網(wǎng)頁(yè)開發(fā)技術(shù),它基于Java技術(shù)。執(zhí)行JSP時(shí)需要在Web服務(wù)器上架設(shè)一個(gè)編譯JSP網(wǎng)頁(yè)的引擎。配置 JSP 環(huán)境可以有多種途徑,但主要工作就是安裝和配置Web服務(wù)器和JSP引擎。2008-09-09struts2+jsp實(shí)現(xiàn)文件上傳的方法
這篇文章主要介紹了struts2+jsp實(shí)現(xiàn)文件上傳的方法,涉及JSP基于Struts架構(gòu)實(shí)現(xiàn)文件傳輸?shù)耐暾记?具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-10-10