Accord.Controls.AngleBox.OnPaint C# (CSharp) Метод

OnPaint() защищенный Метод

Raises the E:System.Windows.Forms.Control.Paint event.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs A that contains the event data.
Результат void
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            Graphics g = e.Graphics;
            g.SmoothingMode = SmoothingMode.AntiAlias;
            g.FillRectangle(Brushes.White, ClientRectangle);

            float cx = ClientRectangle.Width / 2f;
            float cy = ClientRectangle.Height / 2f;

            float ex = cx + (float)Math.Cos(-angle) * cx;
            float ey = cy + (float)Math.Sin(-angle) * cy;

            g.DrawLine(pen, cx, cy, ex, ey);
        }