我想知道是否有可能从路径选择的坐标绘制位图随着时间的推移,例如,我有一个阳光的形象,我想移动它,随着时间的推移,沿弧形路径
有没有一些方法来定义这样的路径,然后沿着它移动,这样我就不用数学计算呢?
感谢。
解决方案我在想一个解决办法:
_
/
如果您的圆弧有这种形状的(意思是不到半圈,定位horizontaly),那么你可以遍历的x值和使得x得到y表示的路径上。那么你的位图移动到该位置。
![Android移动开发技术文章 手机开发](https://p.xsw88.cn/allimgs/daicuo/20230912/4738.png)
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.
相关推荐
最新文章