Citation :
if ((DisplayRectangle.Height != 0) && (DisplayRectangle.Width != 0))
{
if ((this._tailleMemoireTamponPrincipale.Width < this.DisplayRectangle.Width) || (this._tailleMemoireTamponPrincipale.Height < this.DisplayRectangle.Height))
{//le formulaire est plus grand...il faut agrandir la mémoire tampon
BufferedGraphics newMemoire;
Rectangle rect;
rect = new Rectangle(0, 0, Math.Max(this._tailleMemoireTamponPrincipale.Width, this.DisplayRectangle.Width),Math.Max(this._tailleMemoireTamponPrincipale.Height, this.DisplayRectangle.Height));
newMemoire = _ContextMemoireTampon.Allocate(this.CreateGraphics(),rect);
newMemoire.Graphics.Clear(this.BackColor);
_MemoireTamponPrincipale.Render(newMemoire.Graphics);
_MemoireTamponPrincipale.Dispose();
_MemoireTamponPrincipale = newMemoire;
_tailleMemoireTamponPrincipale.Width = rect.Width;
_tailleMemoireTamponPrincipale.Height = rect.Height;
newMemoire = _ContextMemoireTampon.Allocate(this.CreateGraphics(), this.DisplayRectangle);
_MemoireTamponSecondaire.Dispose();
_MemoireTamponSecondaire = newMemoire;
}
}
|