How android.view.View.invalidate(int l, int t, int r, int b) make only the dirty area redrawn?

by FBear » Sat, 07 Mar 2009 10:54:21 GMT


Sponsored Links
 android.view.View.invalidate(int l, int t, int r, int b) can mark the
the area defined by the rect (l,t,r,b) as needing to be drawn.
But how does View update only the dirty area specified by the rect?
Is it wise enough to redraw only the dirty area even if the onDraw is
customized to update the whole view?

I read some sources and searched in google developer group. No answer
to this question was found.

Would anybody please kindly explain that to me?

Thanks in advance.

FBear

--~--~---------~--~----~------------~-------~--~----~



How android.view.View.invalidate(int l, int t, int r, int b) make only the dirty area redrawn?

by FBear » Sat, 07 Mar 2009 17:21:35 GMT


 Do you mean that onDraw(Canvas) will ignore the drawing call in it
when the affected area is not in the dirty area?
I can hardly believe it it so wise.
How about the drawing call which affected area overlaps with the dirty
area?




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How android.view.View.invalidate(int l, int t, int r, int b) make only the dirty area redrawn?

by FBear » Sat, 07 Mar 2009 22:17:08 GMT


 Thank you very much!



--~--~---------~--~----~------------~-------~--~----~