获取脏区域内的draw()区域内、draw

2023-09-06 06:09:01 作者:呆滞与梦

如果我失效()用脏rect参数我的自定义视图的一部分,我怎么让draw()方法里面的脏矩形?画布的剪辑矩形是不一样的 - 在我的经验,这是典型的大几次

If I invalidate() a part of my custom view with a dirty rect parameter, how do I get the dirty rect inside the draw() method? The clipping rect of the canvas is not the same - in my experience, it's typically few times larger.

推荐答案

如果脏矩形是不一样的,你传递给无效()的人,那是因为屏幕的另一视图或地区也无效。

If the dirty rect is not the same as the one you passed to invalidate(), it is because another View or region of the screen was also invalidated.