I want to draw a curve that connects three points to my screen
PointA = (480,46) PointB = (160,137) point C = (0,228)
How to draw a curve using the Android API?
Please help ..
thanks, sen
whatever I want / I can produce it using the following code:
safe void onDraw (canvas canvas) {super. Don (canvas); Point MPE1 = new point (W / 1.2F, H / 19F); Point MP Point 2 = New Pointoff (W / 24, H / 19F); Path myPath1 = new path (); Paint paint = new paint (); Paint.setAntiAlias (right); Paint.setStyle (Style.STROKE); Paint.setStrokeWidth (2); Paint.setColor (Color.WHITE); MyPath1 = drawCurve (canvas, paint, mPoint1, mPoint2); Canvas leftpath (Myth 1, paint); } Private path drawCurve (Canvas Canvas, Paint Paint, Points MPV, Points MPEmb) {path myPath = new path (); MyPath.moveTo (63 * w / 64, H / 10); MyPath.quadTo (mPointa.x, mPointa.y, mPointb.x, mPointb.y); Return to Merry; }
It will find both sides of the screen (landscape mode) and a full curve will come on the screen.
Comments
Post a Comment