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

Unified Diff: sdk/lib/html/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate

Issue 11365019: Merging dart:html interfaces and implementations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixing merged classes in dartium not compiling under dartc. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/html/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
diff --git a/sdk/lib/html/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate b/sdk/lib/html/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
index 98a80fd966cc14d78fdb69c92242a9dc2cbb88f3..1198d89e071b5f847fd0d9cfab936b79ecb415af 100644
--- a/sdk/lib/html/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
@@ -5,18 +5,38 @@
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
+ /**
+ * Sets the color used inside shapes.
+ * [r], [g], [b] are 0-255, [a] is 0-1.
+ */
void setFillColorRgb(int r, int g, int b, [num a = 1]) {
this.fillStyle = 'rgba($r, $g, $b, $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, num s, num l, [num a = 1]) {
this.fillStyle = 'hsla($h, $s%, $l%, $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, [num a = 1]) {
this.strokeStyle = 'rgba($r, $g, $b, $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, num s, num l, [num a = 1]) {
this.strokeStyle = 'hsla($h, $s%, $l%, $a)';
}

Powered by Google App Engine
This is Rietveld 408576698