CanvasRenderingContext2D.idl [plain text]
module html {
interface CanvasRenderingContext2D {
readonly attribute HTMLCanvasElement canvas;
void save();
void restore();
void scale(in float sx, in float sy);
void rotate(in float angle);
void translate(in float tx, in float ty);
attribute float globalAlpha;
attribute DOMString globalCompositeOperation;
CanvasGradient createLinearGradient(in float x0, in float y0, in float x1, in float y1);
CanvasGradient createRadialGradient(in float x0, in float y0, in float r0, in float x1, in float y1, in float r1);
attribute float lineWidth;
attribute DOMString lineCap;
attribute DOMString lineJoin;
attribute float miterLimit;
attribute float shadowOffsetX;
attribute float shadowOffsetY;
attribute float shadowBlur;
attribute DOMString shadowColor;
void clearRect(in float x, in float y, in float width, in float height)
raises (DOMException);
void fillRect(in float x, in float y, in float width, in float height)
raises (DOMException);
void beginPath();
void closePath();
void moveTo(in float x, in float y);
void lineTo(in float x, in float y);
void quadraticCurveTo(in float cpx, in float cpy, in float x, in float y);
void bezierCurveTo(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y);
void arcTo(in float x1, in float y1, in float x2, in float y2, in float radius)
raises (DOMException);
void rect(in float x, in float y, in float width, in float height)
raises (DOMException);
void arc(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean clockwise)
raises (DOMException);
void fill();
void stroke();
void clip();
void setAlpha(in float alpha);
void setCompositeOperation(in DOMString compositeOperation);
void setLineWidth(in float width);
void setLineCap(in DOMString cap);
void setLineJoin(in DOMString join);
void setMiterLimit(in float limit);
void clearShadow();
[Custom] void setStrokeColor();
[Custom] void setFillColor();
[Custom] void strokeRect();
[Custom] void drawImage();
[Custom] void drawImageFromRect();
[Custom] void setShadow();
[Custom] void createPattern();
attribute [Custom] custom strokeStyle;
attribute [Custom] custom fillStyle;
};
}