Difference between revisions of "TextureRegion.new"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Creates a new TextureRegion object.<br /> <br /> <source lang="lua"> = TextureRegion.new(textur...")
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Available since:''' Gideros 2011.6<br/>
+
<languages />
=== Description ===
+
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
<br />
+
'''<translate>Class</translate>:''' [[Special:MyLanguage/TextureRegion|TextureRegion]]<br/>
 +
=== <translate>Description</translate> ===
 +
<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>
'''texture:''' (TextureBase) texture object ''''''<br/>
+
=== <translate>Parameters</translate> ===
 +
'''texture''': (TextureBase) <translate>texture object</translate> <br/>
 
__NOTOC__
 
__NOTOC__
'''Available since:''' Gideros 2011.6<br/>
+
<languages />
=== Description ===
+
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
<br />
+
'''<translate>Class</translate>:''' [[Special:MyLanguage/TextureRegion|TextureRegion]]<br/>
Creates a new TextureRegion object.<br />
+
=== <translate>Description</translate> ===
<br />
+
<translate><br />
&lt;ul&gt;<br />
+
Creates a new TextureRegion object.
&lt;li&gt;If TextureRegion object is created with 1 parameter (texture), it specifies the whole texture.&lt;/li&gt;<br />
+
 
&lt;li&gt;If TextureRegion object is created with 5 parameters (texture, x, y, width, height), if specifies a rectangular region within texture.&lt;/li&gt;<br />
+
 
&lt;/ul&gt;<br />
+
If TextureRegion object is created with 1 parameter (texture), it specifies the whole texture.<br />
<br />
+
If TextureRegion object is created with 5 parameters (texture, x, y, width, height), if specifies a rectangular region within texture.<br />
 +
</translate>
 +
 
 +
 
 
<source lang="lua">
 
<source lang="lua">
= TextureRegion.new(texturexywidthheight,)
+
TextureRegion.new(texture,x,y,width,height)
 
</source>
 
</source>
'''texture:''' (TextureBase) texture object ''''''<br/>
+
=== <translate>Parameters</translate> ===
'''x:''' (number) left coordinate of the region ''''''<br/>
+
'''texture''': (TextureBase) <translate>texture object</translate> <br/>
'''y:''' (number) top coordinate of the region ''''''<br/>
+
'''x''': (number) <translate>left coordinate of the region</translate> <br/>
'''width:''' (number) width of the region ''''''<br/>
+
'''y''': (number) <translate>top coordinate of the region</translate> <br/>
'''height:''' (number) height of the region ''''''<br/>
+
'''width''': (number) <translate>width of the region</translate> <br/>
 +
'''height''': (number) <translate>height of the region</translate> <br/>
 +
 
 +
{{TextureRegion}}

Revision as of 02:19, 4 December 2019


Available since: Gideros 2011.6
Class: TextureRegion

Description


Creates a new TextureRegion object.

 TextureRegion.new(texture)

Parameters

texture: (TextureBase) texture object


Available since: Gideros 2011.6
Class: TextureRegion

Description


Creates a new TextureRegion object.


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), if specifies a rectangular region within texture.


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