开发者

Relationship between Surface and Canvas: Android

开发者 https://www.devze.com 2023-01-09 07:24 出处:网络
What exactly is the relationship between a Su开发者_高级运维rface and Canvas. Please explain.A surface is a buffer. A Canvas holds the drawing.

What exactly is the relationship between a Su开发者_高级运维rface and Canvas.

Please explain.


A surface is a buffer. A Canvas holds the drawing.

Views are not attached to the Canvas nor the Surface. The window is tied to a Surface and the ViewRoot asks the Surface for a Canvas that is then used by the Views to draw onto.

For a detailled anwser, you can read this whole discussion, really interesting.

0

精彩评论

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