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

DrawRibbonTabSelectedRight2007() protected method

Internal rendering method.
protected DrawRibbonTabSelectedRight2007 ( Rectangle rect, Color c4, Color c5, MementoRibbonTabSelected2007 cache ) : void
rect System.Drawing.Rectangle
c4 Color
c5 Color
cache MementoRibbonTabSelected2007
return void
        protected virtual void DrawRibbonTabSelectedRight2007(Rectangle rect,
                                                              Color c4, Color c5,
                                                              MementoRibbonTabSelected2007 cache)
        {
            GraphicsPath outsidePath = new GraphicsPath();

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

            cache.centerRect = new Rectangle(rect.Left, rect.Top + 4, rect.Width - 4, rect.Height - 8);
            RectangleF centerRectF = new RectangleF(cache.centerRect.Left - 1, cache.centerRect.Top - 1, cache.centerRect.Width + 2, cache.centerRect.Height + 2);
            cache.centerBrush = new LinearGradientBrush(centerRectF, c4, c5, 180f);
            cache.outsidePath = outsidePath;
        }
RenderStandard