Difference between revisions of "Pixel"
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | |||
<languages /> | <languages /> | ||
− | |||
<!-- GIDEROSOBJ:Pixel --> | <!-- GIDEROSOBJ:Pixel --> | ||
− | + | '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> | |
− | '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]] | + | '''<translate>Available since</translate>:''' Gideros 2016.06<br/> |
− | <br/> | + | '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> |
− | |||
− | '''<translate>Available since</translate>:''' Gideros 2016.06 | ||
− | <br/> | ||
− | |||
− | '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]] | ||
− | <br/> | ||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
− | |||
A rectangular Sprite which can be filled with solid colors, gradients or textures. | A rectangular Sprite which can be filled with solid colors, gradients or textures. | ||
Pixel aims at being a simpler and faster alternative to Shape when needing to display a coloured box or box with a gradient. It is also useful as Bitmap replacement since every texture will be fitted into Pixel dimensions automatically. | Pixel aims at being a simpler and faster alternative to Shape when needing to display a coloured box or box with a gradient. It is also useful as Bitmap replacement since every texture will be fitted into Pixel dimensions automatically. | ||
− | |||
=== <translate>Example</translate> === | === <translate>Example</translate> === | ||
Line 28: | Line 18: | ||
stage:addChild(mypixel) | stage:addChild(mypixel) | ||
</source> | </source> | ||
− | |||
{|- | {|- | ||
Line 55: | Line 44: | ||
=== <translate>Constants</translate> === | === <translate>Constants</translate> === | ||
|} | |} | ||
− | |||
− |
Revision as of 23:51, 9 December 2019
Supported platforms:
Available since: Gideros 2016.06
Inherits from: Sprite
Description
A rectangular Sprite which can be filled with solid colors, gradients or textures. Pixel aims at being a simpler and faster alternative to Shape when needing to display a coloured box or box with a gradient. It is also useful as Bitmap replacement since every texture will be fitted into Pixel dimensions automatically.
Example
local mypixel = Pixel.new(0x0000FF, 0.75, 128, 128)
mypixel:setAnchorPoint(0.5, 0.5)
mypixel:setPosition(application:getContentWidth() / 2, 64)
stage:addChild(mypixel)
MethodsPixel.new Create new pixel |
EventsConstants |