System.Drawing.Graphics.FillRectangles C# (CSharp) Method

FillRectangles() public method

public FillRectangles ( Brush brush, Rectangle rects ) : void
brush Brush
rects Rectangle
return void
        public void FillRectangles(Brush brush, Rectangle [] rects)
        {
            if (brush == null)
                throw new ArgumentNullException ("brush");
            if (rects == null)
                throw new ArgumentNullException ("rects");

            foreach (var rect in rects)
                RectanglePath (rect.X, rect.Y, rect.Right, rect.Bottom);
            FillBrush (brush);
        }

Same methods

Graphics::FillRectangles ( Brush brush, RectangleF rects ) : void

Usage Example

Beispiel #1
0
        public static void DrawRectangles(Graphics graphics, List<RectangleF> rectangles, Color color)
        {
            if (rectangles.Count > 0)
            {
                var brush = new SolidBrush(color);

                graphics.FillRectangles(brush, rectangles.ToArray());
            }
        }
All Usage Examples Of System.Drawing.Graphics::FillRectangles