Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 13726010: Rename context2d to context2D. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/canvas_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index ea497a44f8ba15e6248e94a698c5448186499e31..bf88f41528ecda771b89b93db07611b91166dac1 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -1137,7 +1137,7 @@ class CanvasElement extends _Element_Merged implements CanvasImageSource {
* Example usage:
*
* CanvasElement canvas = new CanvasElement();
- * var ctx = canvas.context2d
+ * var ctx = canvas.context2D
* ..fillStyle = "rgb(200,0,0)"
* ..fillRect(10, 10, 55, 50);
* var dataUrl = canvas.toDataURL("image/jpeg", 0.95);
@@ -1162,7 +1162,11 @@ class CanvasElement extends _Element_Merged implements CanvasImageSource {
@DocsEditable
String toDataUrl(String type, [num quality]) native "HTMLCanvasElement_toDataURL_Callback";
- CanvasRenderingContext2D get context2d => getContext('2d');
+ /** An API for drawing on this canvas. */
+ CanvasRenderingContext2D get context2D => getContext('2d');
+
+ @deprecated
+ CanvasRenderingContext2D get context2d => this.context2D;
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@@ -1202,7 +1206,7 @@ class CanvasElement extends _Element_Merged implements CanvasImageSource {
* Example usage:
*
* var canvas = new CanvasElement(width: 600, height: 600);
- * var ctx = canvas.context2d;
+ * var ctx = canvas.context2D;
* ctx.clearRect(0, 0, 600, 600);
* ctx.save();
* // Create radial gradient.
@@ -1256,7 +1260,7 @@ class CanvasGradient extends NativeFieldWrapperClass1 {
* Example usage:
*
* var canvas = new CanvasElement(width: 600, height: 600);
- * var ctx = canvas.context2d;
+ * var ctx = canvas.context2D;
* var img = new ImageElement();
* // Image src needs to be loaded before pattern is applied.
* img.onLoad.listen((event) {
@@ -1871,7 +1875,7 @@ class CanvasRenderingContext2D extends CanvasRenderingContext {
* will allow, the image will be clipped to fit the available space.
*
* CanvasElement canvas = new CanvasElement(width: 600, height: 600);
- * CanvasRenderingContext2D ctx = canvas.context2d;
+ * CanvasRenderingContext2D ctx = canvas.context2D;
* ImageElement img = document.query('img');
* img.width = 100;
* img.height = 100;
@@ -1929,7 +1933,7 @@ class CanvasRenderingContext2D extends CanvasRenderingContext {
* available space.
*
* CanvasElement canvas = new CanvasElement(width: 600, height: 600);
- * CanvasRenderingContext2D ctx = canvas.context2d;
+ * CanvasRenderingContext2D ctx = canvas.context2D;
* ImageElement img = document.query('img');
*
* ctx.drawImage(img, 100, 100);
@@ -1965,7 +1969,7 @@ class CanvasRenderingContext2D extends CanvasRenderingContext {
* will allow, the image will be clipped to fit the available space.
*
* CanvasElement canvas = new CanvasElement(width: 600, height: 600);
- * CanvasRenderingContext2D ctx = canvas.context2d;
+ * CanvasRenderingContext2D ctx = canvas.context2D;
* ImageElement img = document.query('img');
* img.width = 100;
* img.height = 100;
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/canvas_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698