Difference between revisions of "Sprite:setClip"
From GiderosMobile
Line 2: | Line 2: | ||
'''Available since:''' Gideros 2015.04.04<br/> | '''Available since:''' Gideros 2015.04.04<br/> | ||
=== Description === | === Description === | ||
− | Clip Sprite contents from provided x, y position to provided width and height | + | <translate>Clip Sprite contents from provided x, y position to provided width and height |
− | Setting width or height to -1 will disable it | + | Setting width or height to -1 will disable it</translate> |
<source lang="lua"> | <source lang="lua"> | ||
Sprite:setClip(x,y,width,height) | Sprite:setClip(x,y,width,height) | ||
</source> | </source> | ||
=== Parameters === | === Parameters === | ||
− | '''x''': (number) x position from where to clip <br/> | + | '''x''': (number) <translate>x position from where to clip</translate> <br/> |
− | '''y''': (number) y position from where to clip <br/> | + | '''y''': (number) <translate>y position from where to clip</translate> <br/> |
− | '''width''': (number) width of how much to display before clipping <br/> | + | '''width''': (number) <translate>width of how much to display before clipping</translate> <br/> |
− | '''height''': (number) width of how much to display before clipping <br/> | + | '''height''': (number) <translate>width of how much to display before clipping</translate> <br/> |
Revision as of 13:34, 23 August 2018
Available since: Gideros 2015.04.04
Description
Clip Sprite contents from provided x, y position to provided width and height
Setting width or height to -1 will disable it
Sprite:setClip(x,y,width,height)
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