Alexandria.Raster.DrawImage C# (CSharp) Метод

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

Draw the image data.
public DrawImage ( Vector2i position, Vector2i size, int data, int offset, int pitch, int maskIndex ) : void
position Vector2i
size Vector2i
data int
offset int
pitch int
maskIndex int
Результат void
        public void DrawImage(Vector2i position, Vector2i size, int[] data, int offset, int pitch, int maskIndex)
        {
            SetupDrawImage(ref position, ref size, ref data, ref offset, ref pitch);
            for (int y = 0; y < size.Y; y++) {
                int inputIndex = offset + y * pitch;
                int outputIndex = (y + position.Y) * Stride + position.X;
                int endInputIndex = inputIndex + size.X;

                for (; inputIndex < endInputIndex; inputIndex++, outputIndex++) {
                    int value = data[inputIndex];

                    if (value != maskIndex)
                        this.data[outputIndex] = value;
                }
            }
        }