Difference between revisions of "TextureRegion.new"
From GiderosMobile
Line 2: | Line 2: | ||
'''Available since:''' Gideros 2011.6<br/> | '''Available since:''' Gideros 2011.6<br/> | ||
=== Description === | === Description === | ||
− | <br /> | + | <translate><br /> |
Creates a new TextureRegion object.<br /> | Creates a new TextureRegion object.<br /> | ||
− | <br /> | + | <br /></translate> |
<source lang="lua"> | <source lang="lua"> | ||
TextureRegion.new(texture) | TextureRegion.new(texture) | ||
</source> | </source> | ||
=== Parameters === | === Parameters === | ||
− | '''texture''': (TextureBase) texture object <br/> | + | '''texture''': (TextureBase) <translate>texture object</translate> <br/> |
__NOTOC__ | __NOTOC__ | ||
'''Available since:''' Gideros 2011.6<br/> | '''Available since:''' Gideros 2011.6<br/> | ||
=== Description === | === Description === | ||
− | <br /> | + | <translate><br /> |
Creates a new TextureRegion object.<br /> | Creates a new TextureRegion object.<br /> | ||
<br /> | <br /> | ||
Line 20: | Line 20: | ||
<li>If TextureRegion object is created with 5 parameters (texture, x, y, width, height), if specifies a rectangular region within texture.</li><br /> | <li>If TextureRegion object is created with 5 parameters (texture, x, y, width, height), if specifies a rectangular region within texture.</li><br /> | ||
</ul><br /> | </ul><br /> | ||
− | <br /> | + | <br /></translate> |
<source lang="lua"> | <source lang="lua"> | ||
TextureRegion.new(texture,x,y,width,height) | TextureRegion.new(texture,x,y,width,height) | ||
</source> | </source> | ||
=== Parameters === | === Parameters === | ||
− | '''texture''': (TextureBase) texture object <br/> | + | '''texture''': (TextureBase) <translate>texture object</translate> <br/> |
− | '''x''': (number) left coordinate of the region <br/> | + | '''x''': (number) <translate>left coordinate of the region</translate> <br/> |
− | '''y''': (number) top coordinate of the region <br/> | + | '''y''': (number) <translate>top coordinate of the region</translate> <br/> |
− | '''width''': (number) width of the region <br/> | + | '''width''': (number) <translate>width of the region</translate> <br/> |
− | '''height''': (number) height of the region <br/> | + | '''height''': (number) <translate>height of the region</translate> <br/> |
Revision as of 13:33, 23 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