是否可以为 Konva.Path 创建 cornerRadius

Is it possible to create cornerRadius for Konva.Path

我知道可以将 cornerRadius 添加到 Konva.Rect,但是有没有办法对 Konva.Path 做同样的事情?我已经阅读了文档、Whosebug,但找不到任何解决方案。任何想法都会很棒。

没有。 Konva.Path 不支持。当您使用 data 属性定义自己的路径时,您必须自己定义拐角半径逻辑。

您只能通过 lineJoin: 'round' 设置稍微圆角 https://konvajs.org/api/Konva.Shape.html#lineJoin