ImageGlass.ImageBox.DrawDropShadow C# (CSharp) Method

DrawDropShadow() protected method

Draws a drop shadow.
protected DrawDropShadow ( Graphics g, Rectangle viewPort ) : void
g System.Drawing.Graphics The graphics.
viewPort System.Drawing.Rectangle The view port.
return void
        protected virtual void DrawDropShadow(Graphics g, Rectangle viewPort)
        {
            Rectangle rightEdge;
            Rectangle bottomEdge;

            rightEdge = new Rectangle(viewPort.Right + 1, viewPort.Top + DropShadowSize, DropShadowSize, viewPort.Height);
            bottomEdge = new Rectangle(viewPort.Left + DropShadowSize, viewPort.Bottom + 1, viewPort.Width + 1, DropShadowSize);

            using (Brush brush = new SolidBrush(ImageBorderColor))
            {
                g.FillRectangles(brush, new[]
                                {
                                  rightEdge, bottomEdge
                                });
            }
        }
ImageBox