From d4bd16a37b6f84d16ef54693fe74691ceb0afa41 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Sun, 7 Feb 2016 22:56:19 -0500 Subject: [PATCH] docs: png and hint ported over --- docs/args/transform.rst | 49 +++++++++++++++++++++++++++++++++++++++++ docs/config.rst | 2 ++ docs/dsl/hint.rst | 15 ++++++++++++- docs/dsl/png.rst | 49 ++++++++++++++++++++++++++++++++++++++++- docs/index.rst | 1 + 5 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 docs/args/transform.rst create mode 100644 docs/config.rst diff --git a/docs/args/transform.rst b/docs/args/transform.rst new file mode 100644 index 0000000..eb15fe9 --- /dev/null +++ b/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). diff --git a/docs/config.rst b/docs/config.rst new file mode 100644 index 0000000..5185bb8 --- /dev/null +++ b/docs/config.rst @@ -0,0 +1,2 @@ +Options for config.yml +====================== diff --git a/docs/dsl/hint.rst b/docs/dsl/hint.rst index af9e385..b6058ce 100644 --- a/docs/dsl/hint.rst +++ b/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 +-------- diff --git a/docs/dsl/png.rst b/docs/dsl/png.rst index 6c5710e..b804bdf 100644 --- a/docs/dsl/png.rst +++ b/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 +-------- diff --git a/docs/index.rst b/docs/index.rst index e6717a0..63334b8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -14,6 +14,7 @@ Contents: layouts units colors + config get_help dsl/index.rst