Beispiel #1
0
        Drawing3d.PrimIdObj[,] SubArray(int x, int y, int Width, int Height)
        {
            Drawing3d.PrimIdObj[,] Result = new Drawing3d.PrimIdObj[Width, Height];
            if (ObjectBuffer == null)
            {
                return(Result);
            }
            for (int i = 0; i < Width; i++)
            {
                for (int j = 0; j < Height; j++)
                {
                    if ((i + x >= 0) && (j + y >= 0) && (i + x < ObjectBuffer.GetLength(0)) && (j + y < ObjectBuffer.GetLength(1)))
                    {
                        Result[i, j] = ObjectBuffer[i + x, j + y];
                    }
                }
            }

            return(Result);
        }