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
00084 void save();
00085
00098 void restore();
00099
00127 void scale(in float sx, in float sy);
00128
00151 void rotate(in float angle);
00152
00177 void translate(in float tx, in float ty);
00178
00187 attribute float globalAlpha;
00188
00239 attribute [ConvertNullToNullString] DOMString globalCompositeOperation;
00240
00253 CanvasGradient createLinearGradient(in float x0, in float y0, in float x1, in float y1);
00254
00269 CanvasGradient createRadialGradient(in float x0, in float y0, in float r0, in float x1, in float y1, in float r1);
00270
00278 attribute float lineWidth;
00279
00285 attribute [ConvertNullToNullString] DOMString lineCap;
00286
00292 attribute [ConvertNullToNullString] DOMString lineJoin;
00293
00301 attribute float miterLimit;
00302
00307 attribute float shadowOffsetX;
00308
00313 attribute float shadowOffsetY;
00314
00319 attribute float shadowBlur;
00320
00334 attribute [ConvertNullToNullString] DOMString shadowColor;
00335
00342 void clearRect(in float x, in float y, in float width, in float height)
00343 raises (DOMException);
00344
00352 void fillRect(in float x, in float y, in float width, in float height)
00353 raises (DOMException);
00354
00374 void beginPath();
00375
00385 void closePath();
00386
00407 void moveTo(in float x, in float y);
00408
00419 void lineTo(in float x, in float y);
00420
00430 void quadraticCurveTo(in float cpx, in float cpy, in float x, in float y);
00431
00444 void bezierCurveTo(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y);
00445
00459 void arcTo(in float x1, in float y1, in float x2, in float y2, in float radius)
00460 raises (DOMException);
00461
00466 void rect(in float x, in float y, in float width, in float height)
00467 raises (DOMException);
00468
00485 void arc(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean clockwise)
00486 raises (DOMException);
00487
00505 void fill();
00506
00522 void stroke();
00523
00539 void clip();
00540
00541
00542
00543 void setAlpha(in float alpha);
00544 void setCompositeOperation(in DOMString compositeOperation);
00545
00546 void setLineWidth(in float width);
00547 void setLineCap(in DOMString cap);
00548 void setLineJoin(in DOMString join);
00549 void setMiterLimit(in float limit);
00550
00551 void clearShadow();
00552
00553 [Custom] void setStrokeColor();
00554 [Custom] void setFillColor();
00555
00574 [Custom] void strokeRect();
00575
00598 [Custom] void drawImage();
00599
00601 [Custom] void drawImageFromRect();
00602
00603 [Custom] void setShadow();
00604
00625 [Custom] void createPattern();
00626
00645 attribute [Custom] custom strokeStyle;
00646
00667 attribute [Custom] custom fillStyle;
00668
00669 };
00670
00671 }
00672