TextureRegion.new

From GiderosMobile
Revision as of 21:07, 1 January 2022 by MoKaLux (talk | contribs) (rearranged and removed language stuff)

Available since: Gideros 2011.6
Class: TextureRegion

Description

Creates a new TextureRegion object.

TextureRegion.new(texture)
TextureRegion.new(texture,x,y,width,height)

If TextureRegion object is created with 1 parameter (texture), it specifies the whole texture.

If TextureRegion object is created with 5 parameters (texture, x, y, width, height), it specifies a rectangular region within texture.

Parameters

texture: (TextureBase) texture object
x: (number) left coordinate of the region
y: (number) top coordinate of the region
width: (number) width of the region
height: (number) height of the region