Difference between revisions of "TextureRegion.new"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Available since:''' Gideros 2011.6<br/> | + | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> |
− | === Description === | + | === <translate>Description</translate> === |
<translate><br /> | <translate><br /> | ||
Creates a new TextureRegion object.<br /> | Creates a new TextureRegion object.<br /> | ||
Line 8: | Line 8: | ||
TextureRegion.new(texture) | TextureRegion.new(texture) | ||
</source> | </source> | ||
− | === Parameters === | + | === <translate>Parameters</translate> === |
'''texture''': (TextureBase) <translate>texture object</translate> <br/> | '''texture''': (TextureBase) <translate>texture object</translate> <br/> | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Available since:''' Gideros 2011.6<br/> | + | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> |
− | === Description === | + | === <translate>Description</translate> === |
<translate><br /> | <translate><br /> | ||
Creates a new TextureRegion object.<br /> | Creates a new TextureRegion object.<br /> | ||
Line 24: | Line 24: | ||
TextureRegion.new(texture,x,y,width,height) | TextureRegion.new(texture,x,y,width,height) | ||
</source> | </source> | ||
− | === Parameters === | + | === <translate>Parameters</translate> === |
'''texture''': (TextureBase) <translate>texture object</translate> <br/> | '''texture''': (TextureBase) <translate>texture object</translate> <br/> | ||
'''x''': (number) <translate>left coordinate of the region</translate> <br/> | '''x''': (number) <translate>left coordinate of the region</translate> <br/> |
Revision as of 07:29, 24 August 2018
Available since: Gideros 2011.6
Description
Creates a new TextureRegion object.
TextureRegion.new(texture)
Parameters
texture: (TextureBase) texture object
Available since: Gideros 2011.6
Description
Creates a new TextureRegion object.
<ul>
<li>If TextureRegion object is created with 1 parameter (texture), it specifies the whole texture.</li>
<li>If TextureRegion object is created with 5 parameters (texture, x, y, width, height), if specifies a rectangular region within texture.</li>
</ul>
TextureRegion.new(texture,x,y,width,height)
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