Class: Texture

Texture(filename)

A Texture stores an Image and a Rectangle that indicates which region of the Image will be drawn.

Constructor

new Texture(filename)

Initialize Image and Rectangle objects; Load image file and set size of rectangle to image dimensions.
Parameters:
Name Type Description
filename string the name (including path) of the image file
Source: