Difference between revisions of "Pixel:setNinePatch"

From GiderosMobile
(modified variable names in parameters description)
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2019.9<br/>
'''<translate>Available since</translate>:''' Gideros 2019.9<br/>
+
'''Class:''' [[Pixel]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate>Enable 9-patch texture rendering with the specified parameters.
+
Enables 9-patch texture rendering with the specified parameters.
</translate>
+
<syntaxhighlight lang="lua">
<source lang="lua">
+
Pixel:setNinePatch(vl,vr,vt,vb,tl,tr,tt,tb)
Pixel:setNinePatch(vl,vr,vt,vb,tl,tr,tt,tb)
+
Pixel:setNinePatch(l,r,t,b) -- Use the same values for v* and t*
Pixel:setNinePatch(l,r,t,b) -- Use the same values for v* and t*
+
Pixel:setNinePatch(vmargin,tmargin) -- Use the same values for all borders, but differentiate rendered and texture values
Pixel:setNinePatch(vmargin,tmargin) -- Use the same values for all borders, but differentiate rendered and texture values
+
Pixel:setNinePatch(margin) -- Use the same value for all
Pixel:setNinePatch(margin) -- Use the same value for all
+
</syntaxhighlight>
</source>
+
 
=== <translate>Parameters</translate> ===
+
=== Parameters ===
'''vl''': (number) <translate>left size of the rendered dynamic area</translate> <br/>
+
'''vl''': (number) left size of the rendered dynamic area<br/>
'''vr''': (number) <translate>right size of the rendered dynamic area</translate> <br/>
+
'''vr''': (number) right size of the rendered dynamic area<br/>
'''vt''': (number) <translate>top size of the rendered dynamic area</translate> <br/>
+
'''vt''': (number) top size of the rendered dynamic area<br/>
'''vb''': (number) <translate>bottom size of the rendered dynamic area</translate> <br/>
+
'''vb''': (number) bottom size of the rendered dynamic area<br/>
'''tl''': (number) <translate>left size of the texture dynamic area</translate> <br/>
+
'''tl''': (number) left size of the texture dynamic area<br/>
'''tr''': (number) <translate>right size of the texture dynamic area</translate> <br/>
+
'''tr''': (number) right size of the texture dynamic area<br/>
'''tt''': (number) <translate>top size of the texture dynamic area</translate> <br/>
+
'''tt''': (number) top size of the texture dynamic area<br/>
'''tb''': (number) <translate>bottom size of the texture dynamic area</translate> <br/>
+
'''tb''': (number) bottom size of the texture dynamic area<br/>
 +
 
 +
{{Pixel}}

Latest revision as of 14:26, 23 August 2023

Available since: Gideros 2019.9
Class: Pixel

Description

Enables 9-patch texture rendering with the specified parameters.

Pixel:setNinePatch(vl,vr,vt,vb,tl,tr,tt,tb)
Pixel:setNinePatch(l,r,t,b) -- Use the same values for v* and t*
Pixel:setNinePatch(vmargin,tmargin) -- Use the same values for all borders, but differentiate rendered and texture values
Pixel:setNinePatch(margin) -- Use the same value for all

Parameters

vl: (number) left size of the rendered dynamic area
vr: (number) right size of the rendered dynamic area
vt: (number) top size of the rendered dynamic area
vb: (number) bottom size of the rendered dynamic area
tl: (number) left size of the texture dynamic area
tr: (number) right size of the texture dynamic area
tt: (number) top size of the texture dynamic area
tb: (number) bottom size of the texture dynamic area