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

Side by Side Diff: client/html/generated/src/interface/CanvasRenderingContext2D.dart

Issue 8475009: Proposed canvas and WebGL cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: ready to discuss Created 9 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // WARNING: Do not edit - generated code. 5 // WARNING: Do not edit - generated code.
6 6
7 interface CanvasRenderingContext2D extends CanvasRenderingContext { 7 interface CanvasRenderingContext2D extends CanvasRenderingContext {
8 8
9 String get font(); 9 String get font();
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y); 67 void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y);
68 68
69 void clearRect(num x, num y, num width, num height); 69 void clearRect(num x, num y, num width, num height);
70 70
71 void clearShadow(); 71 void clearShadow();
72 72
73 void clip(); 73 void clip();
74 74
75 void closePath(); 75 void closePath();
76 76
77 ImageData createImageData(var imagedata_OR_sw, [num sh]); 77 // TODO(jacobr): it looks like createImageData(someImageData)
78 // was only supported by WebKit so it makes sense to remove it and clean up
79 // the API at the same time.
80 ImageData createImageData(num sw, num sh);
arv (Not doing code reviews) 2011/11/07 23:27:56 new ImageData(num sw, num sh) new ImageData.from(I
mattsh 2011/11/17 01:23:40 can we give more informative parameter names, e.g.
78 81
79 CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1); 82 CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1);
80 83
81 CanvasPattern createPattern(var canvas_OR_image, String repetitionType); 84 CanvasPattern createPattern(var canvas_OR_image, String repetitionType);
Jacob 2011/11/04 22:26:13 TODO(jacobr): cleanup this name as well
82 85
83 CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, nu m r1); 86 CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, nu m r1);
84 87
85 void drawImage(var canvas_OR_image, num sx_OR_x, num sy_OR_y, [num sw_OR_width , num height_OR_sh, num dx, num dy, num dw, num dh]); 88 // TODO(jacobr): use a rectangle class?
Jacob 2011/11/04 19:07:05 split drawImage into two methods so that the argum
89 void drawImage(var image, num dx, num dy, [num dw, num dh]);
vsm 2011/11/04 21:26:35 A Drawable interface to type image?
Jacob 2011/11/04 22:26:13 I agree.
mattsh 2011/11/17 01:23:40 Can we use a Rect type here? Can we make the first
Jacob 2011/11/17 01:34:43 I think that makes it more confusing as only a cou
86 90
87 void drawImageFromRect(ImageElement image, [num sx, num sy, num sw, num sh, nu m dx, num dy, num dw, num dh, String compositeOperation]); 91 void drawImageClipped(var image, num sx, num sy, num sw, num sh,
Jacob 2011/11/04 19:07:05 removed drawImageFromRect as it appears to be non-
mattsh 2011/11/17 01:23:40 I think this should take two Rect parameters (call
Jacob 2011/11/17 01:34:43 in general i'd agree. ideally we'd like to suppor
92 num dx, num dy, num dw, num dh);
88 93
89 void fill(); 94 void fill();
90 95
91 void fillRect(num x, num y, num width, num height); 96 void fillRect(num x, num y, num width, num height);
mattsh 2011/11/17 01:23:40 use Rect here
92 97
93 void fillText(String text, num x, num y, [num maxWidth]); 98 void fillText(String text, num x, num y, [num maxWidth]);
94 99
95 ImageData getImageData(num sx, num sy, num sw, num sh); 100 ImageData getImageData(num sx, num sy, num sw, num sh);
mattsh 2011/11/17 01:23:40 use Rect here
96 101
97 bool isPointInPath(num x, num y); 102 bool isPointInPath(num x, num y);
98 103
99 void lineTo(num x, num y); 104 void lineTo(num x, num y);
100 105
101 TextMetrics measureText(String text); 106 TextMetrics measureText(String text);
102 107
103 void moveTo(num x, num y); 108 void moveTo(num x, num y);
104 109
105 void putImageData(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY , num dirtyWidth, num dirtyHeight]); 110 void putImageData(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY , num dirtyWidth, num dirtyHeight]);
106 111
107 void quadraticCurveTo(num cpx, num cpy, num x, num y); 112 void quadraticCurveTo(num cpx, num cpy, num x, num y);
108 113
109 void rect(num x, num y, num width, num height); 114 void rect(num x, num y, num width, num height);
110 115
111 void restore(); 116 void restore();
112 117
113 void rotate(num angle); 118 void rotate(num angle);
114 119
115 void save(); 120 void save();
116 121
117 void scale(num sx, num sy); 122 void scale(num sx, num sy);
118 123
119 void setAlpha(num alpha); 124 void setAlpha(num alpha);
120 125
121 void setCompositeOperation(String compositeOperation); 126 void setCompositeOperation(String compositeOperation);
122 127
123 void setFillColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
nweiz 2011/11/04 21:09:06 What are this and the other two below being replac
Jacob 2011/11/04 22:26:13 I believe these are WebKit specific methods that n
arv (Not doing code reviews) 2011/11/07 23:27:56 only rgba
124
125 void setFillStyle(var color_OR_gradient_OR_pattern); 128 void setFillStyle(var color_OR_gradient_OR_pattern);
126 129
127 void setLineCap(String cap); 130 void setLineCap(String cap);
128 131
129 void setLineJoin(String join); 132 void setLineJoin(String join);
130 133
131 void setLineWidth(num width); 134 void setLineWidth(num width);
132 135
133 void setMiterLimit(num limit); 136 void setMiterLimit(num limit);
134 137
135 void setShadow(num width, num height, num blur, [var c_OR_color_OR_grayLevel_O R_r, num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
arv (Not doing code reviews) 2011/11/07 23:27:56 seems useful. rgba only though defaults to rgba(0
136
137 void setStrokeColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, nu m b_OR_y, num a_OR_k, num a]);
arv (Not doing code reviews) 2011/11/07 23:27:56 same
138
139 void setStrokeStyle(var color_OR_gradient_OR_pattern); 138 void setStrokeStyle(var color_OR_gradient_OR_pattern);
Jacob 2011/11/04 22:26:13 i'd like to cleanup this one as well. clearly it
140 139
141 void setTransform(num m11, num m12, num m21, num m22, num dx, num dy); 140 void setTransform(num m11, num m12, num m21, num m22, num dx, num dy);
142 141
143 void stroke(); 142 void stroke();
144 143
145 void strokeRect(num x, num y, num width, num height, [num lineWidth]); 144 void strokeRect(num x, num y, num width, num height, [num lineWidth]);
146 145
147 void strokeText(String text, num x, num y, [num maxWidth]); 146 void strokeText(String text, num x, num y, [num maxWidth]);
148 147
149 void transform(num m11, num m12, num m21, num m22, num dx, num dy); 148 void transform(num m11, num m12, num m21, num m22, num dx, num dy);
150 149
151 void translate(num tx, num ty); 150 void translate(num tx, num ty);
152 } 151 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698