Difference between revisions of "Sprite:setClip"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2015.04.04<br/>
'''<translate>Available since</translate>:''' Gideros 2015.04.04<br/>
+
'''Class:''' [[Sprite]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
 
=== <translate>Description</translate> ===
 
<translate>Clip Sprite contents from provided x, y position to provided width and height
 
  
Setting width or height to -1 will disable it</translate>
+
=== Description ===
<source lang="lua">
+
Clips Sprite content from provided x, y position to provided width and height.
Sprite:setClip(x,y,width,height)
+
<syntaxhighlight lang="lua">
</source>
+
Sprite:setClip(x,y,width,height)
=== <translate>Parameters</translate> ===
+
</syntaxhighlight>
'''x''': (number) <translate>x position from where to clip</translate> <br/>
+
 
'''y''': (number) <translate>y position from where to clip</translate> <br/>
+
Setting width or height to -1 will disable clipping.
'''width''': (number) <translate>width of how much to display before clipping</translate> <br/>
+
 
'''height''': (number) <translate>width of how much to display before clipping</translate> <br/>
+
=== Parameters ===
 +
'''x''': (number) x position from where to clip<br/>
 +
'''y''': (number) y position from where to clip<br/>
 +
'''width''': (number) width of how much to display before clipping<br/>
 +
'''height''': (number) width of how much to display before clipping<br/>
 +
 
 +
{{Sprite}}

Latest revision as of 14:33, 13 July 2023

Available since: Gideros 2015.04.04
Class: Sprite

Description

Clips Sprite content from provided x, y position to provided width and height.

Sprite:setClip(x,y,width,height)

Setting width or height to -1 will disable clipping.

Parameters

x: (number) x position from where to clip
y: (number) y position from where to clip
width: (number) width of how much to display before clipping
height: (number) width of how much to display before clipping