diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/en/functions/images/index.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/content/en/functions/images/index.md b/docs/content/en/functions/images/index.md index 5553aee92..274072dba 100644 --- a/docs/content/en/functions/images/index.md +++ b/docs/content/en/functions/images/index.md @@ -40,6 +40,27 @@ A shorter version of the above, if you only need to apply the filter once: The above will overlay `$logo` in the upper left corner of `$img` (at position `x=50, y=50`). +### Text + +Using the `Text` filter, you can add text to an image. + +{{% funcsig %}} +images.Text TEXT DICT) +{{% /funcsig %}} + +The following example will add the text `Hugo rocks!` to the image with the specified color, size and position. + +``` +{{ $img := resources.Get "/images/background.png"}} +{{ $img = $img.Filter (images.Text "Hugo rocks!" (dict + "color" "#ffffff" + "size" 60 + "linespacing" 2 + "x" 10 + "y" 20 +))}} +``` + ### Brightness {{% funcsig %}} |