image methods - Protovision/moonbase GitHub Wiki
image:draw( rect )
Draws the image to the window. The first two numbers stored in rect represent the x and y coordinates to draw to. rect can contain two more numbers, specifying the width and height to scale the image to
image:drawBackground( )
Draws the image, scaled to fit the size of the entire window
image:drawClip( dest, source )
Draws a section of the image into the window. source is an array containing the x coordinate, y coordinate, width and height to clip out of the image. dest is an array containing the x and y coordinates to draw the image to in the window. dest may also contain two more numbers specifying the width and height to scale the image to
image:getSize( )
Returns an array containing the width and height of the image
image:getAlpha( )
Returns a normalized number from 0.0 to 1.0 representing the alpha level of the image
image:setAlpha( alpha )
Sets the alpha level of the image. alpha is a normalized number from 0.0 to 1.0