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

DrawRibbonTabFocusTop2010() protected method

Internal rendering method.
protected DrawRibbonTabFocusTop2010 ( Rectangle rect, Color c3, Color c4, MementoRibbonTabTracking2010 cache ) : void
rect System.Drawing.Rectangle
c3 Color
c4 Color
cache MementoRibbonTabTracking2010
return void
        protected virtual void DrawRibbonTabFocusTop2010(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.Left, rect.Bottom - 1, rect.Left + 1, rect.Bottom - 2);
            borderPath.AddLine(rect.Left + 1, rect.Bottom - 2, rect.Left + 1, rect.Top + 1.75f);
            borderPath.AddLine(rect.Left + 1, rect.Top + 1.75f, rect.Left + 2, rect.Top);
            borderPath.AddLine(rect.Left + 2, rect.Top, rect.Right - 3, rect.Top);
            borderPath.AddLine(rect.Right - 3, rect.Top, rect.Right - 2, rect.Top + 1.75f);
            borderPath.AddLine(rect.Right - 2, rect.Top + 1.75f, 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.Left, rect.Bottom, rect.Left + 1, rect.Bottom - 1);
            outsidePath.AddLine(rect.Left + 1, rect.Bottom - 1, rect.Left + 1, rect.Top + 1.5f);
            outsidePath.AddLine(rect.Left + 1, rect.Top + 1.5f, rect.Left + 2, rect.Top);
            outsidePath.AddLine(rect.Left + 2, rect.Top, rect.Right - 3, rect.Top);
            outsidePath.AddLine(rect.Right - 3, rect.Top, rect.Right - 2, rect.Top + 1.5f);
            outsidePath.AddLine(rect.Right - 2, rect.Top + 1.5f, rect.Right - 2, rect.Bottom - 1);
            outsidePath.AddLine(rect.Right - 2, rect.Bottom - 1, rect.Right - 1, rect.Bottom - 1);

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

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

            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, 270f);
            cache.insideBrush.Blend = _linear50Blend;
        }
RenderStandard