Difference between revisions of "Pixel:setNinePatch"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
m (Text replacement - "</source>" to "</syntaxhighlight>")
Line 11: Line 11:
 
  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
</source>
+
</syntaxhighlight>
 
=== <translate>Parameters</translate> ===
 
=== <translate>Parameters</translate> ===
 
'''vl''': (number) <translate>left size of the rendered dynamic area</translate> <br/>
 
'''vl''': (number) <translate>left size of the rendered dynamic area</translate> <br/>

Revision as of 15:32, 13 July 2023


Available since: Gideros 2019.9
Class: Pixel

Description

Enable 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