2

I have an app where users are moving on a View background, I'm drawing the users, but would also like to display a trail after them with a few seconds of history. I could do it using a bunch of line segments, but I worry that would be inneffective.

I would like some preimplemented class that performs this, so I don't have to get my hands dirty with making the actual drawing efficient. I was thinking in the lines of a of a android.graphics.Path, but I can't find a way to contonously remove the oldest parts of it. Is there a way to achieve this using a path?

If not does anyone have any other tips? Anywhere I could look for a handy and efficient solution?

Grateful for any help!

4

1 回答 1

0

您可以采用当前视图,将其与原始背景混合,并将其用作新画布,为下一帧/即将到来的帧绘制您的用户。这将给出用户的模糊轨迹(取决于您将其与原始背景结合的方式)。

于 2012-11-22T11:01:21.640 回答