太極圖


共分六個步驟:T1, T2, T3

                            T4, T5, T6

除第T2圖為DrawPie外,其於均為Ellipse

參考座標如:

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint

Dim W As Integer = Me.Width - 20

Dim H As Integer = Me.Height - 50

Dim gra As Graphics

gra = Me.CreateGraphics

gra.Clear(Color.White)

 

Dim p As New Pen(Color.Black, 2)

Dim solBrush As New SolidBrush(Color.White)

Dim X(4) As Integer

 

'----T1----

gra.DrawEllipse(p, 0, 0, W, H)

gra.FillEllipse(solBrush, 0, 0, W, H)

 

'---------T2---------------

solBrush.Color = Color.Black

gra.FillPie(solBrush, 0, 0, W, H, 90, 180)

 

'---------T3---------------

X(1)=W/4: X(2)=0: X(3)=W/2: X(4)=H/2

gra.FillEllipss(solBrush, X(1), X(2), X(3), X(4))

 

 

'以下請自行完成