Difference between revisions of "Bitmap.new"

From GiderosMobile
Line 3: Line 3:
 
=== Description ===
 
=== Description ===
 
<translate><br />
 
<translate><br />
Creates a new [[Bitmap]] object.<br />
+
Creates a new [[Special:MyLanguage/Bitmap|Bitmap]] object.<br />
 
<br />
 
<br />
 
<br /></translate>
 
<br /></translate>

Revision as of 16:35, 23 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)