* Hwnd.cs (Invalid): don't start off with Rectangle.Empty, as
union of that will always be {0,0,width,height}.
svn path=/trunk/mcs/; revision=60604
+2006-05-11 Chris Toshok <toshok@ximian.com>
+
+ * Hwnd.cs (Invalid): don't start off with Rectangle.Empty, as
+ union of that will always be {0,0,width,height}.
+
2006-05-11 Jackson Harper <jackson@ximian.com>
* Form.cs: Match MS's DefaultSize for forms (they must have
public Rectangle Invalid {
get {
- if (invalid_list.Count == 1) {
- return (Rectangle) invalid_list [0];
- }
-
- Rectangle result = Rectangle.Empty;
- foreach (Rectangle r in invalid_list) {
- result = Rectangle.Union (result, r);
+ Rectangle result = (Rectangle)invalid_list[0];
+ for (int i = 1; i < invalid_list.Count; i ++) {
+ result = Rectangle.Union (result, (Rectangle)invalid_list[i]);
}
return result;
-
}
}