Private Sub Command1_Click()
length = 2000 '長度'
x = 1000
y = 600
Picture1.PSet (x, y)
sida = 0 '角度 '
Do While length >= 50
Select Case sida
Case 0
x = x + length
sida = 90
Case 90
y = y + length
sida = 180
Case 180
x = x - length
sida = 270
Case 270
y = y - length
sida = 0
End Select
length = length - 50
Picture1.Line -(x, y)
Loop
End Sub
這是從(1000,600)的座標開始,畫長為2000角度為0的直線,到終點時,轉90度畫長1950長的直線,依此原則,每到終點長度檢50,角度90度的畫線方式,直到長度小於50為止.....................................................請問如何把他用成逆轉呢???????????????拜託幫個忙^^
2005-06-16 07:28:05 · 1 個解答 · 發問者 驚驚 1 in 電腦與網際網路 ➔ 程式設計
所謂的“逆轉”是指原本從外到內,改成由內到外嗎??
如果是這個意思的話:
就先把座標先往下和左移
然後改三行
1.length=50
2.do while length <= 2000
3.length = length + 50
以下是程式碼
Private Sub Command1_Click()
length = 50 '長度'
X = 4300
Y = 2290
Picture1.PSet (X, Y)
sida = 0 '角度 '
Do While length <= 2000
Select Case sida
Case 0
X = X + length
sida = 90
Case 90
Y = Y + length
sida = 180
Case 180
X = X - length
sida = 270
Case 270
Y = Y - length
sida = 0
End Select
length = length + 50
Picture1.Line -(X, Y)
Loop
End Sub
那,如果“逆轉”不是這個意思的話,請說清楚一點喔
2005-06-16 08:19:43 · answer #1 · answered by 上官 5 · 0⤊ 0⤋