Image.rotate

From MiniScript Wiki
Revision as of 14:21, 18 January 2025 by JoeStrout (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Image.rotate rotates an image in memory, in 90 degree increments. All other degree values will print an error and have no effect on the image. Values that fall outside of 0 to 360 are valid so long as they are increments of 90 degrees.

Arguments

Parameter Name Type Default Value Meaning
degrees number 90 amount of counter-clockwise rotation to apply

Example

img = file.loadImage("/sys/pics/Wumpus.png")
img.rotate -90
view img

After running the above code, img refers to a version of the standard Wumpus image that has been rotated 90° to the right.