I need to be able to selectively invalidate several (about 20) rectangles on the screen for performance reasons, so I tried the following:
Vector<Rect> myRects = new Vector<Rect>();
for (Rect r : myRects) {
invalidate(r);
}
However, this seems to invalidate the union of everyone Rect's, forming one large rectangle that encompasses all the small ones that I'm trying to invalidate.
How can I cancel several areas on the screen and only those areas?
source
share