Difference between revisions of "Bitmap.new"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | ||
+ | '''<translate>Class</translate>:''' [[Special:MyLanguage/Bitmap|Bitmap]]<br/> | ||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<translate><br /> | <translate><br /> | ||
− | Creates a new | + | Creates a new `Bitmap` object.<br /> |
<br /> | <br /> | ||
<br /></translate> | <br /></translate> |
Revision as of 09:30, 24 August 2018
Available since: Gideros 2011.6
Class: Bitmap
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)