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, 5), _
New Point(100, 30), _
New Point(80, 100), _
New Point(120, 120), _
New Point(60, 140), _
New Point(5, 60) _
}
' Fill a polygon with a textured brush.
e.Graphics.FillPolygon( _
New TextureBrush(picFace.Image), pts)
' Make a pen.
Dim a_pen As New Pen(Color.Tomato, 3)
a_pen.DashStyle = Drawing.Drawing2D.DashStyle.Dash
' Outline the polygon.
e.Graphics.DrawPolygon(a_pen, pts)
End Sub
|