diff --git a/doc/function/combine_blend.txt b/doc/function/combine_blend.txt index 8e0e60f7..d97d5cbc 100644 --- a/doc/function/combine_blend.txt +++ b/doc/function/combine_blend.txt @@ -15,7 +15,7 @@ The images must have the same size. --Examples-- > combine_blend(image1: "image1.png", image2: "image2.png", combine: "add") == [[Image]] -
combine_blend(image1:+>>> combine_blend(image1:, image2:
, combine: "add") ==
, image2:
, combine: "add") ==
--See also--
| [[fun:linear_blend]] Blend two images together using a linear gradient.
diff --git a/doc/function/curly_quotes.txt b/doc/function/curly_quotes.txt
index e69de29b..a2987614 100644
--- a/doc/function/curly_quotes.txt
+++ b/doc/function/curly_quotes.txt
@@ -0,0 +1,17 @@
+Function: curly_quotes
+
+--Usage--
+> curly_quotes(some_tagged_string)
+
+Make quotes 'curly'.
+Single and double quotation marks are changed to opening or closing versions depending on where they appear in the text.
+
+--Parameters--
+! Parameter Type Description
+| @input@ [[type:tagged string]] String to make quotes curly in.
+
+--Examples--
+>>> curly_quotes("He said: 'This is cool!', she said: \"No way!\" ")
+>>> == "He said: ‘This is cool!’, she said: “No way!” "
+>>> curly_quotes("Also: ’Wrong quotes‘ ")
+>>> == "Also: ‘Wrong quotes’ "
diff --git a/doc/function/enlarge.txt b/doc/function/enlarge.txt
index e69de29b..45693c1e 100644
--- a/doc/function/enlarge.txt
+++ b/doc/function/enlarge.txt
@@ -0,0 +1,16 @@
+Function: enlarge
+
+--Usage--
+> enlarge(input: image, border_size: amount_to_enlarge)
+
+Enlarge an image by putting a transparent border around it.
+The border size is given in percentages of the image size, so @border_size: 1@ makes the image three times as large by putting a border of 100% the size on all sides.
+
+--Parameters--
+! Parameter Type Description
+| @input@ [[type:image]] Image to enlarge
+| @border_size@ [[type:double]] Amount of border to add
+
+--Examples--
+> enlarge(input: "image1.png", border_size: 0.1) == [[Image]]
+>>> enlarge(light:
, border_size: 0.1) ==
diff --git a/doc/function/image1.png b/doc/function/image1.png
index d1028606..46890579 100644
Binary files a/doc/function/image1.png and b/doc/function/image1.png differ
diff --git a/doc/function/image2.png b/doc/function/image2.png
index 8199112e..f75160ab 100644
Binary files a/doc/function/image2.png and b/doc/function/image2.png differ
diff --git a/doc/function/image_combine_blend.png b/doc/function/image_combine_blend.png
index 4b123a1b..befe4211 100644
Binary files a/doc/function/image_combine_blend.png and b/doc/function/image_combine_blend.png differ
diff --git a/doc/function/image_enlarge.png b/doc/function/image_enlarge.png
index 3157a62b..95243c01 100644
Binary files a/doc/function/image_enlarge.png and b/doc/function/image_enlarge.png differ
diff --git a/doc/function/image_linear_blend.png b/doc/function/image_linear_blend.png
index 8619df24..fcd9cf87 100644
Binary files a/doc/function/image_linear_blend.png and b/doc/function/image_linear_blend.png differ
diff --git a/doc/function/image_masked_blend.png b/doc/function/image_masked_blend.png
index 3768781d..ba47c6ae 100644
Binary files a/doc/function/image_masked_blend.png and b/doc/function/image_masked_blend.png differ
diff --git a/doc/function/image_set_alpha.png b/doc/function/image_set_alpha.png
index ae5bcf82..1daca5d1 100644
Binary files a/doc/function/image_set_alpha.png and b/doc/function/image_set_alpha.png differ
diff --git a/doc/function/image_set_mask.png b/doc/function/image_set_mask.png
index 3db5d8dd..98c31864 100644
Binary files a/doc/function/image_set_mask.png and b/doc/function/image_set_mask.png differ
diff --git a/doc/function/linear_blend.txt b/doc/function/linear_blend.txt
index 767a3372..b9711445 100644
--- a/doc/function/linear_blend.txt
+++ b/doc/function/linear_blend.txt
@@ -9,6 +9,9 @@ Function: linear_blend
Blend two images together using a linear gradient.
+Coordinates range from 0 to 1, where 0 is the top and the left, and 1 is the right and the bottom.
+So for example a blend from @x1:0, y1:0@ to @x2:0, y2:1@ is from top to bottom.
+
The images must have the same size.
--Parameters--
@@ -20,8 +23,8 @@ The images must have the same size.
--Examples--
This gives a vertical gradient:
-> linear_blend(image1: "image1.png", image2: "image2.png", x1:0, y1:0, x2:1, y2:1) == [[Image]]
-linear_blend(image1:+> linear_blend(image1: "image1.png", image2: "image2.png", x1:0, y1:0, x2:0, y2:1) == [[Image]] +>>> linear_blend(image1:, image2:
, x1:0, y1:0, x2:1, y2:1) ==
, image2:
, x1:0, y1:0, x2:1, y2:1) ==
--See also--
| [[fun:masked_blend]] Blend two images together using a third mask image.
diff --git a/doc/function/masked_blend.txt b/doc/function/masked_blend.txt
index 1d6419f3..3d66b29b 100644
--- a/doc/function/masked_blend.txt
+++ b/doc/function/masked_blend.txt
@@ -17,7 +17,7 @@ The images must have the same size.
--Examples--
> masked_blend(light: "image1.png", dark: "image2.png", mask: "image3.png") == [[Image]]
-masked_blend(light:+>>> masked_blend(light:, dark:
, mask:
) ==
, dark:
, mask:
) ==
--See also--
| [[fun:linear_blend]] Blend two images together using a linear gradient.
diff --git a/doc/function/remove_tag.txt b/doc/function/remove_tag.txt
index e69de29b..24ed9993 100644
--- a/doc/function/remove_tag.txt
+++ b/doc/function/remove_tag.txt
@@ -0,0 +1,28 @@
+Function: remove_tag
+
+--Usage--
+> remove_tag(tag: some_tag, some_string)
+> tag_remove_rule(tag: some_tag)(some_string)
+
+Remove a tag and its matching close tag from a [[type:tagged string]], but keep the contents.
+
+The tag can be a whole tag, @"
, alpha: 0.5) ==
+
+--See also--
+| [[fun:set_mask]] Set the transparancy mask of an image.
diff --git a/doc/function/set_combine.txt b/doc/function/set_combine.txt
index e69de29b..0208ec19 100644
--- a/doc/function/set_combine.txt
+++ b/doc/function/set_combine.txt
@@ -0,0 +1,17 @@
+Function: set_combine
+
+--Usage--
+> set_combine(input: image, combine: combine_mode)
+
+Set how the resulting image should be combined with the background.
+
+--Parameters--
+! Parameter Type Description
+| @input@ [[type:image]] Image to change combining mode of
+| @combine@ [[type:combine]] Combining function to use
+
+--Examples--
+> set_combine(input: "image1.png", combine: "shadow") == [[Image]]
+
+--See also--
+| [[fun:combine_blend]] Blend two images together using a given [[type:combine|combining mode]].
diff --git a/doc/function/set_mask.txt b/doc/function/set_mask.txt
index e69de29b..340ac8cb 100644
--- a/doc/function/set_mask.txt
+++ b/doc/function/set_mask.txt
@@ -0,0 +1,21 @@
+Function: set_mask
+
+--Usage--
+> set_mask(image: image, mask: mask_image)
+
+Make parts of an image (more) transparent using a mask.
+Black areas in the mask make the image transparent, white areas stay opaque.
+
+The images must have the same size.
+
+--Parameters--
+! Parameter Type Description
+| @image@ [[type:image]] Image to apply the mask to
+| @mask@ [[type:image]] Mask image.
+
+--Examples--
+> set_mask(image: "image1.png", mask: "image3.png") == [[Image]]
+>>> set_mask(image:
, mask:
) ==
+
+--See also--
+| [[fun:set_alpha]] Change the transparency of an image.
diff --git a/doc/function/sort_text.txt b/doc/function/sort_text.txt
new file mode 100644
index 00000000..9e4a5eee
--- /dev/null
+++ b/doc/function/sort_text.txt
@@ -0,0 +1,37 @@
+Function: sort_text
+
+--Usage--
+> sort_text(order: order specification, some_text)
+> sort_rule(order: order specification)(some_text)
+
+Sort a string or filter it by keeping specific characters.
+
+When the @order@ parameter is not given, the input is sorted in alphabetical order.
+
+Otherwise the @order@ parameter determines what characters to show in the output.
+The @order@ is a string consisting of multiple ''parts'', each part selects a specific thing from the input.
+! Part sort("zzyyxx") Description
+| @"x"@ @"xx"@ A normal character, selects all matching characters from the input
+| @"