开发者

android canvas draw mysteriously clipped

开发者 https://www.devze.com 2023-01-02 17:25 出处:网络
My android app draws a chart on a Canvas.It works fine in the simulator.On a real device the chart is clipped to the left 1/5 of the screen.I\'ve tried:

My android app draws a chart on a Canvas. It works fine in the simulator. On a real device the chart is clipped to the left 1/5 of the screen. I've tried:

canvas.clipRect(0, 0, canvas.getWidth(), canvas.getHeight(), Regi开发者_运维知识库on.Op.REPLACE);

to clear the clipping. Am I missing something? Does layering have anything to do with this?

Thanks, Gerry


I changed my order of draw operations and the clip problem went away. (It was superstition.) The original problem gave results on a real device that clipped differently than the simulator.

0

精彩评论

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