-2
我想剪輯在Java中畫布的左上角和右上角。我知道你可以在所有角落都使用addRoundRect
,但我不確定要做什麼才能做到頂角。與路徑圓頂角
這是我目前有:
@Override
protected void onDraw(Canvas canvas) {
float radius = 12f;
Path clipPath = new Path();
RectF rect = new RectF(0, 0, this.getWidth(), this.getHeight());
//uh...
//clipPath.addRoundRect(rect, radius, radius, Path.Direction.CW);
canvas.clipPath(clipPath);
super.onDraw(canvas);
}
可能的重複[如何使用Android畫布繪製矩形只有頂部和頂部的圓角?](http://stackoverflow.com/questions/5896234/how-to-use-android-canvas-to-抽取一個矩形與 - 僅-左上和 - topright-COR) – 2017-05-22 10:54:08