获取脏区域内的draw() [英] Getting the dirty region inside draw()

查看:158
本文介绍了获取脏区域内的draw()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我失效()用脏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.

这篇关于获取脏区域内的draw()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆