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路径点渲染问题,C 方式 #3925

Closed
light-years-run opened this issue Sep 22, 2023 · 7 comments
Closed

path路径点渲染问题,C 方式 #3925

light-years-run opened this issue Sep 22, 2023 · 7 comments
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions

Comments

@light-years-run
Copy link

问题描述

再次感谢对 #3909 的解答,对于rx和ry相同的时候,arcTo转换出来已经没有问题了,今天下午又做了一个rx和ry不同的情况,转换出来的路径点是没有问题的,但是x6渲染的时候不对;
转换后的路径点是:
M361.56 226.29 L 651.56 227.68 C650.56 276.57 596.83 321.66 509.81 346.65 C 422.78 371.64 315.07 372.9 225.63 349.99 Z

将上面路径点直接用svg成图和采用 d方式成图 如下
image

但是采用refD渲染就有会偏差,从结果看,是rx和ry计算有误,rx和ry不应该相同,但是却相同了
image

希望rx和ry不同的情况下,refD能够正确渲染

重现链接

test

重现步骤

如上图

预期行为

期望正确显示rx和ry不同的情况

平台

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

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@NewByVector
Copy link
Contributor

修改为 refD 后,会将图形按照节点的长和宽进行拉伸。所以和用 d 的样式不一致是正常的。

@NewByVector NewByVector added the type: discussion 讨论 Usage questions, guidance, and other discussions label Sep 25, 2023
@light-years-run
Copy link
Author

修改为 refD 后,会将图形按照节点的长和宽进行拉伸。所以和用 d 的样式不一致是正常的。

这种情况在角度小于90的时候没问题,大于90度就不行了。如果按照您说的这样,该怎么绘制一个rx和ry不同的扇形呢?

@NewByVector
Copy link
Contributor

你的节点尺寸是多少?

@light-years-run
Copy link
Author

M361.56 226.29 L 651.56 227.68 C650.56 276.57 596.83 321.66 509.81 346.65 C 422.78 371.64 315.07 372.9 225.63 349.99 Z

width:100, height:100

@NewByVector
Copy link
Contributor

NewByVector commented Sep 26, 2023

image
如果节点的 rx 和 ry 不一致,需要将节点尺寸做相应的修改(和实际图形的尺寸比例一致)。

@light-years-run
Copy link
Author

image 如果节点的 rx 和 ry 不一致,需要将节点尺寸做相应的修改(和实际图形的尺寸比例一致)。

是的 谢谢,是因为我高度没计算对导致的,谢谢你的回复

@x6-bot
Copy link
Contributor

x6-bot bot commented Sep 30, 2024

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Sep 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions
Projects
None yet
Development

No branches or pull requests

2 participants