docs: porting hand, showcase, and other docs over

This commit is contained in:
Andy Meneely
2016-01-29 23:13:42 -05:00
parent ec767110a6
commit aca97e7551
8 changed files with 241 additions and 4 deletions
+39 -1
View File
@@ -1,2 +1,40 @@
hand
----
====
Renders a range of cards fanned out as if in a hand. Saves as PNG regardless of back end.
Options
-------
radius
default: ``:auto``
The distance from the bottom of each card to the center of the fan. If set to ``:auto``, then it is computed as 30% of the card's height. Why 30%? Because it looks good that way. Reasons.
angle_range
default: ``((Math::PI / -4.0)..(Math::PI / 2))``
The overall width of the fan, in radians. Angle of zero is a vertical card. Further negative angles widen the fan counter-clockwise and positive angles widen the fan clockwise.
margin
default: ``75``
the margin around the entire image. Supports :doc:`/units`.
fill_color
default: ``:white``
Backdrop color. See :doc:`/colors`.
.. include:: /args/trim.rst
file
default: ``'hand.png'``
The file to save relative to the current directory. Will overwrite without warning.
.. include:: /args/output_dir.rst
.. include:: /args/range.rst
Examples
--------
+63
View File
@@ -1,2 +1,65 @@
showcase
========
Renders a range of cards in a showcase as if they are sitting in 3D on a reflective surface.
Options
-------
.. include:: /args/trim.rst
scale
default: ``0.8``
Percentage of original width of each (trimmed) card to scale to. Must be between 0.0 and 1.0, but starts looking bad around 0.6.
offset
default: ``1.1``
Percentage of the scaled width of each card to shift each offset. e.g. 1.1 is a 10% shift, and 0.95 is overlapping by 5%
fill_color
default: ``:white``
Backdrop color. Usually black or white. See :doc:`/colors`.
reflect_offset
default: ``15``
The number of pixels between the bottom of the card and the reflection. See :doc:`/units`
reflect_strength
default: ``0.2``
The starting alpha transparency of the reflection (at the top of the card). Percentage between 0 and 1. Looks more realistic at low values since even shiny surfaces lose a lot of light.
reflect_percent
default: ``0.25``
The length of the reflection in percentage of the card. Larger values tend to make the reflection draw just as much attention as the card, which is not good.
face
default: ``:left``
which direction the cards face. Anything but ``:right`` will face left
margin
default: ``75``
the margin around the entire image. Supports :doc:`/units`
fill_color
default: ``:white``
Backdrop color. Supports :doc:`/colors`.
file
default: ``'showcase.png'``
The file to save relative to the current directory. Will overwrite without warning.
.. include:: /args/output_dir.rst
.. include:: /args/range.rst
Examples
--------