I just can't understand what update and clipping regions are. I've read just about every relevant entry in the Win32 Programmer's Reference, but I still can't work it out. If someone could explain it simply for me, I'd be very grateful.
I just can't understand what update and clipping regions are. I've read just about every relevant entry in the Win32 Programmer's Reference, but I still can't work it out. If someone could explain it simply for me, I'd be very grateful.
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials
Think of regions as boxes (rectangles) with a maximum of 1 box for each pixel and a minimum of one box for the whole region (if the region is rectangular). See RGNDATA structure. Complex, non-rectangular shapes can then be represented as nothing more than an array of simple rectangles.
The update region, then, is all of those boxes that need to or are about to be updated or refreshed/redrawn.
The clipping region is the region (again, array of rectangles) outwith which drawing will or should be prevented. Taking the simplest scenario - one large rectangle representing, for example, the client area of a window, then any attempt to draw on the non-client area 'should' fail/be prevented - drawing is 'clipped' ie cut-off beyond the boundaries of that region.
Don't know if that helps but if everyone has a go then you should hopefully find at least one explanation that works for you.