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

Unified Diff: tools/dom/docs/docs.json

Issue 12087003: Fixed some bugs in dom docs and recovered documentation of Canvas stuff. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/docs/lib/docs.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/docs/docs.json
diff --git a/tools/dom/docs/docs.json b/tools/dom/docs/docs.json
index 9e26dfeeb6e641a33dae4961196235bdb965b21b..1cf29dd54779e24322a5a16414cfab6cfe0093ab 100644
--- a/tools/dom/docs/docs.json
+++ b/tools/dom/docs/docs.json
@@ -1 +1,42 @@
-{}
+{
+ "html": {
+ "CanvasGradient": {
+ "comment": [
+ "/**\n * An opaque canvas object representing a gradient.\n *\n * Created by calling [createLinearGradient] or [createRadialGradient] on a\n * [CanvasRenderingContext2D] object.\n *\n * Example usage:\n *\n * var canvas = new CanvasElement(width: 600, height: 600);\n * var ctx = canvas.context2d;\n * ctx.clearRect(0, 0, 600, 600);\n * ctx.save();\n * // Create radial gradient.\n * CanvasGradient gradient = ctx.createRadialGradient(0, 0, 0, 0, 0, 600);\n * gradient.addColorStop(0, '#000');\n * gradient.addColorStop(1, 'rgb(255, 255, 255)');\n * // Assign gradients to fill.\n * ctx.fillStyle = gradient;\n * // Draw a rectangle with a gradient fill.\n * ctx.fillRect(0, 0, 600, 600);\n * ctx.save();\n * document.body.children.add(canvas);\n *\n * See also:\n *\n * * [CanvasGradient](https://developer.mozilla.org/en-US/docs/DOM/CanvasGradient) from MDN.\n * * [CanvasGradient](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasgradient) from whatwg.\n * * [CanvasGradient](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvasgradient) from W3C.\n */"
+ ],
+ "members": {
+ "addColorStop": [
+ "/**\n * Adds a color stop to this gradient at the offset.\n *\n * The [offset] can range between 0.0 and 1.0.\n *\n * See also:\n *\n * * [Multiple Color Stops](https://developer.mozilla.org/en-US/docs/CSS/linear-gradient#Gradient_with_multiple_color_stops) from MDN.\n */"
+ ]
+ }
+ },
+ "CanvasPattern": {
+ "comment": [
+ "/**\n * An opaque object representing a pattern of image, canvas, or video.\n *\n * Created by calling [createPattern] on a [CanvasRenderingContext2D] object.\n *\n * Example usage:\n *\n * var canvas = new CanvasElement(width: 600, height: 600);\n * var ctx = canvas.context2d;\n * var img = new ImageElement();\n * // Image src needs to be loaded before pattern is applied.\n * img.on.load.add((event) {\n * // When the image is loaded, create a pattern\n * // from the ImageElement.\n * CanvasPattern pattern = ctx.createPattern(img, 'repeat');\n * ctx.rect(0, 0, canvas.width, canvas.height);\n * ctx.fillStyle = pattern;\n * ctx.fill();\n * });\n * img.src = \"images/foo.jpg\";\n * document.body.children.add(canvas);\n *\n * See also:\n * * [CanvasPattern](https://developer.mozilla.org/en-US/docs/DOM/CanvasPattern) from MDN.\n * * [CanvasPattern](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspattern) from whatwg.\n * * [CanvasPattern](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvaspattern) from W3C.\n */"
+ ]
+ },
+ "CanvasRenderingContext": {
+ "comment": [
+ "/**\n * A rendering context for a canvas element.\n *\n * This context is extended by [CanvasRenderingContext2D] and\n * [WebGLRenderingContext].\n */"
+ ],
+ "members": {
+ "canvas": [
+ "/// Reference to the canvas element to which this context belongs."
+ ]
+ }
+ },
+ "HTMLCanvasElement": {
+ "members": {
+ "height": [
+ "/// The height of this canvas element in CSS pixels."
+ ],
+ "toDataURL": [
+ "/**\n * Returns a data URI containing a representation of the image in the\n * format specified by type (defaults to 'image/png').\n *\n * Data Uri format is as follow `data:[<MIME-type>][;charset=<encoding>][;base64],<data>`\n *\n * Optional parameter [quality] in the range of 0.0 and 1.0 can be used when requesting [type]\n * 'image/jpeg' or 'image/webp'. If [quality] is not passed the default\n * value is used. Note: the default value varies by browser.\n *\n * If the height or width of this canvas element is 0, then 'data:' is returned,\n * representing no data.\n *\n * If the type requested is not 'image/png', and the returned value is\n * 'data:image/png', then the requested type is not supported.\n *\n * Example usage:\n *\n * CanvasElement canvas = new CanvasElement();\n * var ctx = canvas.context2d\n * ..fillStyle = \"rgb(200,0,0)\"\n * ..fillRect(10, 10, 55, 50);\n * var dataUrl = canvas.toDataURL(\"image/jpeg\", 0.95);\n * // The Data Uri would look similar to\n * // 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA\n * // AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO\n * // 9TXL0Y4OHwAAAABJRU5ErkJggg=='\n * //Create a new image element from the data URI.\n * var img = new ImageElement();\n * img.src = dataUrl;\n * document.body.children.add(img);\n *\n * See also:\n *\n * * [Data URI Scheme](http://en.wikipedia.org/wiki/Data_URI_scheme) from Wikipedia.\n *\n * * [HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/DOM/HTMLCanvasElement) from MDN.\n *\n * * [toDataUrl](http://dev.w3.org/html5/spec/the-canvas-element.html#dom-canvas-todataurl) from W3C.\n */"
+ ],
+ "width": [
+ "/// The width of this canvas element in CSS pixels."
+ ]
+ }
+ }
+ }
+}
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/docs/lib/docs.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698