view -> invalidate(Rect dirty) ?

Problems with Canvas, OpenGL, etc...

view -> invalidate(Rect dirty) ?

Postby McBain83 » Tue Dec 21, 2010 6:06 am

Hi guys,
Beginner developer here so go easy! =P
I'm playing around with some basic functions in android to get my head around concepts etc. I'm up to the simple 2D drawing part now..
I have created a custom view and drawn some lines etc all good..
Now im drawing a circle where I touch the screen ( onTouchEvent ) which I have done. But what I want to happen is to only invalidate the area where the new circle is to be drawn so I call invalidate(Rect dirty) and give it the specific area (so the old circle stays on the screen) yet I think my whole view is still being redrawn?

What am I doing wrong or not understanding?
I assume that onDraw is being called after onTouchEvent automatically which is fine but its not re drawing the specified invalidated area =(

Thanks for any assistance. If this has been covered in another thread or example please point it out to me.
Once Poster
Once Poster
Posts: 1
Joined: Tue Dec 21, 2010 5:56 am


Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 3 guests