绘制圆角矩形后,角落不完美圆角。角落是像素化的:
如何在没有像素化角的情况下绘制正确的圆角矩形?这是我的代码:
var graphics = new PIXI.Graphics();
graphics.beginFill(0x3e494b);
graphics.lineStyle(4, 0x0, .3);
graphics.drawRoundedRect(
x,
y,
width,
height,
30
);
graphics.endFill();
如果您的项目使用Pixi Application,请尝试将antialias选项设置为true。例如:
const app = new Application({antialias: true});