画曲线
protected void onDraw(Canvas canvas) { super.onDraw(canvas); PointF mPoint1 = new PointF(w/1.2F, h/1.2F); PointF mPoint2 = new PointF(w/24, h/1.2F); Path myPath1 = new Path(); Paint paint = new Paint(); paint.setAntiAlias(true); paint.setStyle(Style.STROKE); paint.setStrokeWidth(2); paint.setColor(Color.WHITE); myPath1 = drawCurve(canvas, paint, mPoint1, mPoint2); canvas.drawPath(myPath1, paint); } private Path drawCurve(Canvas canvas, Paint paint, PointF mPointa, PointF mPointb) { Path myPath = new Path(); myPath.moveTo(63*w/64, h/10); myPath.quadTo(mPointa.x, mPointa.y, mPointb.x, mPointb.y); return myPath; }
相关推荐
大地飞鸿 2020-11-12
星星有所不知 2020-10-12
jinxiutong 2020-07-26
MIKUScallion 2020-07-05
songfens 2020-07-05
songfens 2020-06-11
songfens 2020-06-08
northwindx 2020-05-31
northwindx 2020-05-31
northwindx 2020-05-27
northwindx 2020-05-25
MIKUScallion 2020-05-25
jinxiutong 2020-05-10
xdyangxiaoromg 2020-05-10
大地飞鸿 2020-05-06
northwindx 2020-04-25