Difference between revisions of "Bitmap.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 [[Special:MyLanguage/Bitmap|Bitmap]] object.<br />
 
Creates a new [[Special:MyLanguage/Bitmap|Bitmap]] object.<br />
Line 9: Line 9:
 
  Bitmap.new(texture)
 
  Bitmap.new(texture)
 
</source>
 
</source>
=== Parameters ===
+
=== <translate>Parameters</translate> ===
 
'''texture''': (TextureBase or TextureRegion) <translate></translate> <br/>
 
'''texture''': (TextureBase or TextureRegion) <translate></translate> <br/>
=== Examples ===
+
=== <translate>Examples</translate> ===
 
'''Example'''<br/>
 
'''Example'''<br/>
 
<source lang="lua">local texture = Texture.new(&quot;image.png&quot;)
 
<source lang="lua">local texture = Texture.new(&quot;image.png&quot;)

Revision as of 07:28, 24 August 2018

Available since: Gideros 2011.6

Description


Creates a new Bitmap object.


 Bitmap.new(texture)

Parameters

texture: (TextureBase or TextureRegion)

Examples

Example

local texture = Texture.new(&quot;image.png&quot;)

local region = TextureRegion.new(texture, 0, 0, 100, 50)

local bitmap1 = Bitmap.new(texture)
local bitmap2 = Bitmap.new(region)

stage:addChild(bitmap1)
stage:addChild(bitmap2)