在android中有效地绘制正弦波 [英] Drawing sine waves effeciently in android

查看:478
本文介绍了在android中有效地绘制正弦波的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个应用程序,我需要在两个给定的点之间画一个正弦波。我已经Google,Google已经没有找到任何我认为合适的东西。
所以我的问题是,在android中有没有一个有效的方法来使用一些预定义的点来绘制像波形一样的平滑波?
感谢您提前提供任何帮助

解决方案

您可以使用 android.graphics.Path 类构造一组二次或立方贝塞尔样条您的控制点集合之间的曲线。


I am making an app where I need to draw a sine wave between two given points. I have Google'd, and Google'd, and I haven't found anything that I have found suitable. So my question is, is there an efficient way in android to use some pre defined points to draw a smooth wave like form? thank you for any help in advance

解决方案

You can use the android.graphics.Path class to construct a set of quadratic or cubic Bézier spline curves between your set of control points.

这篇关于在android中有效地绘制正弦波的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆