|
79 | 79 | example, you can use the following matrix to rotate a bitmap |
80 | 80 | by 45 degrees(pi/4 radians):</p> |
81 | 81 | <pre><code class="prettyprint haxe">matrix = new openfl.geom.Matrix(); |
82 | | - matrix.rotate(Math.PI / 4); |
83 | | - ``` |
84 | | - |
85 | | -</code></pre></td></tr><tr><th style="width:25%;"><code>repeat</code></th><td><p>If <code>true</code>, the bitmap image repeats in a tiled |
| 82 | +matrix.rotate(Math.PI / 4);</code></pre></td></tr><tr><th style="width:25%;"><code>repeat</code></th><td><p>If <code>true</code>, the bitmap image repeats in a tiled |
86 | 83 | pattern. If <code>false</code>, the bitmap image does not |
87 | 84 | repeat, and the edges of the bitmap are used for any fill |
88 | 85 | area that extends beyond the bitmap.</p> |
|
245 | 242 | anchor point relative to the registration point of the |
246 | 243 | parent display object.</p></td></tr></table><p class="javadoc">See also:</p><ul><li><div class="inline-content"><p><a href="https://books.openfl.org/openfl-developers-guide/using-the-drawing-api/drawing-lines-and-curves.html">Drawing lines and curves</a></p></div></li></ul></div></div><div class="field "><a name="drawCircle"></a><h3 class="anchor"><code><a href="#drawCircle"><span class="identifier">drawCircle</span></a>(<span style="white-space:nowrap">x:<span class="type">Float</span>,</span> <span style="white-space:nowrap">y:<span class="type">Float</span>,</span> <span style="white-space:nowrap">radius:<span class="type">Float</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p class="javadoc">See also:</p><ul><li><div class="inline-content"><p><a href="https://books.openfl.org/openfl-developers-guide/using-the-drawing-api/drawing-shapes-using-built-in-methods.html">Drawing shapes using built-in methods</a></p></div></li></ul></div></div><div class="field "><a name="drawEllipse"></a><h3 class="anchor"><code><a href="#drawEllipse"><span class="identifier">drawEllipse</span></a>(<span style="white-space:nowrap">x:<span class="type">Float</span>,</span> <span style="white-space:nowrap">y:<span class="type">Float</span>,</span> <span style="white-space:nowrap">width:<span class="type">Float</span>,</span> <span style="white-space:nowrap">height:<span class="type">Float</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Draws an ellipse. Set the line style, fill, or both before you call the |
247 | 244 | <code>drawEllipse()</code> method, by calling the |
248 | | -<code>linestyle()</code>, <code>lineGradientStyle()</code>, |
| 245 | +<code>lineStyle()</code>, <code>lineGradientStyle()</code>, |
249 | 246 | <code>beginFill()</code>, <code>beginGradientFill()</code>, or |
250 | 247 | <code>beginBitmapFill()</code> method.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>x</code></th><td><p>The <em>x</em> location of the top-left of the bounding-box of |
251 | 248 | the ellipse relative to the registration point of the parent |
|
309 | 306 | matrix [ a, b, c, d, ... ] values. A <code>transforms</code> object |
310 | 307 | which is six times the draw count in size will use full |
311 | 308 | matrix [ a, b, c, d, tx, ty, ... ] values per draw.</p></td></tr></table></div></div><div class="field "><a name="drawRect"></a><h3 class="anchor"><code><a href="#drawRect"><span class="identifier">drawRect</span></a>(<span style="white-space:nowrap">x:<span class="type">Float</span>,</span> <span style="white-space:nowrap">y:<span class="type">Float</span>,</span> <span style="white-space:nowrap">width:<span class="type">Float</span>,</span> <span style="white-space:nowrap">height:<span class="type">Float</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Draws a rectangle. Set the line style, fill, or both before you call the |
312 | | -<code>drawRect()</code> method, by calling the <code>linestyle()</code>, |
| 309 | +<code>drawRect()</code> method, by calling the <code>lineStyle()</code>, |
313 | 310 | <code>lineGradientStyle()</code>, <code>beginFill()</code>, |
314 | 311 | <code>beginGradientFill()</code>, or <code>beginBitmapFill()</code> |
315 | 312 | method.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>x</code></th><td><p>A number indicating the horizontal position relative to the |
316 | 313 | registration point of the parent display object (in pixels).</p></td></tr><tr><th style="width:25%;"><code>y</code></th><td><p>A number indicating the vertical position relative to the |
317 | 314 | registration point of the parent display object (in pixels).</p></td></tr><tr><th style="width:25%;"><code>width</code></th><td><p>The width of the rectangle (in pixels).</p></td></tr><tr><th style="width:25%;"><code>height</code></th><td><p>The height of the rectangle (in pixels).</p></td></tr></table><p class="javadoc">Throws:</p><table class="table table-bordered params"><tr class="indent"><th style="width:25%;"><code>ArgumentError</code></th><td><p>If the <code>width</code> or <code>height</code> |
318 | | -parameters are not a number</p> |
319 | | -<pre><code> (`Number.NaN`). |
320 | | -</code></pre></td></tr></table><p class="javadoc">See also:</p><ul><li><div class="inline-content"><p><a href="https://books.openfl.org/openfl-developers-guide/using-the-drawing-api/drawing-shapes-using-built-in-methods.html">Drawing shapes using built-in methods</a></p></div></li></ul></div></div><div class="field "><a name="drawRoundRect"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value({ ellipseHeight : null })</span><a href="#drawRoundRect"><span class="identifier">drawRoundRect</span></a>(<span style="white-space:nowrap">x:<span class="type">Float</span>,</span> <span style="white-space:nowrap">y:<span class="type">Float</span>,</span> <span style="white-space:nowrap">width:<span class="type">Float</span>,</span> <span style="white-space:nowrap">height:<span class="type">Float</span>,</span> <span style="white-space:nowrap">ellipseWidth:<span class="type">Float</span>,</span> <span style="white-space:nowrap">?ellipseHeight:<span class="type">Float</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Draws a rounded rectangle. Set the line style, fill, or both before you |
| 315 | +parameters are not a number |
| 316 | +(<code>Number.NaN</code>).</p></td></tr></table><p class="javadoc">See also:</p><ul><li><div class="inline-content"><p><a href="https://books.openfl.org/openfl-developers-guide/using-the-drawing-api/drawing-shapes-using-built-in-methods.html">Drawing shapes using built-in methods</a></p></div></li></ul></div></div><div class="field "><a name="drawRoundRect"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value({ ellipseHeight : null })</span><a href="#drawRoundRect"><span class="identifier">drawRoundRect</span></a>(<span style="white-space:nowrap">x:<span class="type">Float</span>,</span> <span style="white-space:nowrap">y:<span class="type">Float</span>,</span> <span style="white-space:nowrap">width:<span class="type">Float</span>,</span> <span style="white-space:nowrap">height:<span class="type">Float</span>,</span> <span style="white-space:nowrap">ellipseWidth:<span class="type">Float</span>,</span> <span style="white-space:nowrap">?ellipseHeight:<span class="type">Float</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Draws a rounded rectangle. Set the line style, fill, or both before you |
321 | 317 | call the <code>drawRoundRect()</code> method, by calling the |
322 | | -<code>linestyle()</code>, <code>lineGradientStyle()</code>, |
| 318 | +<code>lineStyle()</code>, <code>lineGradientStyle()</code>, |
323 | 319 | <code>beginFill()</code>, <code>beginGradientFill()</code>, or |
324 | 320 | <code>beginBitmapFill()</code> method.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>x</code></th><td><p>A number indicating the horizontal position relative |
325 | 321 | to the registration point of the parent display |
326 | 322 | object(in pixels).</p></td></tr><tr><th style="width:25%;"><code>y</code></th><td><p>A number indicating the vertical position relative to |
327 | | -the registration point of the parent display object</p> |
328 | | -<pre><code> (in pixels). |
329 | | -</code></pre></td></tr><tr><th style="width:25%;"><code>width</code></th><td><p>The width of the round rectangle (in pixels).</p></td></tr><tr><th style="width:25%;"><code>height</code></th><td><p>The height of the round rectangle (in pixels).</p></td></tr><tr><th style="width:25%;"><code>ellipseWidth</code></th><td><p>The width of the ellipse used to draw the rounded |
| 323 | +the registration point of the parent display object |
| 324 | +(in pixels).</p></td></tr><tr><th style="width:25%;"><code>width</code></th><td><p>The width of the round rectangle (in pixels).</p></td></tr><tr><th style="width:25%;"><code>height</code></th><td><p>The height of the round rectangle (in pixels).</p></td></tr><tr><th style="width:25%;"><code>ellipseWidth</code></th><td><p>The width of the ellipse used to draw the rounded |
330 | 325 | corners(in pixels).</p></td></tr><tr><th style="width:25%;"><code>ellipseHeight</code></th><td><p>The height of the ellipse used to draw the rounded |
331 | 326 | corners(in pixels). Optional; if no value is |
332 | 327 | specified, the default value matches that provided |
|
431 | 426 | thickness; the maximum thickness is 255. If a value |
432 | 427 | greater than 255 is passed, the default is 255.</p></td></tr><tr><th style="width:25%;"><code>color</code></th><td><p>A hexadecimal color value of the line; for example, |
433 | 428 | red is 0xFF0000, blue is 0x0000FF, and so on. If a |
434 | | -value is not indicated, the default is 0x000000</p> |
435 | | -<pre><code> (black). Optional. |
436 | | -</code></pre></td></tr><tr><th style="width:25%;"><code>alpha</code></th><td><p>A number that indicates the alpha value of the color |
| 429 | +value is not indicated, the default is 0x000000 |
| 430 | +(black). Optional.</p></td></tr><tr><th style="width:25%;"><code>alpha</code></th><td><p>A number that indicates the alpha value of the color |
437 | 431 | of the line; valid values are 0 to 1. If a value is |
438 | 432 | not indicated, the default is 1 (solid). If the value |
439 | 433 | is less than 0, the default is 0. If the value is |
|
449 | 443 | Flash Player or Adobe AIR renders two rounded |
450 | 444 | rectangles that are identical, except that the |
451 | 445 | <code>pixelHinting</code> parameter used in the |
452 | | -<code>lineStyle()</code> method is set differently</p> |
453 | | -<pre><code> (the images are scaled by 200%, to emphasize the |
454 | | -</code></pre> |
455 | | -<p>difference):</p> |
| 446 | +<code>lineStyle()</code> method is set differently |
| 447 | +(the images are scaled by 200%, to emphasize the |
| 448 | +difference):</p> |
456 | 449 | <p><img src="/images/lineStyle_pixelHinting.jpg" alt="pixelHinting false and pixelHinting true" /></p> |
457 | 450 | <p>If a value is not supplied, the line does not use |
458 | 451 | pixel hinting.</p></td></tr><tr><th style="width:25%;"><code>scaleMode</code></th><td><p>(Not supported in Flash Lite 4) A value from the |
459 | 452 | LineScaleMode class that specifies which scale mode to |
460 | | -use:</p><ul><li> |
461 | | -<p><code><a href="../../openfl/display/LineScaleMode.html#NORMAL">LineScaleMode.NORMAL</a></code> - Always |
462 | | -scale the line thickness when the object is scaled</p> |
463 | | -<pre><code> (the default). |
464 | | -</code></pre></li><li><code><a href="../../openfl/display/LineScaleMode.html#NONE">LineScaleMode.NONE</a></code> - Never scale |
| 453 | +use:</p><ul><li><code><a href="../../openfl/display/LineScaleMode.html#NORMAL">LineScaleMode.NORMAL</a></code> - Always |
| 454 | +scale the line thickness when the object is scaled |
| 455 | +(the default).</li><li><code><a href="../../openfl/display/LineScaleMode.html#NONE">LineScaleMode.NONE</a></code> - Never scale |
465 | 456 | the line thickness.</li><li><code><a href="../../openfl/display/LineScaleMode.html#VERTICAL">LineScaleMode.VERTICAL</a></code> - Do not |
466 | 457 | scale the line thickness if the object is scaled |
467 | 458 | vertically <em>only</em>. For example, consider the |
|
0 commit comments