-
-
Notifications
You must be signed in to change notification settings - Fork 2
Clipping
Most of the graphics commands in GraphX
have two variants, the standard one and a duplicate with "_NoClip" tacked on to the end of the name. This is because the standard commands use clipping to check if what's being drawn is inside the current clip region. By default, the clip region is the entire screen (320x240 pixels). The "_NoClip" variants of commands are faster but can cause memory corruption or other strange problems if you accidentally tell one to draw something that outstreches the bounds of the screen.
You can set a custom clip region using SetClipRegion(
. This sets a specific area to be the clipping area. Every clipped graphics command will only draw within this area, and ignoring anything outside. This is useful when you want to update a smaller part of the screen.
ICE Compiler | Peter Tillema
- Introduction
- Building your first program
- Math and numbers
- Variables
- Standard system commands
- Program flow control
- Pointers
- Graphics
- Sprites
- Tilemaps
- Useful routines