Difference between revisions of "Image.flip"
Jump to navigation
Jump to search
(Created page with "<c>Image.flip</c> sets the image to be drawn either flipped vertically or horizontally. === Arguments === {| class="wikitable" |- ! Parameter Name !! Type !! Default Val...") |
m (Fix minor formatting error) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | <c>[[Image]].flip</c> | + | <c>[[Image]].flip</c> flips an image in memory, either vertically or horizontally. |
=== Arguments === | === Arguments === | ||
| Line 7: | Line 7: | ||
! Parameter Name !! Type !! Default Value !! Meaning | ! Parameter Name !! Type !! Default Value !! Meaning | ||
|- | |- | ||
| − | | '' | + | | ''vertical'' || boolean || false || flips the image vertically when true and horizontally when false |
|} | |} | ||
| Line 13: | Line 13: | ||
<ms>img = file.loadImage("/sys/pics/Wumpus.png") | <ms>img = file.loadImage("/sys/pics/Wumpus.png") | ||
| − | img.flip | + | img.flip false |
| + | view img</ms> | ||
| + | |||
| + | After running the above code, <c>img</c> refers to a horizontally-flipped version of the standard Wumpus image. | ||
[[Category:Mini Micro]] | [[Category:Mini Micro]] | ||
[[Category:Soda]] | [[Category:Soda]] | ||
Latest revision as of 14:22, 18 January 2025
Image.flip flips an image in memory, either vertically or horizontally.
Arguments
| Parameter Name | Type | Default Value | Meaning |
|---|---|---|---|
| vertical | boolean | false | flips the image vertically when true and horizontally when false |
Example
img = file.loadImage("/sys/pics/Wumpus.png")
img.flip false
view img
After running the above code, img refers to a horizontally-flipped version of the standard Wumpus image.