예제 #1
0
        /// <summary>
        /// Writes the pixel data of the specified rectangle in the <see cref="BitmapBuffer"/> to
        /// the associated <see cref="Bitmap"/>.</summary>
        /// <param name="bounds">
        /// The pixel rectangle in the <see cref="BitmapBuffer"/> to write.</param>
        /// <remarks>
        /// <b>Write</b> replaces the pixel data within the specified <paramref name="bounds"/> of
        /// the associated <see cref="Bitmap"/> with the contents of the <see cref="Pixels"/> array.
        /// No coordinate checking is performed.</remarks>

        public void Write(RectI bounds)
        {
            int offset = bounds.X + _size.Width * bounds.Y;

            _bitmap.WritePixels(bounds.ToInt32Rect(), _pixels, Stride, offset);
        }