ComponentFactory.Krypton.Toolkit.KryptonOffice2010Renderer.GradientItemColorsChecked.DrawBack C# (CSharp) Method

DrawBack() public method

public DrawBack ( Graphics g, Rectangle rect ) : void
g System.Drawing.Graphics
rect System.Drawing.Rectangle
return void
            public override void DrawBack(Graphics g, Rectangle rect)
            {
                Rectangle inset = new Rectangle(rect.X + 1, rect.Y + 1, rect.Width - 2, rect.Height - 2);
                Rectangle insetB = new Rectangle(rect.X + 2, rect.Y + 2, rect.Width - 3, rect.Height - 3);

                using (LinearGradientBrush insideBrush = new LinearGradientBrush(rect, Back2, Back1, 90f))
                {
                    insideBrush.SetSigmaBellShape(0.5f);
                    g.FillRectangle(insideBrush, inset);

                    using (GraphicsPath borderPath = CreateBorderPath(inset, _cutInnerItemMenu))
                    {
                        using (GraphicsPath ellipsePath = new GraphicsPath())
                        {
                            RectangleF ellipseRect = new RectangleF(rect.Left, rect.Bottom - 8, rect.Width, 8);
                            PointF ellipseCenter = new PointF(ellipseRect.Left + (ellipseRect.Width / 2), ellipseRect.Top + (ellipseRect.Height / 2));
                            ellipsePath.AddEllipse(ellipseRect);

                            using (PathGradientBrush insideLighten = new PathGradientBrush(ellipsePath))
                            {
                                insideLighten.CenterPoint = ellipseCenter;
                                insideLighten.CenterColor = Color.FromArgb(96, Color.White);
                                insideLighten.SurroundColors = new Color[] { Color.Transparent };
                                g.FillPath(insideLighten, ellipsePath);
                            }
                        }
                    }
                }
            }
KryptonOffice2010Renderer.GradientItemColorsChecked