[code]// reduce clip region to certain part of screen
g.reduceClipRegion(clip_x,clip_y,clip_w,clip_h);
// draw stuff here (clipped to the region reduced above)
// …
// end clipping
g.setClipRegion(RectangleList(Rectangle(0,0,w,h)));[/code]
Just wondering if there’s a more elegant call to restore default clip region for the current graphic context, because under osx seems the last line throws assertion (doesnt do under WinXP).
Sorry for kicking this old topic, but how would this be done in the latest version of JUCE? There’s no more Graphics.setClipRegion function…
I’m pretty new to JUCE, and I’m probably missing something stupidly obvious here, but I can’t find how to increase/reset the clipping rectangle.
graphics->reduceClipRegion(100, 100, 50, 50);
//This obviously doesn't work, as it isn't much of a reduction:
//graphics->reduceClipRegion(0,0,1024,1024);