FlatRedBall.Graphics.Texture.ImageData.Blit C# (CSharp) Метод

Blit() публичный Метод

public Blit ( ImageData source, System.Drawing.Rectangle sourceRectangle, System.Drawing.Point destination ) : void
source ImageData
sourceRectangle System.Drawing.Rectangle
destination System.Drawing.Point
Результат void
        public void Blit(ImageData source, Rectangle sourceRectangle, Point destination)
        {
            for (int y = 0; y < sourceRectangle.Height; y++)
            {
                for (int x = 0; x < sourceRectangle.Width; x++)
                {
                    int sourceX = x + sourceRectangle.X;
                    int sourceY = y + sourceRectangle.Y;

                    int destinationX = x + destination.X;
                    int destinationY = y + destination.Y;

                    this.SetPixel(destinationX, destinationY, source.GetPixelColor(sourceX, sourceY));
                }
            }
        }

Same methods

ImageData::Blit ( Microsoft.Xna.Framework.Graphics.Texture2D source, System.Drawing.Rectangle sourceRectangle, System.Drawing.Point destination ) : void