ATMLCommonLibrary.controls.awb.AWBButton.drawShadow C# (CSharp) Method

drawShadow() private method

private drawShadow ( System e, int tmpSoundCornerRadius, GraphicsPath graphPathShadow ) : void
e System
tmpSoundCornerRadius int
graphPathShadow System.Drawing.Drawing2D.GraphicsPath
return void
        private void drawShadow(System.Windows.Forms.PaintEventArgs e, int tmpSoundCornerRadius, GraphicsPath graphPathShadow)
        {
            if (tmpSoundCornerRadius > 0)
            {

                using (PathGradientBrush gBrush = new PathGradientBrush(graphPathShadow))
                {
                    gBrush.WrapMode = WrapMode.Clamp;
                    ColorBlend colorBlend = new ColorBlend(3);
                    colorBlend.Colors = new Color[]{Color.Transparent,
                        Color.FromArgb(190, Color.DimGray),
                        Color.FromArgb(190, Color.DimGray)};
                    colorBlend.Positions = new float[] { 0f, .5f, 1f };
                    gBrush.InterpolationColors = colorBlend;
                    e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
                    e.Graphics.FillPath(gBrush, graphPathShadow);
                }
            }
        }