Please read the doxy for SetClipRegion() and fix the code accordingly.