Image.rotate
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.