ComponentFactory.Krypton.Toolkit.RenderStandard.DrawDragDockingRoundedRect C# (CSharp) Method

DrawDragDockingRoundedRect() private method

private DrawDragDockingRoundedRect ( RenderContext context, Color inside, Color border, Rectangle drawRect, int rounding ) : void
context RenderContext
inside Color
border Color
drawRect System.Drawing.Rectangle
rounding int
return void
        private void DrawDragDockingRoundedRect(RenderContext context,
                                                Color inside,
                                                Color border,
                                                Rectangle drawRect,
                                                int rounding)
        {
            using (AntiAlias aa = new AntiAlias(context.Graphics))
            {
                RectangleF rectBoundsF = new RectangleF(drawRect.X - 1, drawRect.Y - 1, drawRect.Width + 2, drawRect.Height + 1);
                Rectangle rectInside = new Rectangle(drawRect.X + 2, drawRect.Y + 2, drawRect.Width - 4, drawRect.Height - 4);
                using (GraphicsPath borderPath = CreateBorderBackPath(true, true, drawRect, PaletteDrawBorders.All, 1, rounding, true, 0),
                                    insidePath = CreateBorderBackPath(true, true, rectInside, PaletteDrawBorders.All, 1, rounding - 1, true, 0))
                {
                    using(SolidBrush borderBrush = new SolidBrush(Color.FromArgb(196, Color.White)))
                        context.Graphics.FillPath(borderBrush, borderPath);

                    using (LinearGradientBrush insideBrush = new LinearGradientBrush(rectBoundsF, Color.FromArgb(196, Color.White), inside, 90))
                    {
                        insideBrush.Blend = _dragRoundedInsideBlend;
                        context.Graphics.FillPath(insideBrush, insidePath);
                    }

                    using (Pen borderPen = new Pen(border))
                        context.Graphics.DrawPath(borderPen, borderPath);
                }
            }
        }
RenderStandard