Android的,移动的位图沿路径? [英] Android, move bitmap along a path?
问题描述
我想知道是否有可能从路径选择的坐标绘制位图随着时间的推移,例如,我有一个阳光的形象,我想移动它,随着时间的推移,沿弧形路径
有没有一些方法来定义这样的路径,然后沿着它移动,这样我就不用数学计算呢?
感谢。
我在想一个解决办法:
_ / \
如果您的圆弧有这种形状的(意思是不到半圈,定位horizontaly),那么你可以遍历的x值和使得x得到y表示的路径上。那么你的位图移动到该位置。
I would like to know if it's possible to select coordinates from a path to draw a bitmap over time, for example, I have an image of a sun, and I would like to move it, over time, along an arc path.
Is there some way to define a path like this and then move along it, so that I don't have to calculate it mathematically?
Thanks.
I'm thinking of one solution:
_ / \
If your arc has this kind of shape (meaning less than half a circle and positioned horizontaly) then you could iterate the x value and for that x get the y that's on the path. Then move your bitmap to that position.
这篇关于Android的,移动的位图沿路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!