国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JSP > 正文

用js繪圖的詳細教程

2024-09-05 00:18:04
字體:
來源:轉載
供稿:網友

  今天小編給大家分享一篇用js繪圖的詳細教程,感興趣的朋友跟小編一起來了解一下吧!

  

  classid="CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6"

  style="positiion:absolute;top:0;left:0;width:320;height:200"

  >

  

  

  ...

  

  繪圖指令分類:

  (一)常見形狀

  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) //輸出文字

  控制函數 //定義后在里使用。

  引用格式: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() //清除,清除后無法恢復!

  以上就是用js繪圖的詳細教程,想必都了解了吧,更多相關內容請繼續關注錯新技術頻道。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 唐山市| 湘西| 涞水县| 惠安县| 万源市| 班玛县| 合川市| 哈巴河县| 洛南县| 邢台市| 晋中市| 镇宁| 临城县| 广东省| 沁阳市| 凤台县| 罗城| 莲花县| 义马市| 蓬溪县| 蓬安县| 天水市| 彭水| 新沂市| 武穴市| 广南县| SHOW| 温泉县| 乐都县| 米林县| 白山市| 五华县| 嘉荫县| 阿尔山市| 云霄县| 平安县| 裕民县| 西吉县| 巨鹿县| 东乡| 南投市|