views:

13

answers:

1

I have a canvas with two lines of text on it. I want to animate these 2 lines differently. How to do this?

How can i only animated one line of text without clearing the whole screen?

A: 

Instead of clearing the whole screen you can attempt to clear just a rectangle around the text and redraw the text. Depending on what is behind the text, this could get tricky.

What may be cleaner, depending on your application, would be to have two canvases: one for the lines of text and one for the proper canvas (Which would be everything else you're drawing).

Then clear the text-only canvas and redraw it as you please to animate, leaving the normal canvas alone.

Simon Sarris