diff --git a/doc/function/index.txt b/doc/function/index.txt index 067c278c..700fdf7d 100644 --- a/doc/function/index.txt +++ b/doc/function/index.txt @@ -90,7 +90,7 @@ These functions are built into the program, other [[type:function]]s can be defi | [[fun:crop]] Crop an image, giving only a small subset of it. | [[fun:flip_horizontal]] Flip an image horizontally. | [[fun:flip_vertical]] Flip an image vertically. -| [[fun:rotate]] Rotate an image. +| [[fun:rotate_image]] Rotate an image. | [[fun:drop_shadow]] Add a drop shadow to an image. | [[fun:symbol_variation]] Render a variation of a [[type:symbol]]. | [[fun:built_in_image]] Return an image built into the program. diff --git a/doc/function/rotate.txt b/doc/function/rotate.txt deleted file mode 100644 index 5c36edc9..00000000 --- a/doc/function/rotate.txt +++ /dev/null @@ -1,21 +0,0 @@ -Function: rotate - -DOC_MSE_VERSION: since 0.3.9 - ---Usage-- -> rotate(input: image, angle: some_number) - -Rotate an image. The image can become larger to accomodate the rotated bounding box. - ---Parameters-- -! Parameter Type Description -| @input@ [[type:image]] Image to rotate. -| @angle@ [[type:double]] Angle to rotate by, in degrees counter clockwise. - ---Examples-- -> rotate("image_logo.png", angle:30) == [[Image]] ->>> rotate("image_logo.png", angle:30) == "image_logo_rotate30.png" - ---See also-- -| [[fun:flip_horizontal]] Flip an image horizontally -| [[fun:flip_vertical]] Flip an image vertically diff --git a/doc/function/rotate_image.txt b/doc/function/rotate_image.txt new file mode 100644 index 00000000..3c168898 --- /dev/null +++ b/doc/function/rotate_image.txt @@ -0,0 +1,21 @@ +Function: rotate_image + +DOC_MSE_VERSION: since 0.3.9, called rotate until 2.0.2 + +--Usage-- +> rotate_image(input: image, angle: some_number) + +Rotate an image. The image can become larger to accomodate the rotated bounding box. + +--Parameters-- +! Parameter Type Description +| @input@ [[type:image]] Image to rotate. +| @angle@ [[type:double]] Angle to rotate by, in degrees counter clockwise. + +--Examples-- +> rotate_image("image_logo.png", angle:30) == [[Image]] +>>> rotate_image("image_logo.png", angle:30) == "image_logo_rotate30.png" + +--See also-- +| [[fun:flip_horizontal]] Flip an image horizontally +| [[fun:flip_vertical]] Flip an image vertically diff --git a/src/script/functions/image.cpp b/src/script/functions/image.cpp index 48e6ee0a..c0d9d0dd 100644 --- a/src/script/functions/image.cpp +++ b/src/script/functions/image.cpp @@ -230,6 +230,7 @@ void init_script_image_functions(Context& ctx) { ctx.setVariable(_("flip_horizontal"), script_flip_horizontal); ctx.setVariable(_("flip_vertical"), script_flip_vertical); ctx.setVariable(_("rotate"), script_rotate); + ctx.setVariable(_("rotate_image"), script_rotate); ctx.setVariable(_("drop_shadow"), script_drop_shadow); ctx.setVariable(_("symbol_variation"), script_symbol_variation); ctx.setVariable(_("built_in_image"), script_built_in_image);