Bitmap.new: Difference between revisions
From GiderosMobile
m Text replacement - "</source>" to "</syntaxhighlight>" |
No edit summary |
||
| Line 13: | Line 13: | ||
---- | ---- | ||
'''Available since:''' Gideros 2012.8.2<br/> | '''Available since:''' Gideros 2012.8.2<br/> | ||
| Line 37: | Line 36: | ||
stage:addChild(bitmap2) | stage:addChild(bitmap2) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== See also === | |||
'''[[Buffer.new]]''' | |||
{{Bitmap}} | {{Bitmap}} | ||
Latest revision as of 19:43, 9 October 2026
Available since: Gideros 2011.6
Class: Bitmap
Description
Creates a new Bitmap object using a Texture.
Bitmap.new(texture)
Parameters
texture: (texture) the bitmap texture
Available since: Gideros 2012.8.2
Class: Bitmap
Description
Creates a new Bitmap object using a TextureRegion.
Bitmap.new(textureRegion)
Parameters
textureRegion: (textureRegion) the bitmap texture region
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)
See also