| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 void restore(); // pop state stack and restore state | 47 void restore(); // pop state stack and restore state |
| 48 | 48 |
| 49 // transformations (default transform is the identity matrix) | 49 // transformations (default transform is the identity matrix) |
| 50 void scale(unrestricted float x, unrestricted float y); | 50 void scale(unrestricted float x, unrestricted float y); |
| 51 void rotate(unrestricted float angle); | 51 void rotate(unrestricted float angle); |
| 52 void translate(unrestricted float x, unrestricted float y); | 52 void translate(unrestricted float x, unrestricted float y); |
| 53 void transform(unrestricted float a, unrestricted float b, unrestricted floa
t c, unrestricted float d, unrestricted float e, unrestricted float f); | 53 void transform(unrestricted float a, unrestricted float b, unrestricted floa
t c, unrestricted float d, unrestricted float e, unrestricted float f); |
| 54 void setTransform(unrestricted float a, unrestricted float b, unrestricted f
loat c, unrestricted float d, unrestricted float e, unrestricted float f); | 54 void setTransform(unrestricted float a, unrestricted float b, unrestricted f
loat c, unrestricted float d, unrestricted float e, unrestricted float f); |
| 55 void resetTransform(); | 55 void resetTransform(); |
| 56 | 56 |
| 57 // compositing | |
| 58 attribute unrestricted float globalAlpha; // (default 1.0) | |
| 59 [TreatNullAs=NullString] attribute DOMString globalCompositeOperation; // (d
efault source-over) | |
| 60 | |
| 61 // image smoothing | 57 // image smoothing |
| 62 [MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothing
Enabled; | 58 [MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothing
Enabled; |
| 63 | 59 |
| 64 // colors and styles (see also the CanvasDrawingStyles interface) | 60 // colors and styles (see also the CanvasDrawingStyles interface) |
| 65 // FIXME: Use union types when supported: http://crbug.com/372891 | 61 // FIXME: Use union types when supported: http://crbug.com/372891 |
| 66 [Custom] attribute object strokeStyle; // (default black) | 62 [Custom] attribute object strokeStyle; // (default black) |
| 67 [Custom] attribute object fillStyle; // (default black) | 63 [Custom] attribute object fillStyle; // (default black) |
| 68 CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1); | 64 CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1); |
| 69 [RaisesException] CanvasGradient createRadialGradient(float x0, float y0, fl
oat r0, float x1, float y1, float r1); | 65 [RaisesException] CanvasGradient createRadialGradient(float x0, float y0, fl
oat r0, float x1, float y1, float r1); |
| 70 [RaisesException] CanvasPattern createPattern(HTMLCanvasElement canvas, DOMS
tring? repetitionType); | 66 [RaisesException] CanvasPattern createPattern(HTMLCanvasElement canvas, DOMS
tring? repetitionType); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 attribute unrestricted float lineDashOffset; | 144 attribute unrestricted float lineDashOffset; |
| 149 | 145 |
| 150 // text | 146 // text |
| 151 attribute DOMString font; // (default 10px sans-serif) | 147 attribute DOMString font; // (default 10px sans-serif) |
| 152 attribute DOMString textAlign; // "start", "end", "left", "right", "center"
(default: "start") | 148 attribute DOMString textAlign; // "start", "end", "left", "right", "center"
(default: "start") |
| 153 attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic
", "ideographic", "bottom" (default: "alphabetic") | 149 attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic
", "ideographic", "bottom" (default: "alphabetic") |
| 154 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString direction; /
/ "inherit", "rtl", "ltr" (default: "inherit") | 150 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString direction; /
/ "inherit", "rtl", "ltr" (default: "inherit") |
| 155 | 151 |
| 156 // Non-standard APIs. Candidates for deprecation | 152 // Non-standard APIs. Candidates for deprecation |
| 157 // https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D | 153 // https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D |
| 158 [MeasureAs=CanvasRenderingContext2DSetAlpha] void setAlpha(unrestricted floa
t alpha); | |
| 159 [MeasureAs=CanvasRenderingContext2DSetCompositeOperation] void setCompositeO
peration(DOMString compositeOperation); | |
| 160 [MeasureAs=CanvasRenderingContext2DSetLineWidth] void setLineWidth(unrestric
ted float width); | 154 [MeasureAs=CanvasRenderingContext2DSetLineWidth] void setLineWidth(unrestric
ted float width); |
| 161 [MeasureAs=CanvasRenderingContext2DSetLineCap] void setLineCap(DOMString cap
); | 155 [MeasureAs=CanvasRenderingContext2DSetLineCap] void setLineCap(DOMString cap
); |
| 162 [MeasureAs=CanvasRenderingContext2DSetLineJoin] void setLineJoin(DOMString j
oin); | 156 [MeasureAs=CanvasRenderingContext2DSetLineJoin] void setLineJoin(DOMString j
oin); |
| 163 [MeasureAs=CanvasRenderingContext2DSetMiterLimit] void setMiterLimit(unrestr
icted float limit); | 157 [MeasureAs=CanvasRenderingContext2DSetMiterLimit] void setMiterLimit(unrestr
icted float limit); |
| 164 [MeasureAs=CanvasRenderingContext2DClearShadow] void clearShadow(); | 158 [MeasureAs=CanvasRenderingContext2DClearShadow] void clearShadow(); |
| 165 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(DOMSt
ring color, optional unrestricted float alpha); | 159 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(DOMSt
ring color, optional unrestricted float alpha); |
| 166 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float grayLevel, optional unrestricted float alpha); | 160 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float grayLevel, optional unrestricted float alpha); |
| 167 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float r, unrestricted float g, unrestricted float b, unrestricted float
a); | 161 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float r, unrestricted float g, unrestricted float b, unrestricted float
a); |
| 168 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float c, unrestricted float m, unrestricted float y, unrestricted float
k, unrestricted float a); | 162 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float c, unrestricted float m, unrestricted float y, unrestricted float
k, unrestricted float a); |
| 169 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(DOMString
color, optional unrestricted float alpha); | 163 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(DOMString
color, optional unrestricted float alpha); |
| 170 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float grayLevel, optional unrestricted float alpha); | 164 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float grayLevel, optional unrestricted float alpha); |
| 171 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float r, unrestricted float g, unrestricted float b, unrestricted float a); | 165 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float r, unrestricted float g, unrestricted float b, unrestricted float a); |
| 172 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float c, unrestricted float m, unrestricted float y, unrestricted float k, u
nrestricted float a); | 166 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float c, unrestricted float m, unrestricted float y, unrestricted float k, u
nrestricted float a); |
| 173 [MeasureAs=CanvasRenderingContext2DDrawImageFromRect] void drawImageFromRect
( | 167 [MeasureAs=CanvasRenderingContext2DDrawImageFromRect] void drawImageFromRect
( |
| 174 HTMLImageElement? image, optional unrestricted float sx, optional unrest
ricted float sy, optional unrestricted float sw, optional unrestricted float sh, | 168 HTMLImageElement? image, optional unrestricted float sx, optional unrest
ricted float sy, optional unrestricted float sw, optional unrestricted float sh, |
| 175 optional unrestricted float dx, optional unrestricted float dy, optional
unrestricted float dw, optional unrestricted float dh, optional DOMString compo
siteOperation); | 169 optional unrestricted float dx, optional unrestricted float dy, optional
unrestricted float dw, optional unrestricted float dh, optional DOMString compo
siteOperation); |
| 176 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, optional DOMStrin
g color, optional unrestricted float alpha); | 170 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, optional DOMStrin
g color, optional unrestricted float alpha); |
| 177 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t grayLevel, optional unrestricted float alpha); | 171 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t grayLevel, optional unrestricted float alpha); |
| 178 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t r, unrestricted float g, unrestricted float b, unrestricted float a); | 172 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t r, unrestricted float g, unrestricted float b, unrestricted float a); |
| 179 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t c, unrestricted float m, unrestricted float y, unrestricted float k, unrestric
ted float a); | 173 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t c, unrestricted float m, unrestricted float y, unrestricted float k, unrestric
ted float a); |
| 180 }; | 174 }; |
| 181 | 175 |
| 182 CanvasRenderingContext2D implements CanvasPathMethods; | 176 CanvasRenderingContext2D implements CanvasPathMethods; |
| OLD | NEW |