00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 module html {
00027
00028 interface CanvasRenderingContext2D {
00029
00030
00031
00032 readonly attribute HTMLCanvasElement canvas;
00033
00034 void save();
00035 void restore();
00036
00037 void scale(in float sx, in float sy);
00038 void rotate(in float angle);
00039 void translate(in float tx, in float ty);
00040
00041 attribute float globalAlpha;
00042 attribute DOMString globalCompositeOperation;
00043
00044 CanvasGradient createLinearGradient(in float x0, in float y0, in float x1, in float y1);
00045 CanvasGradient createRadialGradient(in float x0, in float y0, in float r0, in float x1, in float y1, in float r1);
00046
00047 attribute float lineWidth;
00048 attribute DOMString lineCap;
00049 attribute DOMString lineJoin;
00050 attribute float miterLimit;
00051
00052 attribute float shadowOffsetX;
00053 attribute float shadowOffsetY;
00054 attribute float shadowBlur;
00055 attribute DOMString shadowColor;
00056
00057 void clearRect(in float x, in float y, in float width, in float height)
00058 raises (DOMException);
00059 void fillRect(in float x, in float y, in float width, in float height)
00060 raises (DOMException);
00061
00062 void beginPath();
00063 void closePath();
00064 void moveTo(in float x, in float y);
00065 void lineTo(in float x, in float y);
00066 void quadraticCurveTo(in float cpx, in float cpy, in float x, in float y);
00067 void bezierCurveTo(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y);
00068 void arcTo(in float x1, in float y1, in float x2, in float y2, in float radius)
00069 raises (DOMException);
00070 void rect(in float x, in float y, in float width, in float height)
00071 raises (DOMException);
00072 void arc(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean clockwise)
00073 raises (DOMException);
00074 void fill();
00075 void stroke();
00076 void clip();
00077
00078
00079
00080 void setAlpha(in float alpha);
00081 void setCompositeOperation(in DOMString compositeOperation);
00082
00083 void setLineWidth(in float width);
00084 void setLineCap(in DOMString cap);
00085 void setLineJoin(in DOMString join);
00086 void setMiterLimit(in float limit);
00087
00088 void clearShadow();
00089
00090 [Custom] void setStrokeColor();
00091 [Custom] void setFillColor();
00092 [Custom] void strokeRect();
00093 [Custom] void drawImage();
00094 [Custom] void drawImageFromRect();
00095 [Custom] void setShadow();
00096 [Custom] void createPattern();
00097
00098 attribute [Custom] custom strokeStyle;
00099 attribute [Custom] custom fillStyle;
00100 };
00101
00102 }
00103