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

DrawRibbonTabFocusLeft2010() protected method

Internal rendering method.
protected DrawRibbonTabFocusLeft2010 ( Rectangle rect, Color c3, Color c4, MementoRibbonTabTracking2010 cache ) : void
rect System.Drawing.Rectangle
c3 Color
c4 Color
cache MementoRibbonTabTracking2010
return void
        protected virtual void DrawRibbonTabFocusLeft2010(Rectangle rect,
                                                          Color c3, Color c4,
                                                          MementoRibbonTabTracking2010 cache)
        {
            GraphicsPath borderPath = new GraphicsPath();
            GraphicsPath outsidePath = new GraphicsPath();
            GraphicsPath insidePath = new GraphicsPath();

            // Create path for a border pen
            borderPath.AddLine(rect.Right - 1, rect.Top - 1, rect.Right - 2, rect.Top);
            borderPath.AddLine(rect.Right - 2, rect.Top, rect.Left + 1.75f, rect.Top);
            borderPath.AddLine(rect.Left + 1.75f, rect.Top, rect.Left, rect.Top + 1);
            borderPath.AddLine(rect.Left, rect.Top + 2, rect.Left, rect.Bottom - 3.5f);
            borderPath.AddLine(rect.Left, rect.Bottom - 3.5f, rect.Left + 1.75f, rect.Bottom - 2);
            borderPath.AddLine(rect.Left + 1.75f, rect.Bottom - 2, rect.Right - 2, rect.Bottom - 2);
            borderPath.AddLine(rect.Right - 2, rect.Bottom - 2, rect.Right - 1, rect.Bottom - 1);

            // Create path for a inside fill
            outsidePath.AddLine(rect.Right, rect.Top, rect.Left + 1.75f, rect.Top);
            outsidePath.AddLine(rect.Left + 1.75f, rect.Top, rect.Left, rect.Top + 1);
            outsidePath.AddLine(rect.Left, rect.Top + 1, rect.Left, rect.Bottom - 2.5f);
            outsidePath.AddLine(rect.Left, rect.Bottom - 2.5f, rect.Left + 1.75f, rect.Bottom - 1);
            outsidePath.AddLine(rect.Left + 1.75f, rect.Bottom - 1, rect.Right, rect.Bottom - 1);

            // Reduce rectangle to the inside fill area
            rect.X += 2;
            rect.Y += 2;
            rect.Width -= 2;
            rect.Height -= 3;

            // Create path for a curved inside fill area
            insidePath.AddLine(rect.Right - 1, rect.Top - 2, rect.Right - 1, rect.Top);
            insidePath.AddLine(rect.Right - 1, rect.Top, rect.Left + 1, rect.Top);
            insidePath.AddLine(rect.Left + 1, rect.Top, rect.Left, rect.Top + 1);
            insidePath.AddLine(rect.Left, rect.Top + 1, rect.Left, rect.Bottom - 4);
            insidePath.AddLine(rect.Left, rect.Bottom - 4, rect.Left + 2, rect.Bottom - 2);
            insidePath.AddLine(rect.Left + 2, rect.Bottom - 2, rect.Right - 1, rect.Bottom - 2);
            insidePath.AddLine(rect.Right - 1, rect.Bottom - 2, rect.Right, rect.Bottom);

            cache.borderPath = borderPath;
            cache.outsidePath = outsidePath;
            cache.insidePath = insidePath;
            cache.insideBrush = new LinearGradientBrush(new RectangleF(rect.X - 1, rect.Y - 1, rect.Width + 2, rect.Height + 2), c4, c3, 180f);
            cache.insideBrush.Blend = _linear50Blend;
        }
RenderStandard