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

Side by Side Diff: tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate

Issue 558703004: Temporary fix for CanvasRenderingContext2D.arc (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 abstract class CanvasRenderingContext { 7 abstract class CanvasRenderingContext {
8 CanvasElement get canvas; 8 CanvasElement get canvas;
9 } 9 }
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 * [s], [l] are in percent, 0-100. 43 * [s], [l] are in percent, 0-100.
44 * [a] is 0-1. 44 * [a] is 0-1.
45 */ 45 */
46 void setStrokeColorHsl(int h, num s, num l, [num a = 1]) { 46 void setStrokeColorHsl(int h, num s, num l, [num a = 1]) {
47 this.strokeStyle = 'hsla($h, $s%, $l%, $a)'; 47 this.strokeStyle = 'hsla($h, $s%, $l%, $a)';
48 } 48 }
49 49
50 @DomName('CanvasRenderingContext2D.arc') 50 @DomName('CanvasRenderingContext2D.arc')
51 void arc(num x, num y, num radius, num startAngle, num endAngle, 51 void arc(num x, num y, num radius, num startAngle, num endAngle,
52 [bool anticlockwise = false]) { 52 [bool anticlockwise = false]) {
53 // TODO(terry): This should not be needed: dartbug.com/20939.
54 $if DART2JS
55 JS('void', '#.arc(#, #, #, #, #, #)', this, x, y, radius, startAngle,
56 endAngle, anticlockwise);
57 $else
53 _arc(x, y, radius, startAngle, endAngle, anticlockwise); 58 _arc(x, y, radius, startAngle, endAngle, anticlockwise);
59 $endif
54 } 60 }
55 61
56 /** 62 /**
57 * Draws an image from a CanvasImageSource to an area of this canvas. 63 * Draws an image from a CanvasImageSource to an area of this canvas.
58 * 64 *
59 * The image will be drawn to an area of this canvas defined by 65 * The image will be drawn to an area of this canvas defined by
60 * [destRect]. [sourceRect] defines the region of the source image that is 66 * [destRect]. [sourceRect] defines the region of the source image that is
61 * drawn. 67 * drawn.
62 * If [sourceRect] is not provided, then 68 * If [sourceRect] is not provided, then
63 * the entire rectangular image from [source] will be drawn to this context. 69 * the entire rectangular image from [source] will be drawn to this context.
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 JS('void', '#.fill(#)', this, winding); 360 JS('void', '#.fill(#)', this, winding);
355 } 361 }
356 $endif 362 $endif
357 363
358 /** Deprecated always returns 1.0 */ 364 /** Deprecated always returns 1.0 */
359 @DomName('CanvasRenderingContext2D.webkitBackingStorePixelRation') 365 @DomName('CanvasRenderingContext2D.webkitBackingStorePixelRation')
360 @Experimental() 366 @Experimental()
361 @deprecated 367 @deprecated
362 double get backingStorePixelRatio => 1.0; 368 double get backingStorePixelRatio => 1.0;
363 } 369 }
OLDNEW
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698