tools/Stampfer/PeterSource1_1/DockContent/VistaButton.cs
/// <summary>
/// Draws the glow for the button when the
/// mouse is inside the client area using
/// the GlowColor property.
/// </summary>
/// <param name="g">The graphics object used in the paint event.</param>
Draws the glow for the button when the
mouse is inside the client area using
the GlowColor property.
Draws the glow for the button when the mouse is inside the client area using the GlowColor property .
private void DrawGlow (Graphics g)
        {
            if (this.mButtonState == State.Pressed) { return; }
            SetClip(g);
            using (GraphicsPath glow = new GraphicsPath())
            {
                glow.AddEllipse(-5, this.Height / 2 - 10, this.Width + 11, this.Height + 11);
                using (PathGradientBrush gl = new PathGradientBrush(glow))
                {
                    gl.CenterColor = Color.FromArgb(mGlowAlpha, this.GlowColor);
                    gl.SurroundColors = new Color[] { Color.FromArgb(0, this.GlowColor) };
                    g.FillPath(gl, glow);
                }
            }
            g.ResetClip();
        }
private void DrawGlow ( Graphics g ) { if ( this . mButtonState == State . Pressed ) { return ; } SetClip ( g ) ; using ( GraphicsPath glow = new GraphicsPath ( ) ) { glow . AddEllipse ( - 5 , this . Height / 2 - 10 , this . Width + 11 , this . Height + 11 ) ; using ( PathGradientBrush gl = new PathGradientBrush ( glow ) ) { gl . CenterColor = Color . FromArgb ( mGlowAlpha , this . GlowColor ) ; gl . SurroundColors = new Color [ ] { Color . FromArgb ( 0 , this . GlowColor ) } ; g . FillPath ( gl , glow ) ; } } g . ResetClip ( ) ; }
Draws the glow for the button when the
mouse is inside the client area using
the GlowColor property.
Draws the glow for the button when the mouse is inside the client area using the GlowColor property .
g
Graphics
The graphics object used in the paint event.
The graphics object used in the paint event .