Difference between revisions of "Bitmap.new"
From GiderosMobile
Line 3: | Line 3: | ||
=== Description === | === Description === | ||
<translate><br /> | <translate><br /> | ||
− | Creates a new | + | Creates a new [[Bitmap]] object.<br /> |
<br /> | <br /> | ||
<br /></translate> | <br /></translate> |
Revision as of 13:55, 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("image.png")
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)