use*_*619 0 android canvas line
我有两点,比如说 (x1,y1) 和 (x2,y2)。现在我必须使用OnDraw()方法在这些点之间画一条线。
我试过
Paint mPaint = new Paint()
mPaint.setColor(Color.BLACK);
path.moveTo(x1, y1);
path.lineTo(x2, y2);
canvas.drawPath(path, mPaint);
Run Code Online (Sandbox Code Playgroud)
但它不起作用
问候,
苏迪尔