Difference between revisions of "Image.flip"

From MiniScript Wiki
Jump to navigation Jump to search
m (Fix minor formatting error)
 
Line 16: Line 16:
 
view img</ms>
 
view img</ms>
  
After running the above code, `img` refers to a horizontally-flipped version of the standard Wumpus image.
+
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.