System.Drawing.PieChart.PieSlice.CreateBrushForPeriphery C# (CSharp) Method

CreateBrushForPeriphery() protected method

Creates a brush for outer periphery of the pie slice used for gradual shadow.
protected CreateBrushForPeriphery ( Color color ) : Brush
color Color /// Color used for pie slice rendering. ///
return System.Drawing.Brush
        protected virtual Brush CreateBrushForPeriphery(Color color)
        {
            ColorBlend colorBlend = new ColorBlend();
            colorBlend.Colors = new Color[] {
                                                ColorUtil.CreateColorWithCorrectedLightness(color, -ColorUtil.BrightnessEnhancementFactor1 / 2),
                                                color,
                                                ColorUtil.CreateColorWithCorrectedLightness(color, -ColorUtil.BrightnessEnhancementFactor1),
            };
            colorBlend.Positions = new float[] { 0F, 0.1F, 1.0F };
            LinearGradientBrush brush = new LinearGradientBrush(m_boundingRectangle, Color.Blue, Color.White, LinearGradientMode.Horizontal);
            brush.InterpolationColors = colorBlend;
            return brush;
        }