[Mono-winforms-list] [Patch] Invalidate non visible areas in scrolling

Carlos Alberto Cortez calberto.cortez at gmail.com
Mon Jan 21 18:29:13 EST 2008


Ah!, perfect!

We wll be using that one, instead.

Carlos.


El lun, 21-01-2008 a las 19:25 -0600, Jonathan Pobst escribió:
> I just added a public property called Hwnd.GraphicsContext that is a 
> cached Graphics we keep around for measuring and such.  If you don't 
> need a specific Graphics, you can just use this one.
> 
> Jon
> 
> 
> Carlos Alberto Cortez wrote:
> > Hey Chris,
> > 
> > Attached is an updated patch that basically incorporates all the things
> > you mentioned in your last mail:
> > 
> > * Determines the visible rectangle, and intersects it with the required
> > area (this is, we copy only the visible area).
> > 	- First by determining the visible area based on its size and its
> > parents.
> > 	- Second, by looking for toplevel windows that intersect the window,
> > and excluding that area.
> > 
> > * Then compute the destination rectangle, by applying the
> > XAmount/YAmount values and intersecting it with the area passed to
> > ScrollWindow (thus we clip it as needed). This is the way Gdk does it.
> > 
> > * Finally, exclude the destination rectangle from the total requested
> > area, and pass it to AddExpose method.
> > 
> > With this patch everyting is working as expected, but I have some
> > issues:
> > 
> > * Region needs a Graphics instance to return its Bounds, which *could*
> > be expensive.
> > * After taking a look at the way scrolling is done in Gdk, it *seems*
> > that the Region implementation lack some of the functionality we need
> > (like, returning in a simple operation the Rectangles describing the
> > region).
> > 
> > Comments?
> > 
> > Carlos.
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-winforms-list
> 



More information about the Mono-winforms-list mailing list