[Mono-winforms-list] Double Buffering

Jonathan S. Chambers Jonathan.Chambers@ansys.com
Thu, 28 Apr 2005 20:21:46 -0400


This is a multi-part message in MIME format.

------_=_NextPart_001_01C54C51.6D708962
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

      I noticed that support for double buffering has been included in =
Control.cs. This is nice, except that I think the two calls to DrawImage =
(lines 3177 and 3195) should pass ClientRectangle as the second =
parameter, rather than ClipRectangle of the paint event args. According =
to MS documentation, and actual behavior,  "The image represented by the =
image object is scaled to the dimensions of the rect rectangle."=20
      Thus with the code as is, the code as is draws the ImageBuffer to =
the ClipRectangle. When the clip rectangle is the entire control, this =
makes sense. However, when the clip rectangle is just part of the =
control (like when a partially obstructing window is removed) the whole =
control is drawn to the clip area. (I can send an image if anyone wants =
to see).=20

Thanks,
Jonathan


------_=_NextPart_001_01C54C51.6D708962
Content-Type: text/x-patch;
	name="svn.diff"
Content-Transfer-Encoding: base64
Content-Description: svn.diff
Content-Disposition: attachment;
	filename="svn.diff"

SW5kZXg6IENvbnRyb2wuY3MKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gQ29udHJvbC5jcwkocmV2aXNpb24gNDM3
NDkpCisrKyBDb250cm9sLmNzCSh3b3JraW5nIGNvcHkpCkBAIC0zMTczLDcgKzMxNzMsNyBAQAog
CiAJCQkJCWlmICghbmVlZHNfcmVkcmF3KSB7CiAJCQkJCQkvLyBKdXN0IGJsaXQgdGhlIHByZXZp
b3VzIGltYWdlCi0JCQkJCQlwYWludF9ldmVudC5HcmFwaGljcy5EcmF3SW1hZ2UgKEltYWdlQnVm
ZmVyLCBwYWludF9ldmVudC5DbGlwUmVjdGFuZ2xlKTsKKwkJCQkJCXBhaW50X2V2ZW50LkdyYXBo
aWNzLkRyYXdJbWFnZSAoSW1hZ2VCdWZmZXIsIENsaWVudFJlY3RhbmdsZSk7CiAJCQkJCQluZWVk
c19yZWRyYXcgPSBmYWxzZTsKIAkJCQkJCXJldHVybjsKIAkJCQkJfQpAQCAtMzE5MCw3ICszMTkw
LDggQEAKIAkJCQkJT25QYWludChwYWludF9ldmVudCk7CiAKIAkJCQkJaWYgKChjb250cm9sX3N0
eWxlICYgQ29udHJvbFN0eWxlcy5Eb3VibGVCdWZmZXIpICE9IDApIHsKLQkJCQkJCWRjLkRyYXdJ
bWFnZSAoSW1hZ2VCdWZmZXIsIHBhaW50X2V2ZW50LkNsaXBSZWN0YW5nbGUpOworCQkJCQkJCisJ
CQkJCQlkYy5EcmF3SW1hZ2UgKEltYWdlQnVmZmVyLCBDbGllbnRSZWN0YW5nbGUpOwogCQkJCQkJ
cGFpbnRfZXZlbnQuU2V0R3JhcGhpY3MgKGRjKTsKIAkJCQkJfQogCg==

------_=_NextPart_001_01C54C51.6D708962--