Difference between revisions of "Sprite:setClip"

From GiderosMobile
(removed language stuff)
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Clips Sprite content from provided x, y position to provided width and height.
 
Clips Sprite content from provided x, y position to provided width and height.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
Sprite:setClip(x,y,width,height)
 
Sprite:setClip(x,y,width,height)
</source>
+
</syntaxhighlight>
  
 
Setting width or height to -1 will disable clipping.
 
Setting width or height to -1 will disable clipping.

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