问题
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