I have a requirement to create a Bezier curve in my project. To do this, I draw a representation with paint, but the problem is that I do not get the exact form for my needs, as indicated in the figure below. So please kindly help me with your decisions and changes or changes in my code. Thanks in advance.
The code I use to create a Bezier curve:
public class DrawView extends View { public DrawView (Context context) { super (context); } protected void onDraw (Canvas canvas) { super.onDraw (canvas); Paint pLine = new Paint () {{ setStyle (Paint.Style.STROKE); setAntiAlias (true); setStrokeWidth (1.5f); setColor (Color.RED);
Mainactivity
public class MainActivity extends Activity { private DrawView drawView; @Override protected void onCreate (Bundle savedInstanceState) { super.onCreate (savedInstanceState); drawView = new DrawView (this); setContentView (drawView); } }
My actual need:

The result that I get:

source share