Difference between revisions of "Rotate"
Jump to navigation
Jump to search
m |
m (Admin moved page Img rotate to Rotate) |
(No difference)
|
Revision as of 09:11, 25 December 2017
Description
img_rotate(image_id,degrees)
img_rotate is used to rotate a previously added image. The image will be rotated around the center of the image.
Return value
This function won't return a value.
Arguments
# | Argument | Type | Description |
---|---|---|---|
1 | image_id | Number | Image identifier. This number can be obtained by calling either img_add or img_add_fullscreen. |
2 | degrees | Number | Number of degrees to rotate the image to. This value may be larger than 360, the modulus will be used in that case. |
Example
-- Load and display text and images
myimage1 = img_add_fullscreen("myimage1.png")
-- Rotate myimage1 to 90 degrees
img_rotate(myimage1, 90 )
-- This will also rotate the image to 90 degrees (450-360)
img_rotate(myimage1, 450)