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

DrawRibbonTabContextSelectedLeft() protected method

Internal rendering method.
protected DrawRibbonTabContextSelectedLeft ( Rectangle rect, Color c2, MementoRibbonTabContextSelected cache ) : void
rect System.Drawing.Rectangle
c2 Color
cache MementoRibbonTabContextSelected
return void
        protected virtual void DrawRibbonTabContextSelectedLeft(Rectangle rect,
                                                                Color c2,
                                                                MementoRibbonTabContextSelected cache)
        {
            GraphicsPath outsidePath = new GraphicsPath();

            // Create path for a curved dark border around the tab
            outsidePath.AddLine(rect.Right - 2, rect.Bottom - 1, rect.Right - 3, rect.Bottom - 2);
            outsidePath.AddLine(rect.Right - 3, rect.Bottom - 2, rect.Left + 1.5f, rect.Bottom - 2);
            outsidePath.AddLine(rect.Left + 1.5f, rect.Bottom - 2, rect.Left, rect.Bottom - 4);
            outsidePath.AddLine(rect.Left, rect.Bottom - 4, rect.Left, rect.Top + 3);
            outsidePath.AddLine(rect.Left, rect.Top + 3, rect.Left + 1.5f, rect.Top + 1);
            outsidePath.AddLine(rect.Left + 1.5f, rect.Top + 1, rect.Right - 3, rect.Top + 1);
            outsidePath.AddLine(rect.Right - 3, rect.Top + 1, rect.Right - 2, rect.Top);

            LinearGradientBrush leftBrush = new LinearGradientBrush(rect, Color.FromArgb(125, c2), Color.FromArgb(67, c2), 0f);
            LinearGradientBrush rightBrush = new LinearGradientBrush(rect, Color.FromArgb(16, c2), Color.FromArgb(67, c2), 0f);
            cache.leftPen = new Pen(leftBrush);
            cache.rightPen = new Pen(rightBrush);

            cache.interiorRect = new Rectangle(rect.Left + 3, rect.Top + 2, rect.Width - 3, rect.Height - 4);
            cache.insideBrush = new LinearGradientBrush(rect, Color.FromArgb(134, c2), Color.FromArgb(50, c2), 0f);
            cache.outsidePath = outsidePath;
        }
RenderStandard