切边时,使用透明填充,防止在某些机型上出现黑线
This commit is contained in:
parent
5e9f28f45d
commit
afe9cb1628
@ -75,7 +75,7 @@ export default class Painter {
|
||||
_doBorder(borderRadius, width, height) {
|
||||
if (borderRadius && width && height) {
|
||||
const r = Math.min(borderRadius.toPx(), width / 2, height / 2);
|
||||
|
||||
this.ctx.setFillStyle("rgba(0, 0, 0, 0)");
|
||||
this.ctx.beginPath();
|
||||
this.ctx.arc(-width / 2 + r, -height / 2 + r, r, 1 * Math.PI, 1.5 * Math.PI);
|
||||
this.ctx.lineTo(width / 2 - r, -height / 2);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user