Skip to content

Commit 2159309

Browse files
not-phoeniixdacap
authored andcommitted
Added missing documentation for image and fliptype
1 parent d5cad54 commit 2159309

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

api/fliptype.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# FlipType
22

3+
Type of flipping to be used in [image:flip](image.md#imageflip)
4+
35
## FlipType.HORIZONTAL
6+
Defines a type of image flip that horizontally flips an image across the vertical axis.
47

58
## FlipType.VERTICAL
9+
Defines a type of image flip that vertically flips an image across the horizontal axis.
10+
11+
## FlipType.DIAGONAL
12+
Defines a type of image flip that both vertically and horizontally flips an image across the diagonal axis.

api/image.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,16 @@ are modified).
8282
local w = image.width
8383
```
8484

85+
Returns the width of the image in pixels.
86+
8587
## Image.height
8688

8789
```lua
8890
local h = image.height
8991
```
9092

93+
Returns the height of the image in pixels.
94+
9195
## Image.bounds
9296

9397
```lua
@@ -337,3 +341,12 @@ local rectangle = image:shrinkBounds(refColor)
337341
Returns the shrunken bounds (a [rectangle](rectangle.md#rectangle)) of
338342
the image removing all the empty space of borders using the mask color
339343
or the given reference [color](color.md#color) in `refColor`.
344+
345+
## Image:flip()
346+
347+
```lua
348+
image:flip()
349+
image:flip(FlipType.VERTICAL)
350+
```
351+
352+
Flips an image along an axis defined by a [FlipType](fliptype.md). Flips horizontally if [FlipType](fliptype.md) is not specified by default.

0 commit comments

Comments
 (0)