Js
<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=" drawing instruction 1 ">
<param Name= "line0002" value= "Drawing instruction 2" >
...
</object>
Drawing instruction Category:
(i) Common Shapes
1. The rectangular class//rotation is the rotation angle of degrees as a unit
Rect (x, y, width, height, rotation)/ /Rectangle
Oval (x, y, width, height, rotation)//Ellipse
RoundRect (x, y, width, height, arcwidth, archeight, rotation)
2. Arc Class
Arc (x, y, width, height, startangle, arcangle, rotation)//ARC
Pie (x, y, width, height, startangle, Arcangl E, rotation)//pie chart
3. Polygon Class
Polygon (npoints, x1, y1, x2, y2, [X3, Y3, ... ...], rotation)//closed
Polyline (npoints, x1, y1, x2, y2, [xn, yn, ...], rotation)//not closed
(ii) Effect function
1. Line Effect
Setlinecolor (R, G, b)//Set Line Color
Setlines Tyle (Style)//style= (1: Solid line; 2: dashed; 0: Hidden)
2. Fill effect
Setfillcolor (R, G, B, Backr, BACKG, backb)
Setfillstyle (sTyle)//style= (1: solid; 2: transparent; 3:-;4:|;5:\;6:/;7:+;8:x)
(c) Text output function
SetFont (' font ', width,height,r,g,b)//Set Font
Text (' text content to output ', x,y,z)/output text
control function//definition <object> use in <script></script>.
Reference format: Directdraw.functionname ()
Rotate (x-rotation, y-rotation, z-rotation)//Rotate
Scale (X-scale,y-scale,z-scale)//Zoom
Translate (x-coordinate,y-coordinate,z-coordinate)//Pan
Setidentity ()//recovery
Clear ()//purge, no recovery after removal!