| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 [RaisesException] void drawImage(CanvasImageSource image, unrestricted float
x, unrestricted float y); | 109 [RaisesException] void drawImage(CanvasImageSource image, unrestricted float
x, unrestricted float y); |
| 110 [RaisesException] void drawImage(CanvasImageSource image, unrestricted float
x, unrestricted float y, unrestricted float width, unrestricted float height); | 110 [RaisesException] void drawImage(CanvasImageSource image, unrestricted float
x, unrestricted float y, unrestricted float width, unrestricted float height); |
| 111 [RaisesException] void drawImage(CanvasImageSource image, unrestricted float
sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrest
ricted float dx, unrestricted float dy, unrestricted float dw, unrestricted floa
t dh); | 111 [RaisesException] void drawImage(CanvasImageSource image, unrestricted float
sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrest
ricted float dx, unrestricted float dy, unrestricted float dw, unrestricted floa
t dh); |
| 112 | 112 |
| 113 // hit regions | 113 // hit regions |
| 114 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void addHitRegi
on(optional HitRegionOptions options); | 114 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void addHitRegi
on(optional HitRegionOptions options); |
| 115 [RuntimeEnabled=ExperimentalCanvasFeatures] void removeHitRegion(DOMString i
d); | 115 [RuntimeEnabled=ExperimentalCanvasFeatures] void removeHitRegion(DOMString i
d); |
| 116 [RuntimeEnabled=ExperimentalCanvasFeatures] void clearHitRegions(); | 116 [RuntimeEnabled=ExperimentalCanvasFeatures] void clearHitRegions(); |
| 117 | 117 |
| 118 // pixel manipulation | 118 // pixel manipulation |
| 119 ImageData createImageData(ImageData imagedata); | 119 [RaisesException] ImageData createImageData(ImageData imagedata); |
| 120 [RaisesException] ImageData createImageData(float sw, float sh); | 120 [RaisesException] ImageData createImageData(float sw, float sh); |
| 121 [RaisesException] ImageData getImageData(float sx, float sy, float sw, float
sh); | 121 [RaisesException] ImageData getImageData(float sx, float sy, float sw, float
sh); |
| 122 void putImageData(ImageData imagedata, float dx, float dy); | 122 void putImageData(ImageData imagedata, float dx, float dy); |
| 123 void putImageData(ImageData imagedata, float dx, float dy, float dirtyX, flo
at dirtyY, float dirtyWidth, float dirtyHeight); | 123 void putImageData(ImageData imagedata, float dx, float dy, float dirtyX, flo
at dirtyY, float dirtyWidth, float dirtyHeight); |
| 124 | 124 |
| 125 // Context state | 125 // Context state |
| 126 // Should be merged with WebGL counterpart in CanvasRenderingContext, once n
o-longer experimental | 126 // Should be merged with WebGL counterpart in CanvasRenderingContext, once n
o-longer experimental |
| 127 [RuntimeEnabled=ExperimentalCanvasFeatures] boolean isContextLost(); | 127 [RuntimeEnabled=ExperimentalCanvasFeatures] boolean isContextLost(); |
| 128 | 128 |
| 129 Canvas2DContextAttributes getContextAttributes(); | 129 Canvas2DContextAttributes getContextAttributes(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 142 | 142 |
| 143 // text | 143 // text |
| 144 attribute DOMString font; // (default 10px sans-serif) | 144 attribute DOMString font; // (default 10px sans-serif) |
| 145 attribute DOMString textAlign; // "start", "end", "left", "right", "center"
(default: "start") | 145 attribute DOMString textAlign; // "start", "end", "left", "right", "center"
(default: "start") |
| 146 attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic
", "ideographic", "bottom" (default: "alphabetic") | 146 attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic
", "ideographic", "bottom" (default: "alphabetic") |
| 147 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString direction; /
/ "inherit", "rtl", "ltr" (default: "inherit") | 147 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString direction; /
/ "inherit", "rtl", "ltr" (default: "inherit") |
| 148 | 148 |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 CanvasRenderingContext2D implements CanvasPathMethods; | 151 CanvasRenderingContext2D implements CanvasPathMethods; |
| OLD | NEW |