How to use android canvas to draw a Rectangle with only topleft and topright corners round?

前端 未结 15 2440
后悔当初
后悔当初 2020-11-29 01:58

I found a function for rectangles with all 4 corners being round, but I want to have just the top 2 corners round. What can I do?

canvas.drawRoundRect(new Re         


        
15条回答
  •  难免孤独
    2020-11-29 02:31

    You can draw that piece by piece using drawLine() and drawArc() functions from the Canvas.

提交回复
热议问题