开发者

Canvas android question regarding endpoints

Why does on draw sometimes what pixels like:

            xAxis = new RectF(0, 0, 400, 400);

Other times it takes float points like:

    xAxis = new RectF(0.29f, 0.24f, 0.55f, 0.76f);

How do I know which one to use and when? because I was using the float point version then all of a sudden the lines disappeared and it took me a whil开发者_JAVA技巧e to figure out what happened.


Why don't you use just Rect instead of RectF? RectF is for floating point, Rect is for integers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜