Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Clipping

Peter Tillema edited this page Nov 26, 2018 · 1 revision

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.

Clone this wiki locally