cut

open override fun cut(x: Int, y: Int, w: Int, h: Int, name: String): Texture

Returns a sub-texture defined by a specified rectangular region. The returned Texture shares the same data array as the original.

Return

sub-texture

Parameters

x

the X coordinate of the upper-left corner of the specified rectangular region

y

the Y coordinate of the upper-left corner of the specified rectangular region

w

the width of the specified rectangular region

h

the height of the specified rectangular region

Throws

if the specified area is not contained within this Texture.