Difference between revisions of "Pixel"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Supported platforms:''' <br/>
+
'''<translate>Supported platforms</translate>:''' <br/>
'''Available since:''' Gideros 2016.06<br/>
+
'''<translate>Available since</translate>:''' Gideros 2016.06<br/>
 +
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<translate>A rectangular Sprite which can be filled with solid colors, gradients or textures.
 
<translate>A rectangular Sprite which can be filled with solid colors, gradients or textures.

Revision as of 10:29, 24 August 2018

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.

Methods

Pixel.new Create new pixel
Pixel.new Constructor to create a Pixel with texture in letterbox mode.
Pixel:getColor Gets the color(s) of the Pixel
Pixel:getDimensions
Pixel:getTexturePosition
Pixel:getTextureScale
Pixel:setColor Sets the color of the Pixel
Pixel:setColor
Pixel:setColor Sets 4-colour gradient.
Pixel:setDimensions Sets both width and height of the Pixel.
Pixel:setHeight Sets the height of the pixel sprite.
Pixel:setTexture
Pixel:setTextureMatrix
Pixel:setTexturePosition
Pixel:setTextureScale
Pixel:setWidth Sets the width of the pixel sprite.

Events

Constants