关于绘制二维曲线时设定基准线的问题
打算在绘制二维曲线加入一条基准线例:
Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.Scale (0, 240)-(320, 0)
Picture1.Line (0, 100)-(320, 100), vbGreen
End Sub
假如我改成
Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.Scale (0, Picture1.ScaleHeight)-(320, 0)
Picture1.Line (0, Picture1.ScaleHeight/2)-(320, Picture1.ScaleHeight/2), vbGreen
End Sub
基准线则看不到
但是改成
Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.Scale (0, Picture1.ScaleHeight)-(320, 0)
Picture1.Line (0, -Picture1.ScaleHeight/2)-(320, -Picture1.ScaleHeight/2), vbGreen
基准线按我计划的显示
问题是”纵坐标范围应该在(0,Picture1.ScaleHeight)内,但显然是-Picture1.ScaleHeight/2才为我想定义的中线作为基准线,谁能解释下谢谢
补充:VB , 基础类