Browse Source

docs: png and hint ported over

dev
Andy Meneely 10 years ago
parent
commit
d4bd16a37b
  1. 49
      docs/args/transform.rst
  2. 2
      docs/config.rst
  3. 15
      docs/dsl/hint.rst
  4. 49
      docs/dsl/png.rst
  5. 1
      docs/index.rst

49
docs/args/transform.rst

@ -0,0 +1,49 @@
angle
default: ``0``
Rotation of the in radians. Note that this rotates around the upper-left corner, making the placement of x-y coordinates slightly tricky.
crop_x
default: ``0``
Crop the loaded image at this x coordinate. Supports :doc:`/units`.
crop_y
default: ``0``
Crop the loaded image at this y coordinate. Supports :doc:`/units`.
crop_corner_radius
default: ``0``
Radius for rounded corners, both x and y. When set, overrides crop_corner_x_radius and crop_corner_y_radius. Supports :doc:`/units`.
crop_corner_x_radius
default: ``0``
x radius for rounded corners of cropped image. Supports :doc:`/units`.
crop_corner_y_radius
default: ``0``
y radius for rounded corners of cropped image. Supports :doc:`/units`.
crop_width
default: ``:native``
Width of the cropped image. Supports :doc:`/units`.
crop_height
default: ``:native``
Height of the cropped image. Supports :doc:`/units`.
flip_horiztonal
default: ``false``
Flip this image about its center horizontally (i.e. left becomes right and vice versa).
flip_vertical
default: ``false``
Flip this image about its center verticall (i.e. top becomes bottom and vice versa).

2
docs/config.rst

@ -0,0 +1,2 @@
Options for config.yml
======================

15
docs/dsl/hint.rst

@ -1,2 +1,15 @@
hint
----
====
Toggle text hints globally. A text hint is a 1-pixel line drawn around the extents of a text box. They are intended to be temporary guides.
Options
-------
text
default: ``:off``
The color of the text hint. See :doc:`/colors` To turn off use ``:off`` or ``nil``.
Examples
--------

49
docs/dsl/png.rst

@ -1,2 +1,49 @@
png
---
===
Renders PNG images.
Options
-------
.. include:: /args/expansion.rst
file
default: ``''``
file(s) to read in. As in :doc:`/arrays`, if this a single file, then it's use for every card in range. If the parameter is an Array of files, then each file is looked up for each card. If any of them are nil or '', nothing is done for that card.
.. include:: /args/xy.rst
width
default: ``:native``
the pixel width that the image should scale to. Supports :doc:`/units`. When set to ``:native``, uses the DPI and units of the loaded SVG document. Using ``:deck`` will scale to the deck width. Using ``:scale`` will use the ``height`` to scale and keep native the aspect ratio. Scaling PNGs is not recommended for professional-looking cards, and up-scaling a PNG will throw a warning in the console (see :doc:`/config`).
height
default: ``:native``
the pixel height that the image should scale to. Supports :doc:`/units`. When set to ``:native``, uses the DPI and units of the loaded SVG document. Using ``:deck`` will scale to the deck height. Using ``:scale`` will use the ``width`` to scale and keep native the aspect ratio. Scaling PNGs is not recommended for professional-looking cards, and up-scaling a PNG will throw a warning in the console (see :doc:`/config`).
alpha
default: 1.0
the alpha-transparency percentage used to blend this image. Must be between ``0.0`` and ``1.0``
blend
default: ``:none``
the composite blend operator used when applying this image. See Blend Modes at http://cairographics.org/operators.
The possibilties include :none, :multiply, :screen, :overlay, :darken, :lighten, :color_dodge, :color_burn, :hard_light, :soft_light, :difference, :exclusion, :hsl_hue, :hsl_saturation, :hsl_color, :hsl_luminosity. String versions of these options are accepted too.
mask
default: ``nil``
Accepts a color (see :doc:`/colors`). If specified, the image will be used as a mask for the given color/gradient. Transparent pixels are ignored, opaque pixels are the given color. Note: the origin for gradient coordinates is at the given x,y, not at 0,0 as it is most other places.
.. include:: /args/transform.rst
.. include:: /args/range.rst
.. include:: /args/layout.rst
Examples
--------

1
docs/index.rst

@ -14,6 +14,7 @@ Contents:
layouts
units
colors
config
get_help
dsl/index.rst

Loading…
Cancel
Save