[ VB2010 ] - 繪製弧線
Graphics.DrawArc(Pen物件, X, Y, W, H, 起始角度, 終止角度)
Public Class Form1
Dim Painting As Bitmap = New Bitmap(400, 400)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim G As Graphics = Graphics.FromImage(Painting)
G.DrawArc(New Pen(Brushes.Red, 5), 50, 50, 200, 200, 0, 180)
G.DrawArc(New Pen(Brushes.Navy, 5), 50, 50, 200, 200, 0, -180)
G.DrawLine(New Pen(Brushes.Orange, 2), 0, 50, 400, 50)
G.DrawLine(New Pen(Brushes.Olive, 2), 0, 100, 400, 100)
G.DrawLine(New Pen(Brushes.OrangeRed, 2), 0, 150, 400, 150)
Me.BackgroundImageLayout = ImageLayout.None
Me.BackgroundImage = Painting
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
沒有留言:
張貼留言