ComponentFactory.Krypton.Toolkit.ModalWaitDialog.OnPaint C# (CSharp) Method

OnPaint() protected method

Raises the OnPaint event.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs A PaintEventArgs containing event data.
return void
        protected override void OnPaint(PaintEventArgs e)
        {
            // Let base class perform standard painting
            base.OnPaint(e);

            // Start drawing offset by 16 pixels from each edge
            e.Graphics.TranslateTransform(32, 32);

            // Number of degrees to rotate the image around
            e.Graphics.RotateTransform(_spinAngle);

            // Perform actual draw of the image
            e.Graphics.DrawImage(_hourGlass,
                                 -16, -16,
                                 _hourGlass.Width,
                                 _hourGlass.Height);

            // Must return the graphics instance in same state provided
            e.Graphics.ResetTransform();
        }