private void ClearArea(IGifRect rect) { int length = 4 * rect.Width; byte[] buffer = new byte[length]; for (int index = 0; index < rect.Height; ++index) { int offset = (rect.Top + index) * this._stride + 4 * rect.Left; Animator.CopyToBitmap(buffer, this._bitmap, offset, length); } }
private void ClearArea(IGifRect rect) { int bufferLength = 4 * rect.Width; byte[] lineBuffer = new byte[bufferLength]; for (int y = 0; y < rect.Height; y++) { int offset = (rect.Top + y) * _stride + 4 * rect.Left; CopyToBitmap(lineBuffer, _bitmap, offset, bufferLength); } #if WPF _bitmap.AddDirtyRect(new Int32Rect(rect.Left, rect.Top, rect.Width, rect.Height)); #endif }
private void ClearArea(IGifRect rect) { ClearArea(new Int32Rect(rect.Left, rect.Top, rect.Width, rect.Height)); }