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

ClipPath with text when we call toSVG is broken #5581

Closed
AlexSergey opened this issue Mar 18, 2019 · 2 comments · Fixed by #5591
Closed

ClipPath with text when we call toSVG is broken #5581

AlexSergey opened this issue Mar 18, 2019 · 2 comments · Fixed by #5591

Comments

@AlexSergey
Copy link
Contributor

AlexSergey commented Mar 18, 2019

Version

2.7.0

Test Case

I call toSVG method in your "clipping with text example" (http://fabricjs.com/clippath-part2). It is produce to error: "this._toSVG is not a function"
https://jsfiddle.net/zjg8f5L9/

Steps to reproduce

Just open my fiddle and check the console
https://jsfiddle.net/zjg8f5L9/

@asturur
Copy link
Member

asturur commented Mar 20, 2019

we can fix it, but i think TEXT can't be used as a clipPath in SVGs.
We should use the globalCompositeOperation of SVG, that would be fine, but i remember is not really well supported.
It works only on ie11 and the bigger browsers wants to support the version of svg2, but that is not ready yet ( at least 1 year this was the situation )

@asturur
Copy link
Member

asturur commented Mar 24, 2019

it sort of works. So text can be a clipPath i just forgot about it.
The position is not exact as it should be, but since i m busy, i m just fixing the error and moving on.

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

Successfully merging a pull request may close this issue.

2 participants