| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 interface CanvasRenderingContext2D : CanvasRenderingContext { | 28 interface CanvasRenderingContext2D : CanvasRenderingContext { |
| 29 | 29 |
| 30 void save(); | 30 void save(); |
| 31 void restore(); | 31 void restore(); |
| 32 | 32 |
| 33 void scale(float sx, float sy); | 33 void scale(float sx, float sy); |
| 34 void rotate(float angle); | 34 void rotate(float angle); |
| 35 void translate(float tx, float ty); | 35 void translate(float tx, float ty); |
| 36 void transform(float m11, float m12, float m21, float m22, float dx, float d
y); | 36 void transform(float m11, float m12, float m21, float m22, float dx, float d
y); |
| 37 void setTransform(float m11, float m12, float m21, float m22, float dx, floa
t dy); | 37 void setTransform(float m11, float m12, float m21, float m22, float dx, floa
t dy); |
| 38 void resetTransform(); |
| 38 | 39 |
| 39 attribute float globalAlpha; | 40 attribute float globalAlpha; |
| 40 [TreatNullAs=NullString] attribute DOMString globalCompositeOperation; | 41 [TreatNullAs=NullString] attribute DOMString globalCompositeOperation; |
| 41 | 42 |
| 42 [RaisesException] CanvasGradient createLinearGradient(float x0, float y0, fl
oat x1, float y1); | 43 [RaisesException] CanvasGradient createLinearGradient(float x0, float y0, fl
oat x1, float y1); |
| 43 [RaisesException] CanvasGradient createRadialGradient(float x0, float y0, fl
oat r0, float x1, float y1, float r1); | 44 [RaisesException] CanvasGradient createRadialGradient(float x0, float y0, fl
oat r0, float x1, float y1, float r1); |
| 44 | 45 |
| 45 attribute float lineWidth; | 46 attribute float lineWidth; |
| 46 [TreatNullAs=NullString] attribute DOMString lineCap; | 47 [TreatNullAs=NullString] attribute DOMString lineCap; |
| 47 [TreatNullAs=NullString] attribute DOMString lineJoin; | 48 [TreatNullAs=NullString] attribute DOMString lineJoin; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 69 | 70 |
| 70 // FIXME: These methods should be shared with CanvasRenderingContext2D in th
e CanvasPathMethods interface. | 71 // FIXME: These methods should be shared with CanvasRenderingContext2D in th
e CanvasPathMethods interface. |
| 71 void closePath(); | 72 void closePath(); |
| 72 void moveTo(float x, float y); | 73 void moveTo(float x, float y); |
| 73 void lineTo(float x, float y); | 74 void lineTo(float x, float y); |
| 74 void quadraticCurveTo(float cpx, float cpy, float x, float y); | 75 void quadraticCurveTo(float cpx, float cpy, float x, float y); |
| 75 void bezierCurveTo(float cp1x, float cp1y, float cp2x, float cp2y, float x,
float y); | 76 void bezierCurveTo(float cp1x, float cp1y, float cp2x, float cp2y, float x,
float y); |
| 76 [RaisesException] void arcTo(float x1, float y1, float x2, float y2, float r
adius); | 77 [RaisesException] void arcTo(float x1, float y1, float x2, float y2, float r
adius); |
| 77 void rect(float x, float y, float width, float height); | 78 void rect(float x, float y, float width, float height); |
| 78 [RaisesException] void arc(float x, float y, float radius, float startAngle,
float endAngle, [Default=Undefined] optional boolean anticlockwise); | 79 [RaisesException] void arc(float x, float y, float radius, float startAngle,
float endAngle, [Default=Undefined] optional boolean anticlockwise); |
| 80 [RaisesException] void ellipse(float x, float y, float radiusX, float radius
Y, float rotation, float startAngle, float endAngle, boolean anticlockwise); |
| 79 | 81 |
| 80 void fill(optional CanvasWindingRule winding); | 82 void fill(optional CanvasWindingRule winding); |
| 81 void stroke(); | 83 void stroke(); |
| 82 void clip(optional CanvasWindingRule winding); | 84 void clip(optional CanvasWindingRule winding); |
| 83 boolean isPointInPath(float x, float y, optional CanvasWindingRule winding); | 85 boolean isPointInPath(float x, float y, optional CanvasWindingRule winding); |
| 84 boolean isPointInStroke(float x, float y); | 86 boolean isPointInStroke(float x, float y); |
| 85 | 87 |
| 86 // text | 88 // text |
| 87 attribute DOMString font; | 89 attribute DOMString font; |
| 88 attribute DOMString textAlign; | 90 attribute DOMString textAlign; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 119 | 121 |
| 120 [RaisesException] void drawImage(HTMLImageElement? image, float x, float y); | 122 [RaisesException] void drawImage(HTMLImageElement? image, float x, float y); |
| 121 [RaisesException] void drawImage(HTMLImageElement? image, float x, float y,
float width, float height); | 123 [RaisesException] void drawImage(HTMLImageElement? image, float x, float y,
float width, float height); |
| 122 [RaisesException] void drawImage(HTMLImageElement? image, float sx, float sy
, float sw, float sh, float dx, float dy, float dw, float dh); | 124 [RaisesException] void drawImage(HTMLImageElement? image, float sx, float sy
, float sw, float sh, float dx, float dy, float dw, float dh); |
| 123 [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y
); | 125 [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y
); |
| 124 [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y
, float width, float height); | 126 [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y
, float width, float height); |
| 125 [RaisesException] void drawImage(HTMLCanvasElement? canvas, float sx, float
sy, float sw, float sh, float dx, float dy, float dw, float dh); | 127 [RaisesException] void drawImage(HTMLCanvasElement? canvas, float sx, float
sy, float sw, float sh, float dx, float dy, float dw, float dh); |
| 126 [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y); | 128 [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y); |
| 127 [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y,
float width, float height); | 129 [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y,
float width, float height); |
| 128 [RaisesException] void drawImage(HTMLVideoElement? video, float sx, float sy
, float sw, float sh, float dx, float dy, float dw, float dh); | 130 [RaisesException] void drawImage(HTMLVideoElement? video, float sx, float sy
, float sw, float sh, float dx, float dy, float dw, float dh); |
| 129 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void drawImag
e(ImageBitmap? imageBitmap, float x, float y); | 131 [EnabledAtRuntime=ExperimentalCanvasFeatures, RaisesException] void drawImag
e(ImageBitmap? imageBitmap, float x, float y); |
| 130 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void drawImag
e(ImageBitmap? imageBitmap, float x, float y, float width, float height); | 132 [EnabledAtRuntime=ExperimentalCanvasFeatures, RaisesException] void drawImag
e(ImageBitmap? imageBitmap, float x, float y, float width, float height); |
| 131 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void drawImag
e(ImageBitmap? imageBitmap, float sx, float sy, float sw, float sh, float dx, fl
oat dy, float dw, float dh); | 133 [EnabledAtRuntime=ExperimentalCanvasFeatures, RaisesException] void drawImag
e(ImageBitmap? imageBitmap, float sx, float sy, float sw, float sh, float dx, fl
oat dy, float dw, float dh); |
| 132 | 134 |
| 133 void drawImageFromRect(HTMLImageElement image, | 135 void drawImageFromRect(HTMLImageElement image, |
| 134 optional float sx, optional float sy, optional float
sw, optional float sh, | 136 optional float sx, optional float sy, optional float
sw, optional float sh, |
| 135 optional float dx, optional float dy, optional float
dw, optional float dh, | 137 optional float dx, optional float dy, optional float
dw, optional float dh, |
| 136 optional DOMString compositeOperation); | 138 optional DOMString compositeOperation); |
| 137 | 139 |
| 138 void setShadow(float width, float height, float blur, [StrictTypeChecking] o
ptional DOMString color, optional float alpha); | 140 void setShadow(float width, float height, float blur, [StrictTypeChecking] o
ptional DOMString color, optional float alpha); |
| 139 void setShadow(float width, float height, float blur, float grayLevel, optio
nal float alpha); | 141 void setShadow(float width, float height, float blur, float grayLevel, optio
nal float alpha); |
| 140 void setShadow(float width, float height, float blur, float r, float g, floa
t b, float a); | 142 void setShadow(float width, float height, float blur, float r, float g, floa
t b, float a); |
| 141 void setShadow(float width, float height, float blur, float c, float m, floa
t y, float k, float a); | 143 void setShadow(float width, float height, float blur, float c, float m, floa
t y, float k, float a); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 153 | 155 |
| 154 [Custom] attribute custom strokeStyle; | 156 [Custom] attribute custom strokeStyle; |
| 155 [Custom] attribute custom fillStyle; | 157 [Custom] attribute custom fillStyle; |
| 156 | 158 |
| 157 // pixel manipulation | 159 // pixel manipulation |
| 158 [RaisesException] ImageData getImageData(float sx, float sy, float sw, float
sh); | 160 [RaisesException] ImageData getImageData(float sx, float sy, float sw, float
sh); |
| 159 | 161 |
| 160 [RaisesException] ImageData webkitGetImageDataHD(float sx, float sy, float s
w, float sh); | 162 [RaisesException] ImageData webkitGetImageDataHD(float sx, float sy, float s
w, float sh); |
| 161 | 163 |
| 162 // Focus rings | 164 // Focus rings |
| 163 [EnabledAtRuntime=experimentalCanvasFeatures] void drawSystemFocusRing(Eleme
nt element); | 165 [EnabledAtRuntime=ExperimentalCanvasFeatures] void drawSystemFocusRing(Eleme
nt element); |
| 164 [EnabledAtRuntime=experimentalCanvasFeatures] boolean drawCustomFocusRing(El
ement element); | 166 [EnabledAtRuntime=ExperimentalCanvasFeatures] boolean drawCustomFocusRing(El
ement element); |
| 165 | 167 |
| 166 readonly attribute float webkitBackingStorePixelRatio; | 168 readonly attribute float webkitBackingStorePixelRatio; |
| 167 | 169 |
| 168 [ImplementedAs=imageSmoothingEnabled] attribute boolean webkitImageSmoothing
Enabled; | 170 [ImplementedAs=imageSmoothingEnabled] attribute boolean webkitImageSmoothing
Enabled; |
| 169 attribute boolean imageSmoothingEnabled; | 171 attribute boolean imageSmoothingEnabled; |
| 170 | 172 |
| 171 [EnabledAtRuntime=experimentalCanvasFeatures] Canvas2DContextAttributes getC
ontextAttributes(); | 173 [EnabledAtRuntime=ExperimentalCanvasFeatures] Canvas2DContextAttributes getC
ontextAttributes(); |
| 172 }; | 174 }; |
| 173 | 175 |
| OLD | NEW |