Use JSP drawing to choose

Source: Internet
Author: User
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!










Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.