ARCed.UI.DockPanel.SetRegion C# (CSharp) Method

SetRegion() private method

private SetRegion ( Rectangle clipRects ) : void
clipRects System.Drawing.Rectangle
return void
        private void SetRegion(Rectangle[] clipRects)
        {
            if (!this.IsClipRectsChanged(clipRects))
                return;

            this.m_clipRects = clipRects;

            if (this.m_clipRects == null || this.m_clipRects.GetLength(0) == 0)
                Region = null;
            else
            {
                var region = new Region(new Rectangle(0, 0, Width, Height));
                foreach (Rectangle rect in this.m_clipRects)
                    region.Exclude(rect);
                Region = region;
            }
        }