docs: porting shapes args over

This commit is contained in:
Andy Meneely
2016-01-28 22:36:38 -05:00
parent cbe013323d
commit b0c4bb3dd3
18 changed files with 357 additions and 8 deletions
+3 -6
View File
@@ -6,17 +6,14 @@ Fills the background with the given color
Options
^^^^^^^
All options support arrays and singleton expansion. See :doc:`/arrays`
.. include:: /args/expansion.rst
range
default: ``:all``
the range of cards over which this will be rendered. See :ref:`using_ranges`
.. include:: /args/range.rst
color
default: ``:black``
the color to fill the background with. See :doc:`/colors`.
the color or gradient to fill the background with. See :doc:`/colors`.
Examples
+20
View File
@@ -1,2 +1,22 @@
circle
------
Draw a circle centered at the given coordinates
Options
^^^^^^^
.. include:: /args/expansion.rst
.. include:: /args/xy.rst
radius
default: ``100``
radius of the circle. Supports :doc:`/units`.
.. include:: /args/draw.rst
.. include:: /args/range.rst
.. include:: /args/layout.rst
Examples
^^^^^^^^
+61
View File
@@ -1,2 +1,63 @@
curve
-----
Draw a bezier curve using the given coordinates, from x1,y1 to x2,y2. The curvature is set by the control points cx1,cy2 and cx2,cy2.
Options
^^^^^^^
.. include:: /args/expansion.rst
x1
default: ``0``
the x-coordinate of the first endpoint. Supports :doc:`/units`.
y1
default: ``0``
the y-coordinate of the first endpoint. Supports :doc:`/units`.
x2
default: ``5``
the x-coordinate of the second endpoint. Supports :doc:`/units`.
y2
default: ``5``
the y-coordinate of the second endpoint. Supports :doc:`/units`.
cx1
default: ``0``
the x-coordinate of the first control point. Supports :doc:`/units`.
cy1
default: ``0``
the y-coordinate of the first control point. Supports :doc:`/units`.
cx2
default: ``5``
the x-coordinate of the second control point. Supports :doc:`/units`.
cy2
default: ``5``
the y-coordinate of the second control point. Supports :doc:`/units`.
.. include:: /args/draw.rst
.. include:: /args/range.rst
.. include:: /args/layout.rst
Examples
^^^^^^^^
+15
View File
@@ -1,2 +1,17 @@
ellipse
-------
Draw an ellipse at the given coordinates.
Options
^^^^^^^
.. include:: /args/expansion.rst
.. include:: /args/xy.rst
.. include:: /args/wh.rst
.. include:: /args/draw.rst
.. include:: /args/range.rst
.. include:: /args/layout.rst
Examples
^^^^^^^^
+29
View File
@@ -1,2 +1,31 @@
grid
----
Draw an unlimited square grid of lines on the deck, starting with x,y and extending off the end of the deck.
Options
^^^^^^^
.. include:: /args/expansion.rst
.. include:: /args/xy.rst
width
default: ``:deck`` (the width of the deck)
the spacing between vertical gridlines. Supports :doc:`/units`.
height
default: ``:deck`` (the height of the deck)
the spacing between horizontal gridlines. Supports :doc:`/units`.
.. include:: /args/draw.rst
.. include:: /args/range.rst
.. include:: /args/layout.rst
Examples
^^^^^^^^
+50
View File
@@ -1,2 +1,52 @@
line
----
Draw a line from x1,y1 to x2,y2.
Options
^^^^^^^
.. include:: /args/expansion.rst
x1
default: ``0``
the x-coordinate to place. Supports :doc:`/units/`
y1
default: ``0``
the y-coordinate to place. Supports :doc:`/units/`
x2
default: ``50``
the x-coordinate to place. Supports :doc:`/units/`
y2
default: ``50``
the y-coordinate to place. Supports :doc:`/units/`
x3
default: ``0``
the x-coordinate to place. Supports :doc:`/units/`
y3
default: ``50``
the y-coordinate to place. Supports :doc:`/units/`
.. include:: /args/draw.rst
.. include:: /args/range.rst
.. include:: /args/layout.rst
Examples
^^^^^^^^
+28 -2
View File
@@ -1,2 +1,28 @@
polygon
-------
star
----
Draw an n-sided regular polygon, centered at x,y.
Options
^^^^^^^
.. include:: /args/expansion.rst
.. include:: /args/xy.rst
radius
default: 0
the distance from the center of the star to the inner circle of its points. Supports :doc:`/units`.
angle
default: 0
the angle at which to rotate the star
.. include:: /args/draw.rst
.. include:: /args/range.rst
.. include:: /args/layout.rst
Examples
^^^^^^^^
+16
View File
@@ -1,2 +1,18 @@
rect
----
Draw a rounded rectangle
Options
^^^^^^^
.. include:: /args/expansion.rst
.. include:: /args/xy.rst
.. include:: /args/wh.rst
.. include:: /args/draw.rst
.. include:: /args/range.rst
.. include:: /args/layout.rst
Examples
^^^^^^^^
+33
View File
@@ -1,2 +1,35 @@
star
----
Draw an n-pointed star, centered at x,y.
Options
^^^^^^^
.. include:: /args/expansion.rst
.. include:: /args/xy.rst
inner_radius
default: 0
the distance from the center of the star to the inner circle of its points. Supports :doc:`/units`.
outer_radius
default: 0
the distance from the center of the star to the outer circle of its points. Supports :doc:`/units`.
angle
default: 0
the angle at which to rotate the star
.. include:: /args/draw.rst
.. include:: /args/range.rst
.. include:: /args/layout.rst
Examples
^^^^^^^^
+36
View File
@@ -1,2 +1,38 @@
triangle
--------
Draw a triangle at the given coordinates.
Options
^^^^^^^
.. include:: /args/expansion.rst
x1
default: ``0``
the x-coordinate to place. Supports :doc:`/units/`
y1
default: ``0``
the y-coordinate to place. Supports :doc:`/units/`
x2
default: ``50``
the x-coordinate to place. Supports :doc:`/units/`
y2
default: ``50``
the y-coordinate to place. Supports :doc:`/units/`
.. include:: /args/draw.rst
.. include:: /args/range.rst
.. include:: /args/layout.rst
Examples
^^^^^^^^