Add option ``aligny`` to specify the vertical alignment of the text
with respect to the ``y`` offset from the top of the image. Possible
values of ``aligny`` are ``top`` (default), ``center``, and ``bottom``.
The height of the block of text is measured from the top of the first
line to the baseline of the last line.
- ``top``: (Current behaviour) The top of the first line of the block of
text is at an offset of ``y`` from the top of the image.
- ``center``: The vertical center of the block of text is at an offset of
``y`` from the top of the image.
- ``bottom``: The baseline of the last line of the text is at an offset
of ``y`` from the top of the image.
Resolves#13414
Add an "alignx" option to the images.Text to control whether the value of the "x" option is the left border of the text (current behaviour), the center of each line or the right border.
Fixes#10849
None of these are useful as plain strings in the templates, which forces the users to do `transform.Plainify "foo" | safeHTML`.
If people have trust issues with the output of these functions, they need to just stop using them.
Closes#8732
This commit adds these new template functions in the `math` namespace:
math.Acos
math.Asin
math.Atan
math.Atan2
math.Cos
math.Pi
math.Sin
math.Tan
math.ToDegrees
math.ToRadians
Co-authored-by: Joe Mooring <joe@mooring.com>
This allows for constructs like:
```
{{ $filters := slice (images.GaussianBlur 8) (images.Grayscale) (images.Process "jpg q30 resize 200x") }}
{{ $img = $img | images.Filter $filters }}
```
Note that the `action` option in `images.Process` is optional (`resize` in the example above), so you can use the above to just set the target format, e.g.:
```
{{ $filters := slice (images.GaussianBlur 8) (images.Grayscale) (images.Process "jpg") }}
{{ $img = $img | images.Filter $filters }}
```
Fixes#8439