<Object id = DirectDraw
Classid = "CLSID: 2017303c2-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 classification:
(1) Common shapes
1. Rectangle type // rotation is the rotation angle in degrees
Rect (x, y, width, height, rotation) // rectangle
Oval (x, y, width, height, rotation) // elliptic
RoundRect (x, y, width, height, arcWidth, arcHeight, rotation)
2. Arc Type
Arc (x, y, width, height, startAngle, arcAngle, rotation) // Arc
Pie (x, y, width, height, startAngle, arcAngle, rotation) // Pie chart
3. Polygon
Polygon (nPoints, x1, y1, x2, y2, [x3, y3,...], rotation) // close
Polyline (nPoints, x1, y1, x2, y2, [xn, yn,...], rotation) // not closed
(2) Performance Functions
1. Line Effect
SetLineColor (r, g, B) // you can specify the baseline color.
SetLineStyle (style) // style = (1: solid line; 2: dotted line; 0: hidden)
2. Filling Effect
SetFillColor (r, g, B, backr, backg, backb)
SetFillStyle (style) // style = (1: solid; 2: transparent; 3:-; 4: |; 5: \; 6:/; 7: +; 8: x)
(3) text output functions
SetFont ('font', width, height, r, g, B) // set the font
Text ('text content to output', x, y, z) // output Text
Control functions // define <object> and use them in <script> </script>.
Reference format: DirectDraw. FunctionName ()
Rotate (x-rotation, y-rotation, z-rotation) // rotate
Scale (x-scale, y-scale, z-scale) // scale
Translate (x-coordinate, y-coordinate, z-coordinate) // translate
SetIdentity () // restore
Clear () // clear. It cannot be restored after being cleared!