Source/NFX.WinForms/Utils.cs
/// <summary>
/// Draws an underline. Similar concept to VS or MS Word
/// </summary>
Draws an underline. Similar concept to VS or MS Word
Draws an underline . Similar concept to VS or MS Word
public static void DrawUnderline(Graphics gr, Point start, int length, Color color)
    {
      using(Pen pen = new Pen(color, 2f))
      {
        pen.DashStyle = DashStyle.Dot;
        Point p1 = start;
        Point p2 = new Point(start.X+length, start.Y);
        gr.DrawLine(pen, p1, p2);
        p1.Offset(+2, 1);
        p2.Offset(+2, 1);
        gr.DrawLine(pen, p1, p2);
      }
    }
public static void DrawUnderline ( Graphics gr , Point start , int length , Color color ) { using ( Pen pen = new Pen ( color , 2f ) ) { pen . DashStyle = DashStyle . Dot ; Point p1 = start ; Point p2 = new Point ( start . X + length , start . Y ) ; gr . DrawLine ( pen , p1 , p2 ) ; p1 . Offset ( + 2 , 1 ) ; p2 . Offset ( + 2 , 1 ) ; gr . DrawLine ( pen , p1 , p2 ) ; } }
Draws an underline.
Draws an underline .
gr
Graphics
start
Point
length
int
color
Color