Private Sub Form1_Paint(ByVal sender As Object, ByVal e As _
System.Windows.Forms.PaintEventArgs) Handles _
MyBase.Paint
Dim pts() As Point = {New Point(20, 20), New Point(120, _
20), New Point(50, 50), New Point(180, 20)}
Dim the_pen As New Pen(Color.Blue, 10)
the_pen.LineJoin = Drawing2D.LineJoin.Bevel
e.Graphics.DrawLines(the_pen, pts)
e.Graphics.DrawString("Bevel", Me.Font, Brushes.Black, _
200, 20)
e.Graphics.TranslateTransform(0, 60)
the_pen.LineJoin = Drawing2D.LineJoin.Miter
e.Graphics.DrawLines(the_pen, pts)
e.Graphics.DrawString("Miter", Me.Font, Brushes.Black, _
200, 20)
e.Graphics.TranslateTransform(0, 60)
the_pen.LineJoin = Drawing2D.LineJoin.MiterClipped
e.Graphics.DrawLines(the_pen, pts)
e.Graphics.DrawString("MiterClipped", Me.Font, _
Brushes.Black, 200, 20)
e.Graphics.TranslateTransform(0, 60)
the_pen.LineJoin = Drawing2D.LineJoin.Round
e.Graphics.DrawLines(the_pen, pts)
e.Graphics.DrawString("Round", Me.Font, Brushes.Black, _
200, 20)
End Sub
|