| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // image smoothing | 61 // image smoothing |
| 62 [ImplementedAs=imageSmoothingEnabled, DeprecateAs=PrefixedImageSmoothingEnab
led] attribute boolean webkitImageSmoothingEnabled; | 62 [ImplementedAs=imageSmoothingEnabled, DeprecateAs=PrefixedImageSmoothingEnab
led] attribute boolean webkitImageSmoothingEnabled; |
| 63 [MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothing
Enabled; // (default True) | 63 [MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothing
Enabled; // (default True) |
| 64 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute ImageSmoothingQuality
imageSmoothingQuality; // (default "low") | 64 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute ImageSmoothingQuality
imageSmoothingQuality; // (default "low") |
| 65 | 65 |
| 66 // colors and styles (see also the CanvasDrawingStyles interface) | 66 // colors and styles (see also the CanvasDrawingStyles interface) |
| 67 attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (de
fault black) | 67 attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (de
fault black) |
| 68 attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (defa
ult black) | 68 attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (defa
ult black) |
| 69 CanvasGradient createLinearGradient(double x0, double y0, double x1, double
y1); | 69 CanvasGradient createLinearGradient(double x0, double y0, double x1, double
y1); |
| 70 [RaisesException] CanvasGradient createRadialGradient(double x0, double y0,
double r0, double x1, double y1, double r1); | 70 [RaisesException] CanvasGradient createRadialGradient(double x0, double y0,
double r0, double x1, double y1, double r1); |
| 71 [CallWith=ScriptState, RaisesException] CanvasPattern? createPattern(CanvasI
mageSource image, [TreatNullAs=NullString] DOMString repetitionType); | 71 [CallWith=ExecutionContext, RaisesException] CanvasPattern? createPattern(Ca
nvasImageSource image, [TreatNullAs=NullString] DOMString repetitionType); |
| 72 | 72 |
| 73 // shadows | 73 // shadows |
| 74 attribute unrestricted double shadowOffsetX; | 74 attribute unrestricted double shadowOffsetX; |
| 75 attribute unrestricted double shadowOffsetY; | 75 attribute unrestricted double shadowOffsetY; |
| 76 attribute unrestricted double shadowBlur; | 76 attribute unrestricted double shadowBlur; |
| 77 attribute DOMString shadowColor; | 77 attribute DOMString shadowColor; |
| 78 | 78 |
| 79 // rects | 79 // rects |
| 80 void clearRect(unrestricted double x, unrestricted double y, unrestricted do
uble width, unrestricted double height); | 80 void clearRect(unrestricted double x, unrestricted double y, unrestricted do
uble width, unrestricted double height); |
| 81 void fillRect(unrestricted double x, unrestricted double y, unrestricted dou
ble width, unrestricted double height); | 81 void fillRect(unrestricted double x, unrestricted double y, unrestricted dou
ble width, unrestricted double height); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 98 boolean isPointInPath(Path2D path, unrestricted double x, unrestricted doubl
e y, optional CanvasFillRule winding); | 98 boolean isPointInPath(Path2D path, unrestricted double x, unrestricted doubl
e y, optional CanvasFillRule winding); |
| 99 boolean isPointInStroke(unrestricted double x, unrestricted double y); | 99 boolean isPointInStroke(unrestricted double x, unrestricted double y); |
| 100 boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted dou
ble y); | 100 boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted dou
ble y); |
| 101 | 101 |
| 102 // text (see also the CanvasDrawingStyles interface) | 102 // text (see also the CanvasDrawingStyles interface) |
| 103 void fillText(DOMString text, unrestricted double x, unrestricted double y,
optional unrestricted double maxWidth); | 103 void fillText(DOMString text, unrestricted double x, unrestricted double y,
optional unrestricted double maxWidth); |
| 104 void strokeText(DOMString text, unrestricted double x, unrestricted double y
, optional unrestricted double maxWidth); | 104 void strokeText(DOMString text, unrestricted double x, unrestricted double y
, optional unrestricted double maxWidth); |
| 105 TextMetrics measureText(DOMString text); | 105 TextMetrics measureText(DOMString text); |
| 106 | 106 |
| 107 // drawing images | 107 // drawing images |
| 108 [RaisesException] void drawImage(CanvasImageSource image, unrestricted doubl
e x, unrestricted double y); | 108 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc
e image, unrestricted double x, unrestricted double y); |
| 109 [RaisesException] void drawImage(CanvasImageSource image, unrestricted doubl
e x, unrestricted double y, unrestricted double width, unrestricted double heigh
t); | 109 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc
e image, unrestricted double x, unrestricted double y, unrestricted double width
, unrestricted double height); |
| 110 [RaisesException] void drawImage(CanvasImageSource image, unrestricted doubl
e sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, un
restricted double dx, unrestricted double dy, unrestricted double dw, unrestrict
ed double dh); | 110 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc
e image, unrestricted double sx, unrestricted double sy, unrestricted double sw,
unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestr
icted double dw, unrestricted double dh); |
| 111 | 111 |
| 112 // hit regions | 112 // hit regions |
| 113 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void addHitRegi
on(optional HitRegionOptions options); | 113 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void addHitRegi
on(optional HitRegionOptions options); |
| 114 [RuntimeEnabled=ExperimentalCanvasFeatures] void removeHitRegion(DOMString i
d); | 114 [RuntimeEnabled=ExperimentalCanvasFeatures] void removeHitRegion(DOMString i
d); |
| 115 [RuntimeEnabled=ExperimentalCanvasFeatures] void clearHitRegions(); | 115 [RuntimeEnabled=ExperimentalCanvasFeatures] void clearHitRegions(); |
| 116 | 116 |
| 117 // pixel manipulation | 117 // pixel manipulation |
| 118 [RaisesException] ImageData createImageData(ImageData imagedata); | 118 [RaisesException] ImageData createImageData(ImageData imagedata); |
| 119 [RaisesException] ImageData createImageData(double sw, double sh); | 119 [RaisesException] ImageData createImageData(double sw, double sh); |
| 120 [RaisesException] ImageData getImageData(double sx, double sy, double sw, do
uble sh); | 120 [RaisesException] ImageData getImageData(double sx, double sy, double sw, do
uble sh); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 141 | 141 |
| 142 // text | 142 // text |
| 143 attribute DOMString font; // (default 10px sans-serif) | 143 attribute DOMString font; // (default 10px sans-serif) |
| 144 attribute DOMString textAlign; // "start", "end", "left", "right", "center"
(default: "start") | 144 attribute DOMString textAlign; // "start", "end", "left", "right", "center"
(default: "start") |
| 145 attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic
", "ideographic", "bottom" (default: "alphabetic") | 145 attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic
", "ideographic", "bottom" (default: "alphabetic") |
| 146 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString direction; /
/ "inherit", "rtl", "ltr" (default: "inherit") | 146 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString direction; /
/ "inherit", "rtl", "ltr" (default: "inherit") |
| 147 | 147 |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 CanvasRenderingContext2D implements CanvasPathMethods; | 150 CanvasRenderingContext2D implements CanvasPathMethods; |
| OLD | NEW |