| 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 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 enum CanvasWindingRule { "nonzero", "evenodd" }; | 26 enum CanvasWindingRule { "nonzero", "evenodd" }; |
| 27 | 27 |
| 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 [RuntimeEnabled=ExperimentalCanvasFeatures, Immutable] attribute SVGMatrix c
urrentTransform; |
| 33 void scale(float sx, float sy); | 34 void scale(float sx, float sy); |
| 34 void rotate(float angle); | 35 void rotate(float angle); |
| 35 void translate(float tx, float ty); | 36 void translate(float tx, float ty); |
| 36 void transform(float m11, float m12, float m21, float m22, float dx, float d
y); | 37 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); | 38 void setTransform(float m11, float m12, float m21, float m22, float dx, floa
t dy); |
| 38 void resetTransform(); | 39 void resetTransform(); |
| 39 | 40 |
| 40 attribute float globalAlpha; | 41 attribute float globalAlpha; |
| 41 [TreatNullAs=NullString] attribute DOMString globalCompositeOperation; | 42 [TreatNullAs=NullString] attribute DOMString globalCompositeOperation; |
| 42 | 43 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 122 |
| 122 [RaisesException] void drawImage(HTMLImageElement? image, float x, float y); | 123 [RaisesException] void drawImage(HTMLImageElement? image, float x, float y); |
| 123 [RaisesException] void drawImage(HTMLImageElement? image, float x, float y,
float width, float height); | 124 [RaisesException] void drawImage(HTMLImageElement? image, float x, float y,
float width, float height); |
| 124 [RaisesException] void drawImage(HTMLImageElement? image, float sx, float sy
, float sw, float sh, float dx, float dy, float dw, float dh); | 125 [RaisesException] void drawImage(HTMLImageElement? image, float sx, float sy
, float sw, float sh, float dx, float dy, float dw, float dh); |
| 125 [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y
); | 126 [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y
); |
| 126 [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y
, float width, float height); | 127 [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y
, float width, float height); |
| 127 [RaisesException] void drawImage(HTMLCanvasElement? canvas, float sx, float
sy, float sw, float sh, float dx, float dy, float dw, float dh); | 128 [RaisesException] void drawImage(HTMLCanvasElement? canvas, float sx, float
sy, float sw, float sh, float dx, float dy, float dw, float dh); |
| 128 [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y); | 129 [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y); |
| 129 [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y,
float width, float height); | 130 [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y,
float width, float height); |
| 130 [RaisesException] void drawImage(HTMLVideoElement? video, float sx, float sy
, float sw, float sh, float dx, float dy, float dw, float dh); | 131 [RaisesException] void drawImage(HTMLVideoElement? video, float sx, float sy
, float sw, float sh, float dx, float dy, float dw, float dh); |
| 131 [EnabledAtRuntime=ExperimentalCanvasFeatures, RaisesException] void drawImag
e(ImageBitmap? imageBitmap, float x, float y); | 132 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(
ImageBitmap? imageBitmap, float x, float y); |
| 132 [EnabledAtRuntime=ExperimentalCanvasFeatures, RaisesException] void drawImag
e(ImageBitmap? imageBitmap, float x, float y, float width, float height); | 133 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(
ImageBitmap? imageBitmap, float x, float y, float width, float height); |
| 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); | 134 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(
ImageBitmap? imageBitmap, float sx, float sy, float sw, float sh, float dx, floa
t dy, float dw, float dh); |
| 134 | 135 |
| 135 void drawImageFromRect(HTMLImageElement image, | 136 void drawImageFromRect(HTMLImageElement image, |
| 136 optional float sx, optional float sy, optional float
sw, optional float sh, | 137 optional float sx, optional float sy, optional float
sw, optional float sh, |
| 137 optional float dx, optional float dy, optional float
dw, optional float dh, | 138 optional float dx, optional float dy, optional float
dw, optional float dh, |
| 138 optional DOMString compositeOperation); | 139 optional DOMString compositeOperation); |
| 139 | 140 |
| 140 void setShadow(float width, float height, float blur, [StrictTypeChecking] o
ptional DOMString color, optional float alpha); | 141 void setShadow(float width, float height, float blur, [StrictTypeChecking] o
ptional DOMString color, optional float alpha); |
| 141 void setShadow(float width, float height, float blur, float grayLevel, optio
nal float alpha); | 142 void setShadow(float width, float height, float blur, float grayLevel, optio
nal float alpha); |
| 142 void setShadow(float width, float height, float blur, float r, float g, floa
t b, float a); | 143 void setShadow(float width, float height, float blur, float r, float g, floa
t b, float a); |
| 143 void setShadow(float width, float height, float blur, float c, float m, floa
t y, float k, float a); | 144 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... |
| 155 | 156 |
| 156 [Custom] attribute custom strokeStyle; | 157 [Custom] attribute custom strokeStyle; |
| 157 [Custom] attribute custom fillStyle; | 158 [Custom] attribute custom fillStyle; |
| 158 | 159 |
| 159 // pixel manipulation | 160 // pixel manipulation |
| 160 [RaisesException] ImageData getImageData(float sx, float sy, float sw, float
sh); | 161 [RaisesException] ImageData getImageData(float sx, float sy, float sw, float
sh); |
| 161 | 162 |
| 162 [RaisesException] ImageData webkitGetImageDataHD(float sx, float sy, float s
w, float sh); | 163 [RaisesException] ImageData webkitGetImageDataHD(float sx, float sy, float s
w, float sh); |
| 163 | 164 |
| 164 // Focus rings | 165 // Focus rings |
| 165 [EnabledAtRuntime=ExperimentalCanvasFeatures] void drawSystemFocusRing(Eleme
nt element); | 166 [RuntimeEnabled=ExperimentalCanvasFeatures] void drawSystemFocusRing(Element
element); |
| 166 [EnabledAtRuntime=ExperimentalCanvasFeatures] boolean drawCustomFocusRing(El
ement element); | 167 [RuntimeEnabled=ExperimentalCanvasFeatures] boolean drawCustomFocusRing(Elem
ent element); |
| 167 | 168 |
| 168 readonly attribute float webkitBackingStorePixelRatio; | 169 readonly attribute float webkitBackingStorePixelRatio; |
| 169 | 170 |
| 170 [ImplementedAs=imageSmoothingEnabled] attribute boolean webkitImageSmoothing
Enabled; | 171 [ImplementedAs=imageSmoothingEnabled] attribute boolean webkitImageSmoothing
Enabled; |
| 171 attribute boolean imageSmoothingEnabled; | 172 attribute boolean imageSmoothingEnabled; |
| 172 | 173 |
| 173 [EnabledAtRuntime=ExperimentalCanvasFeatures] Canvas2DContextAttributes getC
ontextAttributes(); | 174 Canvas2DContextAttributes getContextAttributes(); |
| 174 }; | 175 }; |
| 175 | 176 |
| OLD | NEW |