mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
New image functions:
* invert * flip_horizontal * flip_vertical * rotate git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1472 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
Function: flip_horizontal
|
||||
|
||||
--Usage--
|
||||
> flip_horizontal(input: image)
|
||||
|
||||
Flip an image horizontally.
|
||||
|
||||
--Parameters--
|
||||
! Parameter Type Description
|
||||
| @input@ [[type:image]] Image to flip.
|
||||
|
||||
--Examples--
|
||||
> flip_horizontal("image_logo.png") == [[Image]]
|
||||
>>> flip_horizontal(<img src="image_logo.png" alt='"image_logo.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />) == <img src="image_logo_hflip.png" alt='"image_logo_hflip.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />
|
||||
|
||||
--See also--
|
||||
| [[fun:flip_vertical]] Flip an image vertically
|
||||
| [[fun:rotate]] Rotate an image
|
||||
@@ -0,0 +1,18 @@
|
||||
Function: flip_vertical
|
||||
|
||||
--Usage--
|
||||
> flip_vertical(input: image)
|
||||
|
||||
Flip an image vertically.
|
||||
|
||||
--Parameters--
|
||||
! Parameter Type Description
|
||||
| @input@ [[type:image]] Image to flip.
|
||||
|
||||
--Examples--
|
||||
> flip_vertical("image_logo.png") == [[Image]]
|
||||
>>> flip_vertical(<img src="image_logo.png" alt='"image_logo.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />) == <img src="image_logo_vflip.png" alt='"image_logo_vflip.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />
|
||||
|
||||
--See also--
|
||||
| [[fun:flip_horizontal]] Flip an image horizontally
|
||||
| [[fun:rotate]] Rotate an image
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
@@ -83,8 +83,12 @@ These functions are built into the program, other [[type:function]]s can be defi
|
||||
| [[fun:set_alpha]] Change the transparency of an image.
|
||||
| [[fun:set_combine]] Change how the image should be combined with the background.
|
||||
| [[fun:saturate]] Saturate/desaturate an image.
|
||||
| [[fun:invert]] Invert the colors of an image.
|
||||
| [[fun:enlarge]] Enlarge an image by putting a border around it.
|
||||
| [[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: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.
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Function: invert
|
||||
|
||||
--Usage--
|
||||
> invert(input: image)
|
||||
|
||||
Invert the colors in an image.
|
||||
|
||||
--Parameters--
|
||||
! Parameter Type Description
|
||||
| @input@ [[type:image]] Image to invert.
|
||||
|
||||
--Examples--
|
||||
> invert("image_logo.png") == [[Image]]
|
||||
>>> invert(<img src="image_logo.png" alt='"image_logo.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />) == <img src="image_logo_invert.png" alt='"image_logo_invert.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />
|
||||
@@ -0,0 +1,19 @@
|
||||
Function: flip_vertical
|
||||
|
||||
--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(<img src="image_logo.png" alt='"image_logo.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />, angle:30) == <img src="image_logo_rotate30.png" alt='"image_logo_rotate30.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />
|
||||
|
||||
--See also--
|
||||
| [[fun:flip_horizontal]] Flip an image horizontally
|
||||
| [[fun:flip_vertical]] Flip an image vertically
|
||||
@@ -19,3 +19,5 @@ To desaturate use an amount between @0@ (no desaturation) and @-1@ (convert to g
|
||||
>>> saturate(<img src="image5.png" alt='"image5.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />, amount: 0.5) == <img src="image_saturate1.png" alt='"image_saturate1.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />
|
||||
> saturate("image5.png", amount: -0.5) == [[Image]]
|
||||
>>> saturate(<img src="image5.png" alt='"image5.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />, amount: -0.5) == <img src="image_saturate2.png" alt='"image_saturate2.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />
|
||||
> saturate("image_logo.png", amount: -1) == [[Image]]
|
||||
>>> saturate(<img src="image_logo.png" alt='"image_logo.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />, amount: -1) == <img src="image_logo_desaturate.png" alt='"image_logo_desaturate.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />
|
||||
|
||||
Reference in New Issue
Block a user