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

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


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scrolling-final1.patch
Type: text/x-patch
Size: 5792 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20080121/4acd98fe/attachment-0001.bin 


More information about the Mono-winforms-list mailing list