Difference between revisions of "Pixel"

From GiderosMobile
Line 8: Line 8:
 
| style="width: 50%;"|
 
| style="width: 50%;"|
 
=== Methods ===
 
=== Methods ===
[[Pixel.new]] - Create new pixel<br/>
+
[[Pixel.new]] {{<translate>Create new pixel</translate>}}<br/>
[[Pixel.new]] - Constructor to create a Pixel with texture in letterbox mode.<br/>
+
[[Pixel.new]] {{<translate>Constructor to create a Pixel with texture in letterbox mode.</translate>}}<br/>
[[Pixel:getColor]] - Gets the color(s) of the Pixel<br/>
+
[[Pixel:getColor]] {{<translate>Gets the color(s) of the Pixel</translate>}}<br/>
[[Pixel:getDimensions]] - <br/>
+
[[Pixel:getDimensions]] {{<translate></translate>}}<br/>
[[Pixel:getTexturePosition]] - <br/>
+
[[Pixel:getTexturePosition]] {{<translate></translate>}}<br/>
[[Pixel:getTextureScale]] - <br/>
+
[[Pixel:getTextureScale]] {{<translate></translate>}}<br/>
[[Pixel:setColor]] - Sets the color of the Pixel<br/>
+
[[Pixel:setColor]] {{<translate>Sets the color of the Pixel</translate>}}<br/>
[[Pixel:setColor]] - <br/>
+
[[Pixel:setColor]] {{<translate></translate>}}<br/>
[[Pixel:setColor]] - Sets 4-colour gradient.<br/>
+
[[Pixel:setColor]] {{<translate>Sets 4-colour gradient.</translate>}}<br/>
[[Pixel:setDimensions]] - Sets both width and height of the Pixel.<br/>
+
[[Pixel:setDimensions]] {{<translate>Sets both width and height of the Pixel.</translate>}}<br/>
[[Pixel:setHeight]] - Sets the height of the pixel sprite.<br/>
+
[[Pixel:setHeight]] {{<translate>Sets the height of the pixel sprite.</translate>}}<br/>
[[Pixel:setTexture]] - <br/>
+
[[Pixel:setTexture]] {{<translate></translate>}}<br/>
[[Pixel:setTextureMatrix]] - <br/>
+
[[Pixel:setTextureMatrix]] {{<translate></translate>}}<br/>
[[Pixel:setTexturePosition]] - <br/>
+
[[Pixel:setTexturePosition]] {{<translate></translate>}}<br/>
[[Pixel:setTextureScale]] - <br/>
+
[[Pixel:setTextureScale]] {{<translate></translate>}}<br/>
[[Pixel:setWidth]] - Sets the width of the pixel sprite.<br/>
+
[[Pixel:setWidth]] {{<translate>Sets the width of the pixel sprite.</translate>}}<br/>
 
| style="width: 50%;"|
 
| style="width: 50%;"|
 
=== Events ===
 
=== Events ===
 
=== Constants ===
 
=== Constants ===
 
|}
 
|}

Revision as of 14:19, 23 August 2018

Supported platforms:
Available since: Gideros 2016.06

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

Events

Constants