Difference between revisions of "Pixel"
(added example to the main pixel page) |
|||
Line 44: | Line 44: | ||
[[Special:MyLanguage/Pixel:setDimensions|Pixel:setDimensions]] ''<translate>Sets both width and height of the Pixel.</translate>''<br/><!-- GIDEROSMTD:Pixel:setDimensions(w,h) Sets both width and height of the Pixel. --> | [[Special:MyLanguage/Pixel:setDimensions|Pixel:setDimensions]] ''<translate>Sets both width and height of the Pixel.</translate>''<br/><!-- GIDEROSMTD:Pixel:setDimensions(w,h) Sets both width and height of the Pixel. --> | ||
[[Special:MyLanguage/Pixel:setHeight|Pixel:setHeight]] ''<translate>Sets the height of the pixel sprite.</translate>''<br/><!-- GIDEROSMTD:Pixel:setHeight(h) Sets the height of the pixel sprite. --> | [[Special:MyLanguage/Pixel:setHeight|Pixel:setHeight]] ''<translate>Sets the height of the pixel sprite.</translate>''<br/><!-- GIDEROSMTD:Pixel:setHeight(h) Sets the height of the pixel sprite. --> | ||
+ | [[Special:MyLanguage/Pixel:setNinePatch|Pixel:setNinePatch]] ''<translate>Configure 9-patch style texture rendering.</translate>''<br/><!-- GIDEROSMTD:Pixel:setNinePatch(vl,vr,vt,vb,tl,tr,tt,tb) --> | ||
[[Special:MyLanguage/Pixel:setTexture|Pixel:setTexture]] <br/><!-- GIDEROSMTD:Pixel:setTexture(texture,slot,matrix) --> | [[Special:MyLanguage/Pixel:setTexture|Pixel:setTexture]] <br/><!-- GIDEROSMTD:Pixel:setTexture(texture,slot,matrix) --> | ||
[[Special:MyLanguage/Pixel:setTextureMatrix|Pixel:setTextureMatrix]] <br/><!-- GIDEROSMTD:Pixel:setTextureMatrix(matrix) --> | [[Special:MyLanguage/Pixel:setTextureMatrix|Pixel:setTextureMatrix]] <br/><!-- GIDEROSMTD:Pixel:setTextureMatrix(matrix) --> |
Revision as of 08:00, 27 August 2019
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 |