需要實現(xiàn)類似上圖的效果,在不用美工切圖的情況下使用canvas畫圖如何實現(xiàn)
小伙看你根骨奇佳,潛力無限,來學(xué)PHP伐。
Canvas draws 2 semicircles on both sides according to the coordinates, and draws a rectangle in the middle
I can only say that cutting the image will save a lot of trouble. Cut the .9.png image. I have not tried the code implementation, so I will mark it first.
pseudo code:
beginPath();
lineTo();
quadraticCurveTo();
lineTo();
quadraticCurveTo();
endPath();