ComponentFactory.Krypton.Toolkit.KryptonSparkleRenderer.DrawSolidBorder C# (CSharp) Method

DrawSolidBorder() private static method

private static DrawSolidBorder ( Graphics g, Rectangle backRect, GradientItemColors colors ) : void
g System.Drawing.Graphics
backRect System.Drawing.Rectangle
colors GradientItemColors
return void
        private static void DrawSolidBorder(Graphics g,
                                            Rectangle backRect,
                                            GradientItemColors colors)
        {
            // Drawing with anti aliasing to create smoother appearance
            using (AntiAlias aa = new AntiAlias(g))
            {
                Rectangle backRectI = backRect;
                backRectI.Inflate(1, 1);

                // Use solid color for the border
                using (Pen borderPen = new Pen(colors.Border))
                    using (GraphicsPath borderPath = CreateBorderPath(backRect, _cutMenuItemBack))
                        g.DrawPath(borderPen, borderPath);
            }
        }