Canvas.getClipBounds() is the correct method to query the dirty region. It seems like you are doing something else that is causing your entire View to get dirty.
On Fri, Jun 3, 2011 at 5:44 AM, Lee <[email protected]> wrote: > I'm trying to find out how to get the invalid region of a view in the > onDraw callback. What I've got is a view that derives from ImageView. > I want to invalidate just a part of that view defined by coordinates > that I pass to the postInvalidate function. > > In my onDraw callback how do I get hold of the rectangle that defines > the rectangle that was passed to postInvalidate? Every time that my > onDraw is called the rectangle that is returned from > canvas.getClipBounds is always 0,0,width,height despite the > postInvalidate function taking a rectangle that is not the entire > width and height of the view. > > Is the getClipBounds function the correct way to get hold of the > invalid region? Are there some special flags that need to be set on a > view so that an invalid region actually is respected? > > Thanks > Lee > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Romain Guy Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

