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

Side by Side Diff: tools/dom/docs/docs.json

Issue 13726010: Rename context2d to context2D. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
OLDNEW
1 { 1 {
2 "dart.dom.html": { 2 "dart.dom.html": {
3 "CanvasGradient": { 3 "CanvasGradient": {
4 "comment": [ 4 "comment": [
5 "/**", 5 "/**",
6 " * An opaque canvas object representing a gradient.", 6 " * An opaque canvas object representing a gradient.",
7 " *", 7 " *",
8 " * Created by calling [createLinearGradient] or [createRadialGradient] on a", 8 " * Created by calling [createLinearGradient] or [createRadialGradient] on a",
9 " * [CanvasRenderingContext2D] object.", 9 " * [CanvasRenderingContext2D] object.",
10 " *", 10 " *",
11 " * Example usage:", 11 " * Example usage:",
12 " *", 12 " *",
13 " * var canvas = new CanvasElement(width: 600, height: 600);", 13 " * var canvas = new CanvasElement(width: 600, height: 600);",
14 " * var ctx = canvas.context2d;", 14 " * var ctx = canvas.context2D;",
15 " * ctx.clearRect(0, 0, 600, 600);", 15 " * ctx.clearRect(0, 0, 600, 600);",
16 " * ctx.save();", 16 " * ctx.save();",
17 " * // Create radial gradient.", 17 " * // Create radial gradient.",
18 " * CanvasGradient gradient = ctx.createRadialGradient(0, 0, 0, 0, 0 , 600);", 18 " * CanvasGradient gradient = ctx.createRadialGradient(0, 0, 0, 0, 0 , 600);",
19 " * gradient.addColorStop(0, '#000');", 19 " * gradient.addColorStop(0, '#000');",
20 " * gradient.addColorStop(1, 'rgb(255, 255, 255)');", 20 " * gradient.addColorStop(1, 'rgb(255, 255, 255)');",
21 " * // Assign gradients to fill.", 21 " * // Assign gradients to fill.",
22 " * ctx.fillStyle = gradient;", 22 " * ctx.fillStyle = gradient;",
23 " * // Draw a rectangle with a gradient fill.", 23 " * // Draw a rectangle with a gradient fill.",
24 " * ctx.fillRect(0, 0, 600, 600);", 24 " * ctx.fillRect(0, 0, 600, 600);",
(...skipping 24 matching lines...) Expand all
49 "CanvasPattern": { 49 "CanvasPattern": {
50 "comment": [ 50 "comment": [
51 "/**", 51 "/**",
52 " * An opaque object representing a pattern of image, canvas, or video." , 52 " * An opaque object representing a pattern of image, canvas, or video." ,
53 " *", 53 " *",
54 " * Created by calling [createPattern] on a [CanvasRenderingContext2D] o bject.", 54 " * Created by calling [createPattern] on a [CanvasRenderingContext2D] o bject.",
55 " *", 55 " *",
56 " * Example usage:", 56 " * Example usage:",
57 " *", 57 " *",
58 " * var canvas = new CanvasElement(width: 600, height: 600);", 58 " * var canvas = new CanvasElement(width: 600, height: 600);",
59 " * var ctx = canvas.context2d;", 59 " * var ctx = canvas.context2D;",
60 " * var img = new ImageElement();", 60 " * var img = new ImageElement();",
61 " * // Image src needs to be loaded before pattern is applied.", 61 " * // Image src needs to be loaded before pattern is applied.",
62 " * img.onLoad.listen((event) {", 62 " * img.onLoad.listen((event) {",
63 " * // When the image is loaded, create a pattern", 63 " * // When the image is loaded, create a pattern",
64 " * // from the ImageElement.", 64 " * // from the ImageElement.",
65 " * CanvasPattern pattern = ctx.createPattern(img, 'repeat');", 65 " * CanvasPattern pattern = ctx.createPattern(img, 'repeat');",
66 " * ctx.rect(0, 0, canvas.width, canvas.height);", 66 " * ctx.rect(0, 0, canvas.width, canvas.height);",
67 " * ctx.fillStyle = pattern;", 67 " * ctx.fillStyle = pattern;",
68 " * ctx.fill();", 68 " * ctx.fill();",
69 " * });", 69 " * });",
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 " *", 225 " *",
226 " * If the height or width of this canvas element is 0, then 'data:' is returned,", 226 " * If the height or width of this canvas element is 0, then 'data:' is returned,",
227 " * representing no data.", 227 " * representing no data.",
228 " *", 228 " *",
229 " * If the type requested is not 'image/png', and the returned value is", 229 " * If the type requested is not 'image/png', and the returned value is",
230 " * 'data:image/png', then the requested type is not supported.", 230 " * 'data:image/png', then the requested type is not supported.",
231 " *", 231 " *",
232 " * Example usage:", 232 " * Example usage:",
233 " *", 233 " *",
234 " * CanvasElement canvas = new CanvasElement();", 234 " * CanvasElement canvas = new CanvasElement();",
235 " * var ctx = canvas.context2d", 235 " * var ctx = canvas.context2D",
236 " * ..fillStyle = \"rgb(200,0,0)\"", 236 " * ..fillStyle = \"rgb(200,0,0)\"",
237 " * ..fillRect(10, 10, 55, 50);", 237 " * ..fillRect(10, 10, 55, 50);",
238 " * var dataUrl = canvas.toDataURL(\"image/jpeg\", 0.95);", 238 " * var dataUrl = canvas.toDataURL(\"image/jpeg\", 0.95);",
239 " * // The Data Uri would look similar to", 239 " * // The Data Uri would look similar to",
240 " * // 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA", 240 " * // 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA",
241 " * // AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNB AAO", 241 " * // AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNB AAO",
242 " * // 9TXL0Y4OHwAAAABJRU5ErkJggg=='", 242 " * // 9TXL0Y4OHwAAAABJRU5ErkJggg=='",
243 " * //Create a new image element from the data URI.", 243 " * //Create a new image element from the data URI.",
244 " * var img = new ImageElement();", 244 " * var img = new ImageElement();",
245 " * img.src = dataUrl;", 245 " * img.src = dataUrl;",
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 " *", 601 " *",
602 " * [oldVersion] should match the database's current [version] exact ly.", 602 " * [oldVersion] should match the database's current [version] exact ly.",
603 " *", 603 " *",
604 " * * [Database.changeVersion](http://www.w3.org/TR/webdatabase/#dom -database-changeversion) from W3C.", 604 " * * [Database.changeVersion](http://www.w3.org/TR/webdatabase/#dom -database-changeversion) from W3C.",
605 " */" 605 " */"
606 ] 606 ]
607 } 607 }
608 } 608 }
609 } 609 }
610 } 610 }
OLDNEW
« no previous file with comments | « tests/html/url_test.dart ('k') | tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698