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

DrawRibbonAppButtonLowerHalf() protected method

Internal rendering method.
protected DrawRibbonAppButtonLowerHalf ( Graphics g, MementoRibbonAppButton memento, PaletteState state, Color bottomDark, Color bottomLight, Color bottomMedium ) : void
g System.Drawing.Graphics
memento MementoRibbonAppButton
state PaletteState
bottomDark Color
bottomLight Color
bottomMedium Color
return void
        protected virtual void DrawRibbonAppButtonLowerHalf(Graphics g,
                                                            MementoRibbonAppButton memento,
                                                            PaletteState state,
                                                            Color bottomDark,
                                                            Color bottomLight,
                                                            Color bottomMedium)
        {
            Color[] colorsLowerHalf = new Color[] { bottomDark, bottomMedium, bottomLight, bottomLight, bottomMedium, bottomDark };
            float[] posLowerHalf;

            if (state == PaletteState.Pressed)
                posLowerHalf = new float[] { 0.0f, 0.3f, 0.5f, 0.5f, 0.7f, 1.0f };
            else
                posLowerHalf = new float[] { 0.0f, 0.2f, 0.4f, 0.6f, 0.8f, 1.0f };

            ColorBlend blendLowerHalf = new ColorBlend();
            blendLowerHalf.Colors = colorsLowerHalf;
            blendLowerHalf.Positions = posLowerHalf;

            memento.brushLower.InterpolationColors = blendLowerHalf;
            g.FillPie(memento.brushLower, memento.rectLower.X, memento.rectLower.Y, memento.rectLower.Width, memento.rectLower.Height, 0, 180);
        }
RenderStandard