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

Side by Side Diff: sdk/lib/html/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate

Issue 11364134: Merge libv1. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload due to error 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 5 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
6 $!MEMBERS 6 $!MEMBERS
7 7
8 /**
9 * Sets the color used inside shapes.
10 * [r], [g], [b] are 0-255, [a] is 0-1.
11 */
8 void setFillColorRgb(int r, int g, int b, [num a = 1]) { 12 void setFillColorRgb(int r, int g, int b, [num a = 1]) {
9 this.fillStyle = 'rgba($r, $g, $b, $a)'; 13 this.fillStyle = 'rgba($r, $g, $b, $a)';
10 } 14 }
11 15
16 /**
17 * Sets the color used inside shapes.
18 * [h] is in degrees, 0-360.
19 * [s], [l] are in percent, 0-100.
20 * [a] is 0-1.
21 */
12 void setFillColorHsl(int h, num s, num l, [num a = 1]) { 22 void setFillColorHsl(int h, num s, num l, [num a = 1]) {
13 this.fillStyle = 'hsla($h, $s%, $l%, $a)'; 23 this.fillStyle = 'hsla($h, $s%, $l%, $a)';
14 } 24 }
15 25
26 /**
27 * Sets the color used for stroking shapes.
28 * [r], [g], [b] are 0-255, [a] is 0-1.
29 */
16 void setStrokeColorRgb(int r, int g, int b, [num a = 1]) { 30 void setStrokeColorRgb(int r, int g, int b, [num a = 1]) {
17 this.strokeStyle = 'rgba($r, $g, $b, $a)'; 31 this.strokeStyle = 'rgba($r, $g, $b, $a)';
18 } 32 }
19 33
34 /**
35 * Sets the color used for stroking shapes.
36 * [h] is in degrees, 0-360.
37 * [s], [l] are in percent, 0-100.
38 * [a] is 0-1.
39 */
20 void setStrokeColorHsl(int h, num s, num l, [num a = 1]) { 40 void setStrokeColorHsl(int h, num s, num l, [num a = 1]) {
21 this.strokeStyle = 'hsla($h, $s%, $l%, $a)'; 41 this.strokeStyle = 'hsla($h, $s%, $l%, $a)';
22 } 42 }
23 } 43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698