关于vb中重新定义坐标系的问题
我在vb中picture中重新定义了坐标系Picture1.Scale(-Picture1.ScaleWidth/2,Picture1.ScaleHeight/2)-(P...
我在vb中picture中重新定义了坐标系
Picture1.Scale (-Picture1.ScaleWidth / 2, Picture1.ScaleHeight / 2)-(Picture1.ScaleWidth / 2, -Picture1.ScaleHeight / 2)
然后在其中画了三条直线
Picture1.Line (-200 * Cos(0), -200 * Sin(0))-(200 * Cos(0), 200 * Sin(0)), &HC0&
Picture1.Line (-200 * Cos(pi / 2), -200 * Sin(pi / 2))-(200 * Cos(pi / 2), 200 * Sin(pi / 2)), &HC0&
Picture1.Line (-200 * Cos(pi / 4), -200 * Sin(pi / 4))-(200 * Cos(pi / 4), 200 * Sin(pi / 4)), &HC0&
但结果确实本来应该往右方斜的那条直线为什么往左斜了??
请教各位高人…… 展开
Picture1.Scale (-Picture1.ScaleWidth / 2, Picture1.ScaleHeight / 2)-(Picture1.ScaleWidth / 2, -Picture1.ScaleHeight / 2)
然后在其中画了三条直线
Picture1.Line (-200 * Cos(0), -200 * Sin(0))-(200 * Cos(0), 200 * Sin(0)), &HC0&
Picture1.Line (-200 * Cos(pi / 2), -200 * Sin(pi / 2))-(200 * Cos(pi / 2), 200 * Sin(pi / 2)), &HC0&
Picture1.Line (-200 * Cos(pi / 4), -200 * Sin(pi / 4))-(200 * Cos(pi / 4), 200 * Sin(pi / 4)), &HC0&
但结果确实本来应该往右方斜的那条直线为什么往左斜了??
请教各位高人…… 展开
2009-03-23
展开全部
Private Sub Command1_Click()
PI = 3.145926
Picture1.Scale (-Picture1.ScaleWidth / 2, Picture1.ScaleHeight / 2)-(Picture1.ScaleWidth / 2, -Picture1.ScaleHeight / 2)
Picture1.Line (-200 * Cos(0), -200 * Sin(0))-(200 * Cos(0), 200 * Sin(0)), &HC0&
Picture1.Line (-200 * Cos(PI / 2), -200 * Sin(PI / 2))-(200 * Cos(PI / 2), 200 * Sin(PI / 2)), &HC0&
Picture1.Line (400 * Cos(PI / 4), -200 * Sin(PI / 4))-(-400 * Cos(PI / 4), 200 * Sin(PI / 4)), &HC0&
End Sub
PI = 3.145926
Picture1.Scale (-Picture1.ScaleWidth / 2, Picture1.ScaleHeight / 2)-(Picture1.ScaleWidth / 2, -Picture1.ScaleHeight / 2)
Picture1.Line (-200 * Cos(0), -200 * Sin(0))-(200 * Cos(0), 200 * Sin(0)), &HC0&
Picture1.Line (-200 * Cos(PI / 2), -200 * Sin(PI / 2))-(200 * Cos(PI / 2), 200 * Sin(PI / 2)), &HC0&
Picture1.Line (400 * Cos(PI / 4), -200 * Sin(PI / 4))-(-400 * Cos(PI / 4), 200 * Sin(PI / 4)), &HC0&
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询