PixiJS:没有正确绘制圆角矩形

问题描述 投票:1回答:1

绘制圆角矩形后,角落不完美圆角。角落是像素化的:

enter image description here

如何在没有像素化角的情况下绘制正确的圆角矩形?这是我的代码:

var graphics = new PIXI.Graphics();
graphics.beginFill(0x3e494b);
graphics.lineStyle(4, 0x0, .3);
graphics.drawRoundedRect(
    x,
    y,
    width,
    height,
    30
);
graphics.endFill();
javascript pixijs
1个回答
1
投票

如果您的项目使用Pixi Application,请尝试将antialias选项设置为true。例如:

const app = new Application({antialias: true});
© www.soinside.com 2019 - 2024. All rights reserved.