绘制图形时,座标及线条单位问题

Discussion in 'Chinese Forum' started by hsiao85, Apr 14, 2018.

Tags:
  1. hsiao85

    hsiao85 New Member Licensed User

    在绘制矩形时,
    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为单位,请问要如何解决,使得两者图形相同,谢谢
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice