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

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

Side-by-side diff isn't available for this file because of its large size.
Issue 10983052: Revert "Replacing non-portable CanvasRenderingContext.setFillColor with more portable variants." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | « lib/html/dart2js/html_dart2js.dart ('k') | lib/html/scripts/htmlrenamer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dartium/html_dartium.dart
diff --git a/lib/html/dartium/html_dartium.dart b/lib/html/dartium/html_dartium.dart
index 9d86463db96589133c570e5468403a7bfa851ed7..8de8b57125e4558f2aac7b6c7e153699992bd369 100644
--- a/lib/html/dartium/html_dartium.dart
+++ b/lib/html/dartium/html_dartium.dart
@@ -8221,6 +8221,9 @@ abstract class CanvasRenderingContext2D implements CanvasRenderingContext {
/** @domName CanvasRenderingContext2D.setCompositeOperation */
void setCompositeOperation(String compositeOperation);
+ /** @domName CanvasRenderingContext2D.setFillColor */
+ void setFillColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
+
/** @domName CanvasRenderingContext2D.setLineCap */
void setLineCap(String cap);
@@ -8236,6 +8239,9 @@ abstract class CanvasRenderingContext2D implements CanvasRenderingContext {
/** @domName CanvasRenderingContext2D.setShadow */
void setShadow(num width, num height, num blur, [c_OR_color_OR_grayLevel_OR_r, num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
+ /** @domName CanvasRenderingContext2D.setStrokeColor */
+ void setStrokeColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
+
/** @domName CanvasRenderingContext2D.setTransform */
void setTransform(num m11, num m12, num m21, num m22, num dx, num dy);
@@ -8259,40 +8265,13 @@ abstract class CanvasRenderingContext2D implements CanvasRenderingContext {
/** @domName CanvasRenderingContext2D.webkitPutImageDataHD */
void webkitPutImageDataHD(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]);
-
-
- /**
- * Sets the color used inside shapes.
- * [r], [g], [b] are 0-255, [a] is 0-1.
- */
- void setFillColorRgb(int r, int g, int b, [double a]);
-
- /**
- * Sets the color used inside shapes.
- * [h] is in degrees, 0-360.
- * [s], [l] are in percent, 0-100.
- * [a] is 0-1.
- */
- void setFillColorHsl(int h, double s, double l, [double a]);
-
- /**
- * Sets the color used for stroking shapes.
- * [r], [g], [b] are 0-255, [a] is 0-1.
- */
- void setStrokeColorRgb(int r, int g, int b, [double a]);
-
- /**
- * Sets the color used for stroking shapes.
- * [h] is in degrees, 0-360.
- * [s], [l] are in percent, 0-100.
- * [a] is 0-1.
- */
- void setStrokeColorHsl(int h, double s, double l, [double a]);
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// WARNING: Do not edit - generated code.
+
class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implements CanvasRenderingContext2D {
Dynamic get fillStyle native "CanvasRenderingContext2D_fillStyle_Getter";
@@ -8593,6 +8572,46 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
void setCompositeOperation(String compositeOperation) native "CanvasRenderingContext2D_setCompositeOperation_Callback";
+ void setFillColor(c_OR_color_OR_grayLevel_OR_r, [alpha_OR_g_OR_m, b_OR_y, a_OR_k, a]) {
+ if ((c_OR_color_OR_grayLevel_OR_r is String || c_OR_color_OR_grayLevel_OR_r === null) && !?alpha_OR_g_OR_m && !?b_OR_y && !?a_OR_k && !?a) {
+ _setFillColor_1(c_OR_color_OR_grayLevel_OR_r);
+ return;
+ }
+ if ((c_OR_color_OR_grayLevel_OR_r is String || c_OR_color_OR_grayLevel_OR_r === null) && (alpha_OR_g_OR_m is num || alpha_OR_g_OR_m === null) && !?b_OR_y && !?a_OR_k && !?a) {
+ _setFillColor_2(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m);
+ return;
+ }
+ if ((c_OR_color_OR_grayLevel_OR_r is num || c_OR_color_OR_grayLevel_OR_r === null) && !?alpha_OR_g_OR_m && !?b_OR_y && !?a_OR_k && !?a) {
+ _setFillColor_3(c_OR_color_OR_grayLevel_OR_r);
+ return;
+ }
+ if ((c_OR_color_OR_grayLevel_OR_r is num || c_OR_color_OR_grayLevel_OR_r === null) && (alpha_OR_g_OR_m is num || alpha_OR_g_OR_m === null) && !?b_OR_y && !?a_OR_k && !?a) {
+ _setFillColor_4(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m);
+ return;
+ }
+ if ((c_OR_color_OR_grayLevel_OR_r is num || c_OR_color_OR_grayLevel_OR_r === null) && (alpha_OR_g_OR_m is num || alpha_OR_g_OR_m === null) && (b_OR_y is num || b_OR_y === null) && (a_OR_k is num || a_OR_k === null) && !?a) {
+ _setFillColor_5(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k);
+ return;
+ }
+ if ((c_OR_color_OR_grayLevel_OR_r is num || c_OR_color_OR_grayLevel_OR_r === null) && (alpha_OR_g_OR_m is num || alpha_OR_g_OR_m === null) && (b_OR_y is num || b_OR_y === null) && (a_OR_k is num || a_OR_k === null) && (a is num || a === null)) {
+ _setFillColor_6(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k, a);
+ return;
+ }
+ throw "Incorrect number or type of arguments";
+ }
+
+ void _setFillColor_1(c_OR_color_OR_grayLevel_OR_r) native "CanvasRenderingContext2D_setFillColor_1_Callback";
+
+ void _setFillColor_2(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m) native "CanvasRenderingContext2D_setFillColor_2_Callback";
+
+ void _setFillColor_3(c_OR_color_OR_grayLevel_OR_r) native "CanvasRenderingContext2D_setFillColor_3_Callback";
+
+ void _setFillColor_4(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m) native "CanvasRenderingContext2D_setFillColor_4_Callback";
+
+ void _setFillColor_5(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k) native "CanvasRenderingContext2D_setFillColor_5_Callback";
+
+ void _setFillColor_6(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k, a) native "CanvasRenderingContext2D_setFillColor_6_Callback";
+
void setLineCap(String cap) native "CanvasRenderingContext2D_setLineCap_Callback";
void setLineJoin(String join) native "CanvasRenderingContext2D_setLineJoin_Callback";
@@ -8647,6 +8666,46 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
void _setShadow_7(width, height, blur, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k, a) native "CanvasRenderingContext2D_setShadow_7_Callback";
+ void setStrokeColor(c_OR_color_OR_grayLevel_OR_r, [alpha_OR_g_OR_m, b_OR_y, a_OR_k, a]) {
+ if ((c_OR_color_OR_grayLevel_OR_r is String || c_OR_color_OR_grayLevel_OR_r === null) && !?alpha_OR_g_OR_m && !?b_OR_y && !?a_OR_k && !?a) {
+ _setStrokeColor_1(c_OR_color_OR_grayLevel_OR_r);
+ return;
+ }
+ if ((c_OR_color_OR_grayLevel_OR_r is String || c_OR_color_OR_grayLevel_OR_r === null) && (alpha_OR_g_OR_m is num || alpha_OR_g_OR_m === null) && !?b_OR_y && !?a_OR_k && !?a) {
+ _setStrokeColor_2(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m);
+ return;
+ }
+ if ((c_OR_color_OR_grayLevel_OR_r is num || c_OR_color_OR_grayLevel_OR_r === null) && !?alpha_OR_g_OR_m && !?b_OR_y && !?a_OR_k && !?a) {
+ _setStrokeColor_3(c_OR_color_OR_grayLevel_OR_r);
+ return;
+ }
+ if ((c_OR_color_OR_grayLevel_OR_r is num || c_OR_color_OR_grayLevel_OR_r === null) && (alpha_OR_g_OR_m is num || alpha_OR_g_OR_m === null) && !?b_OR_y && !?a_OR_k && !?a) {
+ _setStrokeColor_4(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m);
+ return;
+ }
+ if ((c_OR_color_OR_grayLevel_OR_r is num || c_OR_color_OR_grayLevel_OR_r === null) && (alpha_OR_g_OR_m is num || alpha_OR_g_OR_m === null) && (b_OR_y is num || b_OR_y === null) && (a_OR_k is num || a_OR_k === null) && !?a) {
+ _setStrokeColor_5(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k);
+ return;
+ }
+ if ((c_OR_color_OR_grayLevel_OR_r is num || c_OR_color_OR_grayLevel_OR_r === null) && (alpha_OR_g_OR_m is num || alpha_OR_g_OR_m === null) && (b_OR_y is num || b_OR_y === null) && (a_OR_k is num || a_OR_k === null) && (a is num || a === null)) {
+ _setStrokeColor_6(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k, a);
+ return;
+ }
+ throw "Incorrect number or type of arguments";
+ }
+
+ void _setStrokeColor_1(c_OR_color_OR_grayLevel_OR_r) native "CanvasRenderingContext2D_setStrokeColor_1_Callback";
+
+ void _setStrokeColor_2(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m) native "CanvasRenderingContext2D_setStrokeColor_2_Callback";
+
+ void _setStrokeColor_3(c_OR_color_OR_grayLevel_OR_r) native "CanvasRenderingContext2D_setStrokeColor_3_Callback";
+
+ void _setStrokeColor_4(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m) native "CanvasRenderingContext2D_setStrokeColor_4_Callback";
+
+ void _setStrokeColor_5(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k) native "CanvasRenderingContext2D_setStrokeColor_5_Callback";
+
+ void _setStrokeColor_6(c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k, a) native "CanvasRenderingContext2D_setStrokeColor_6_Callback";
+
void setTransform(num m11, num m12, num m21, num m22, num dx, num dy) native "CanvasRenderingContext2D_setTransform_Callback";
void stroke() native "CanvasRenderingContext2D_stroke_Callback";
@@ -8697,22 +8756,6 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
void _webkitPutImageDataHD_2(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) native "CanvasRenderingContext2D_webkitPutImageDataHD_2_Callback";
-
- void setFillColorRgb(int r, int g, int b, [double a = 1]) {
- this.fillStyle = 'rgba($r, $g, $b, $a)';
- }
-
- void setFillColorHsl(int h, double s, double l, [double a = 1]) {
- this.fillStyle = 'hsla($h, $s%, $l%, $a)';
- }
-
- void setStrokeColorRgb(int r, int g, int b, [double a = 1]) {
- this.strokeStyle = 'rgba($r, $g, $b, $a)';
- }
-
- void setStrokeColorHsl(int h, double s, double l, [double a = 1]) {
- this.strokeStyle = 'hsla($h, $s%, $l%, $a)';
- }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
« no previous file with comments | « lib/html/dart2js/html_dart2js.dart ('k') | lib/html/scripts/htmlrenamer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698