Private Sub Form_DblClick()
ScaleMode = vbPixels
Dim x As Long, y As Long, z As Long, r As Long, c As Single
If ScaleWidth < ScaleHeight Then r = ScaleWidth / 2 Else r = ScaleHeight / 2
For x = -r To r
For y = -r To r
If x * x + y * y <= r * r Then
z = Sqr(r * r - x * x - y * y)
c = (x + y + 2 * z) / (r * 2)
If c < 0 Then c = 0
PSet (x + r, y + r), RGB(c * 153, c * 50, c * 204)
End If
Next
Next
End Sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 142