主頁(yè) > 知識(shí)庫(kù) > 用js繪圖

用js繪圖

熱門標(biāo)簽:銀行業(yè)務(wù) 美圖手機(jī) 鐵路電話系統(tǒng) 網(wǎng)站文章發(fā)布 服務(wù)器配置 智能手機(jī) 檢查注冊(cè)表項(xiàng) 呼叫中心市場(chǎng)需求
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() //清除,清除后無(wú)法恢復(fù)!

您可能感興趣的文章:
  • jquery.flot.js簡(jiǎn)單繪制折線圖用法示例
  • 詳解plotly.js 繪圖庫(kù)入門使用教程
  • JavaScript基礎(chǔ)——使用Canvas繪圖
  • RequireJS簡(jiǎn)易繪圖程序開發(fā)
  • 純JavaScript代碼實(shí)現(xiàn)移動(dòng)設(shè)備繪圖解鎖
  • JavaScript 繪圖代碼
  • 用JavaScript繪圖 ——JS2D函數(shù)集
  • JS繪圖Flot應(yīng)用圖形繪制異常解決方案

標(biāo)簽:長(zhǎng)治 河南 紅河 滄州 沈陽(yáng) 新疆 上海 樂(lè)山

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《用js繪圖》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266