Thread: Update, Clipping regions

  1. #1
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401

    Update, Clipping regions

    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

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Polymorphism; Update functions and accessibility
    By CaptainMaxxPow in forum C# Programming
    Replies: 2
    Last Post: 04-23-2009, 08:48 AM
  2. SQLite not performing update
    By OnionKnight in forum C Programming
    Replies: 0
    Last Post: 01-21-2009, 04:21 PM
  3. July 9 2008 MS XP Update
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 07-18-2008, 05:14 AM
  4. InvalidateRgn for clipped regions
    By csonx_p in forum Windows Programming
    Replies: 8
    Last Post: 06-11-2008, 01:36 AM
  5. Update Regions in Window Managers
    By SMurf in forum Tech Board
    Replies: 1
    Last Post: 09-12-2005, 07:51 PM