What it does
SpriteScissor sets Scissor on a Sprite object. It takes iSpriteIndex (an integer), x (a float), y (a float), x2 (a float) and y2 (a float), and returns nothing. iSpriteIndex is the id of a Sprite object, the one CreateSprite returned: it is how the call knows what to act on.
Syntax
SpriteScissor(iSpriteIndex integer, x float, y float, x2 float, y2 float)Parameters
| Name | Type |
|---|---|
| iSpriteIndex | integer |
| x | float |
| y | float |
| x2 | float |
| y2 | float |
Every form returns
nothing
Example · generated
image = LoadImage("assets/sprite.png", 1)sprite = CreateSprite(image)SpriteScissor(sprite, 100.0, 120.0, 1.0, 1.0)DO Sync()LOOPLoadImage and CreateSprite are there to give the call something to act on; SpriteScissor is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.