在绘制矩形时,
Dim canGraph As Canvas
dim imgGraph As ImageView
Dim edtChi As EditText
dim chi as int
chi=edtchi.text(假设值为100,由使用者输入)
canGraph.Initialize(imgGraph)
canGraph.DrawColor(Colors.White)
SetRect.Initialize(110dip,170dip-chi*1dip,120dip,170dip)
canGraph.DrawRect(SetRect_ChiScore,Colors.Blue,True,3dip)
所绘制的矩形与
SetRect.Initialize(110dip,70dip,120dip,170dip)
canGraph.DrawRect(SetRect_ChiScore,Colors.Blue,True,3dip)
不同,可能在170dip-chi运算时,不是用dip为单位,请问要如何解决,使得两者图形相同,谢谢
Dim canGraph As Canvas
dim imgGraph As ImageView
Dim edtChi As EditText
dim chi as int
chi=edtchi.text(假设值为100,由使用者输入)
canGraph.Initialize(imgGraph)
canGraph.DrawColor(Colors.White)
SetRect.Initialize(110dip,170dip-chi*1dip,120dip,170dip)
canGraph.DrawRect(SetRect_ChiScore,Colors.Blue,True,3dip)
所绘制的矩形与
SetRect.Initialize(110dip,70dip,120dip,170dip)
canGraph.DrawRect(SetRect_ChiScore,Colors.Blue,True,3dip)
不同,可能在170dip-chi运算时,不是用dip为单位,请问要如何解决,使得两者图形相同,谢谢