VB.NET绘图3---绘制不规则线条

 '========================================================
    '函数名称:Drawing5()
    '函数参数:
    '函数功能:绘制一个不规则线条
    '=======================================================
    Private Sub Drawing5()
        Dim Graphics1 As Graphics = PictureBox1.CreateGraphics '在容器PictureBox1里面 创建画布
        Dim Pen1 As New Pen(Color.Red) ' 创建画笔,并且制定红色
        Dim points() As Point = {
                                    New Point(90, 10),
                                    New Point(70, 100),
                                    New Point(100, 80),
                                    New Point(0, 0)
                                }
        Graphics1.DrawLines(Pens.Blue, points)
        Graphics1.Dispose() '释放内存
        Pen1.Dispose() '释放内存
    End Sub

VB.NET绘图3---绘制不规则线条_第1张图片

你可能感兴趣的:(VB.NET绘图)