Difference between revisions of "Pixel.new"
m |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | |||
<languages /> | <languages /> | ||
+ | |||
'''<translate>Available since</translate>:''' Gideros 2016.06<br/> | '''<translate>Available since</translate>:''' Gideros 2016.06<br/> | ||
'''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> | '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> | ||
+ | |||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<translate>Create new pixel</translate> | <translate>Create new pixel</translate> | ||
Line 8: | Line 11: | ||
Pixel.new(color,alpha,width,height) | Pixel.new(color,alpha,width,height) | ||
</source> | </source> | ||
+ | |||
=== <translate>Parameters</translate> === | === <translate>Parameters</translate> === | ||
'''color''': (number) <translate>hex value representing color</translate> '''optional'''<br/> | '''color''': (number) <translate>hex value representing color</translate> '''optional'''<br/> | ||
Line 13: | Line 17: | ||
'''width''': (number) <translate>width of pixel</translate> '''optional'''<br/> | '''width''': (number) <translate>width of pixel</translate> '''optional'''<br/> | ||
'''height''': (number) <translate>height of pixel</translate> '''optional'''<br/> | '''height''': (number) <translate>height of pixel</translate> '''optional'''<br/> | ||
+ | |||
__NOTOC__ | __NOTOC__ | ||
+ | |||
<languages /> | <languages /> | ||
− | '''<translate>Available since</translate>:''' | + | |
+ | '''<translate>Available since</translate>:''' Gideros 2016.10<br/> | ||
'''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> | '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> | ||
+ | |||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<translate>Constructor to create a Pixel with texture in letterbox mode. Every texture will be fitted into Pixel dimensions with preserving texture aspect ratio.</translate> | <translate>Constructor to create a Pixel with texture in letterbox mode. Every texture will be fitted into Pixel dimensions with preserving texture aspect ratio.</translate> | ||
Line 22: | Line 30: | ||
Pixel.new(texture,width,height,texture_scale_x,texture_scale_y,texture_x,texture_y) | Pixel.new(texture,width,height,texture_scale_x,texture_scale_y,texture_x,texture_y) | ||
</source> | </source> | ||
+ | |||
=== <translate>Parameters</translate> === | === <translate>Parameters</translate> === | ||
'''texture''': (Texture) <translate>texture to use for the pixel</translate> <br/> | '''texture''': (Texture) <translate>texture to use for the pixel</translate> <br/> |
Revision as of 13:25, 30 September 2019
Available since: Gideros 2016.06
Class: Pixel
Description
Create new pixel
Pixel.new(color,alpha,width,height)
Parameters
color: (number) hex value representing color optional
alpha: (number) alpha value from 0 to 1 optional
width: (number) width of pixel optional
height: (number) height of pixel optional
Available since: Gideros 2016.10
Class: Pixel
Description
Constructor to create a Pixel with texture in letterbox mode. Every texture will be fitted into Pixel dimensions with preserving texture aspect ratio.
Pixel.new(texture,width,height,texture_scale_x,texture_scale_y,texture_x,texture_y)
Parameters
texture: (Texture) texture to use for the pixel
width: (number) width of the Pixel optional
height: (number) height of the Pixel optional
texture_scale_x: (number) horizontal scale of the pixel texture optional
texture_scale_y: (number) vertical scale of the pixel texture optional
texture_x: (number) horizontal position of the pixel texture optional
texture_y: (number) vertical position of the pixel texture optional