Android android.graphics.Path width limited to 2036?

99封情书 提交于 2019-12-11 10:39:34

问题


I am trying to draw a very long line with a Path. The line is correctly displayed up until to a x target value of 2036.

when i call path.lineTo(2037, y) the entire path is is not drawn. The call to canvas.drawPath(path, paint) does nothing.

Is there a problem i am not aware of?

On a second note... when i draw the same sequence of points via canvas.drawLines(float[], paint) the lines are correctly drawn but they are not antialiased. Is there a problem with antialiasing and drawLines?


回答1:


There is a limitation with hardware acceleration: a Path can only be about 2048 pixels wide or high on most GPUs.

Line anti-aliasing should work as of Android 3.2 with hardware acceleration.




回答2:


Imho these limits would be described in these hundreds of lines that describe the difference of one version of Android from the other one.



来源:https://stackoverflow.com/questions/8873242/android-android-graphics-path-width-limited-to-2036

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!