From bf75c9542d97533d419ba19c8e2b91e03b0370da Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Thu, 21 Apr 2011 17:53:21 -0400 Subject: [PATCH] win32: Explain the purpose of the surface extents It wasn't immediately obvious to me what the purpose of having extents instead of just a size was. --- src/cairo-win32-private.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cairo-win32-private.h b/src/cairo-win32-private.h index efb0c1eed..b60c10175 100644 --- a/src/cairo-win32-private.h +++ b/src/cairo-win32-private.h @@ -72,6 +72,15 @@ typedef struct _cairo_win32_surface { cairo_surface_t *image; + /* We use the x and y parts of extents for situations where + * we're not supposed to draw to the entire surface. + * For example, during a paint event a program will get + * a DC that has been clipped to the dirty region. + * A cairo surface constructed for that DC will have extents + * that match bounds of the clipped region. + * + * jrmuizel: I'm not sure if storing these extents instead + * of just using the size is better... */ cairo_rectangle_int_t extents; /* Initial clip bits