Sprite:setClip

From GiderosMobile
Revision as of 15:31, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")

Available since: Gideros 2015.04.04
Class: Sprite

Description

Clips Sprite content from provided x, y position to provided width and height. <syntaxhighlight lang="lua"> Sprite:setClip(x,y,width,height) </source>

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