Texture.loadFromImage

Load the texture from an image. * The area argument can be used to load only a sub-rectangle of the whole image. If you want the entire image then leave the default value (which is an empty IntRect). If the area rectangle crosses the bounds of the image, it is adjusted to fit the image size. * The maximum size for a texture depends on the graphics driver and can be retrieved with the getMaximumSize function. * If this function fails, the texture is left unchanged. *

class Texture
bool
loadFromImage

Parameters

image
Type: Image

Image to load into the texture

area
Type: IntRect

Area of the image to load *

Return Value

Type: bool

true if loading was successful, false otherwise.

Meta