|
@@ -72,10 +72,27 @@ const drawCanvas = () => {
|
|
|
const x = (canvas.width - secondImgWidth) / 2
|
|
|
const y = canvas.height - secondImgHeight - 460
|
|
|
|
|
|
+ // 设置边框样式
|
|
|
+ ctx.strokeStyle = '#E1E4E9'
|
|
|
+ ctx.lineWidth = 1
|
|
|
+
|
|
|
+ // 绘制圆角矩形路径
|
|
|
ctx.beginPath()
|
|
|
- ctx.arc(x + secondImgWidth / 2, y + secondImgHeight / 2, secondImgWidth / 2, 0, Math.PI * 2, true)
|
|
|
+ const logoRadius = 4
|
|
|
+ ctx.moveTo(x + logoRadius, y)
|
|
|
+ ctx.lineTo(x + secondImgWidth - logoRadius, y)
|
|
|
+ ctx.quadraticCurveTo(x + secondImgWidth, y, x + secondImgWidth, y + logoRadius)
|
|
|
+ ctx.lineTo(x + secondImgWidth, y + secondImgHeight - logoRadius)
|
|
|
+ ctx.quadraticCurveTo(x + secondImgWidth, y + secondImgHeight, x + secondImgWidth - logoRadius, y + secondImgHeight)
|
|
|
+ ctx.lineTo(x + logoRadius, y + secondImgHeight)
|
|
|
+ ctx.quadraticCurveTo(x, y + secondImgHeight, x, y + secondImgHeight - logoRadius)
|
|
|
+ ctx.lineTo(x, y + logoRadius)
|
|
|
+ ctx.quadraticCurveTo(x, y, x + logoRadius, y)
|
|
|
+ ctx.closePath()
|
|
|
ctx.clip()
|
|
|
ctx.drawImage(thirdImg, x, y, secondImgWidth, secondImgHeight)
|
|
|
+ // 绘制边框
|
|
|
+ ctx.stroke()
|
|
|
ctx.restore()
|
|
|
|
|
|
// 企业名称
|