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

SVG导入时不规则路径剪切问题 #325

Closed
louiesun opened this issue Apr 10, 2024 · 3 comments
Closed

SVG导入时不规则路径剪切问题 #325

louiesun opened this issue Apr 10, 2024 · 3 comments

Comments

@louiesun
Copy link

Describe the bug
SVG导入时透明图片背景变为黑色。
最小化svg出错样例:
link
可以看到,预览是正常的

有趣的是,该svg是由MuPDF将pdf页面转成的svg。

To Reproduce
Steps to reproduce the behavior:

  1. 把上述svg导入
  2. See error

Expected behavior
正如Chromium核自带的预览。

Screenshots
screenshot

Desktop (please complete the following information):

  • Chromium
  • Version The official sample(github.io)

Additional Text
八成是透明黑?
即RGBA色值中,透明一般采用(255,255,255,0)
我正在构思使用MuPDF+Fabricjs写一个PDF编辑器。

@nihaojob
Copy link
Owner

@louiesun 我尝试使用项目里的SVG图片,并没有发生变黑的情况,你可以用下边的这个SVG图片试下
https://nihaojob.github.io/vue-fabric-editor-static/svg/387.svg

@louiesun
Copy link
Author

louiesun commented Apr 11, 2024

@louiesun 我尝试使用项目里的SVG图片,并没有发生变黑的情况,你可以用下边的这个SVG图片试下 https://nihaojob.github.io/vue-fabric-editor-static/svg/387.svg

对不起,我没有说清除。
这张svg只包含了一张透明背景的png。
所以,上文的所谓背景,实际上是png中透明黑RGBA: 255,255,255,0的部分。

更新:不是透明黑的问题,我去拆解了这张svg图片,实际上他是由一张原来将桥之外的地方涂成黑色的png,和一个路径剪切组成的。
所以是这个不规则路径剪切导致的问题。

所以现在不规则路径剪切考虑支持吗?

@louiesun louiesun changed the title SVG导入时透明图片问题 SVG导入时不规则路径剪切问题 Apr 11, 2024
@nihaojob
Copy link
Owner

@louiesun 暂时还没计划哈

@nihaojob nihaojob closed this as completed Jun 3, 2024
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

2 participants