Exemplo n.º 1
0
            /// <summary>
            /// Retrieves a list of Rects that make up this quadrant and the quadrants beneath it.
            /// Used when debugging to draw quadrants to a canvas.
            /// </summary>
            /// <param name="rects"></param>
            public IEnumerable <Rect> GetQuadrantRects()
            {
                yield return(Extent);

                if (TopLeft != null)
                {
                    foreach (var rect in TopLeft.GetQuadrantRects())
                    {
                        yield return(rect);
                    }
                }

                if (TopRight != null)
                {
                    foreach (var rect in TopRight.GetQuadrantRects())
                    {
                        yield return(rect);
                    }
                }

                if (BottomLeft != null)
                {
                    foreach (var rect in BottomLeft.GetQuadrantRects())
                    {
                        yield return(rect);
                    }
                }

                if (BottomRight != null)
                {
                    foreach (var rect in BottomRight.GetQuadrantRects())
                    {
                        yield return(rect);
                    }
                }
            }