是否可以将段正方形隐藏在Paperjs中的路径上

发布于 2025-02-03 04:32:36 字数 299 浏览 3 评论 0原文

在PaperJS中创建路径元素时,默认行为会在每个片段的交点处创建小正方形。有没有办法保持默认的蓝色路径线但隐藏正方形?可用于显示/隐藏的属性?

画一条线以查看示例

http://prapejs.org/examples/path-simples/path-simplification/

When creating path elements in paperJS, the default behavior creates small squares at the intersection of each segment. Is there a way to maintain the default blue path line but hide the squares? A property that can be used to show/hide them?

Draw a line to see an example

http://paperjs.org/examples/path-simplification/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤千羽 2025-02-10 04:32:36

我想知道同一件事有一定的观点,但是直到您的问题之前,我从未试图弄清楚它。我似乎找不到有关此文件的任何文档,但它在JSfiddle上起作用。尝试以下操作:

 const scope = new paper.PaperScope();
 project = new scope.Project(canvasElem);
 project.options.handleSize = 0;

找到文档

我相信正确的方法是在scope.settings中设置此值;

 const scope = new paper.PaperScope();
 scope.settings.handleSize = 0;

paperscope.settings.settings.handlesize

I wondered the same thing a some point but never tried to figure it out until your question. I cant seem to find any documentation on this but it worked on jsfiddle. Try this:

 const scope = new paper.PaperScope();
 project = new scope.Project(canvasElem);
 project.options.handleSize = 0;

Found documentation

I believe the correct approach would be to set this value in scope.settings;

 const scope = new paper.PaperScope();
 scope.settings.handleSize = 0;

PaperScope.settings.handleSize

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文