Commit 1254ae19 by Meitar Moscovitz Committed by Dmitry Baranovskiy

Add documentation for `.text()` method.

Signed-off-by: Dmitry Baranovskiy <dmitry.baranovskiy@gmail.com>
parent 03d8fcc5
...@@ -293,6 +293,20 @@ Embeds an image into the SVG/VML canvas. ...@@ -293,6 +293,20 @@ Embeds an image into the SVG/VML canvas.
var c = paper.image("apple.png", 10, 10, 100, 100); var c = paper.image("apple.png", 10, 10, 100, 100);
#### text
Draws a text string.
##### Parameters
1. x number X coordinate position
2. y number Y coordinate position
3. text string The text string to draw.
##### Usage
var t = paper.text(10, 10, "Look mom, I'm scalable!");
#### path #### path
Initialises path drawing. Typically, this function returns an empty `path` object and to draw paths you use its built-in methods like `lineTo` and `curveTo`. However, you can also specify a path literally by supplying the path data as a second argument. Initialises path drawing. Typically, this function returns an empty `path` object and to draw paths you use its built-in methods like `lineTo` and `curveTo`. However, you can also specify a path literally by supplying the path data as a second argument.
......
...@@ -289,6 +289,20 @@ c.attr({fill: "#000", stroke: "#f00", opacity: 0.5}); // using params object</co ...@@ -289,6 +289,20 @@ c.attr({fill: "#000", stroke: "#f00", opacity: 0.5}); // using params object</co
</ol> </ol>
<h4>Usage</h4> <h4>Usage</h4>
<pre class="javascript code"><code>var c = paper.image("apple.png", 10, 10, 100, 100);</code></pre> <pre class="javascript code"><code>var c = paper.image("apple.png", 10, 10, 100, 100);</code></pre>
<h3 id="text">
text
</h3>
<p>
Draws a text string.
</p>
<h4>Parameters</h4>
<ol>
<li>x <em>number</em> X coordinate position.</li>
<li>y <em>number</em> Y coordinate position.</li>
<li>text <em>string</em> The text string to draw.</li>
</ol>
<h4>Usage</h4>
<pre class="javascript code"><code>var t = paper.text(10, 10, "Look mom, I'm scalable!");</code></pre>
<h3 id="path"> <h3 id="path">
path path
</h3> </h3>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment