K线投射到安卓屏幕计算方法

来源:互联网 发布:小站tpo模考软件 编辑:程序博客网 时间:2024/04/28 14:50

K线的坐标 



安卓的坐标




那么给定一个真实的价格对应安卓屏幕的坐标Y求 法

假设max 最大值  min 最小值 topMargin 上面留白  bottomMargin 下面留白

int getY(int input){

int realDrawHeight=getHeight()-topMargin-bottomMargin;

return getHeight-readDrawHeight*input/(max-min)-bottomMargin;

}






0 0
原创粉丝点击