Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

绘制圆弧不全,当使用path绘制路径时,使用refD画的半圆弧总是只能画3/4样子 #4458

Open
bwbhw opened this issue Sep 30, 2024 · 1 comment

Comments

@bwbhw
Copy link

bwbhw commented Sep 30, 2024

问题描述

当使用path来绘制图案,图案里面但凡涉及到圆弧也就是A命令绘制的,尤其是半圆这样的大圆弧,总是只能绘制3/4样子,我使用重复绘制倒是可以将路径表示出来,但是这样里面的路径又不能闭合,导致填充的效果不是自己想要的

重现链接

//

重现步骤

let node = graph!.createNode({
tools: [
{
name: 'node-editor',
args: {
attrs: {
backgroundColor: '#ff0000',
},
x: '20%',
},
},
],
width: 24 * 4,
height: 16 * 4,

    shape: 'path',
    attrs: {
      label: {
        text: '开始',
        fontSize: 14,
        fill: '#333',
        fontWeight: 'normal',
        fontFamily: 'Arial, sans-serif',
      },
      body: {
        stroke: '#333',
        strokeWidth: 1,
        strokeDasharray:'0 0',
        fill: '#333'
      },
      path: {
        refD: ` 
                M 8 0
                L 16 0
                A 8 8 0 0 1 16 16
                L 8 16
                A 8 8 0 0 1 8 0
                Z
                 `
                 
      }
      
    },

当我换成
624EC7F6-DE77-4c4b-9F27-8613B222592C
那么就能绘制完美的圆弧,但是实际大小又不能变换

预期行为

实际我想要的就是半圆和直线连上,而不是这样只画了3/4样子,这样可以填充,感觉就是这个refD转换A命令不行,如果使用d:直接的就可以完美绘制完

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox ...]
  • X6 版本: [2.18.1 ...]

屏幕截图或视频(可选)

69480D7F-7C41-4a82-BEB3-E9C77F7D2289

补充说明(可选)

无需业务场景,就是createNode函数使用常规path路径中出现A命令不行

@x6-bot
Copy link
Contributor

x6-bot bot commented Sep 30, 2024

👋 @bwbhw

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant