-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Is it possible to use the transform function with a gradient? #43
Comments
You'll have to use the gradient.attr('gradientTransform', 'skewX(30)') I fiddled something here so you can test it yourself: |
Thank you for that answer, what is the correct syntax with the matrix? I tried with : "gradient.attr('gradientTransform','matrix(0.79545714,-0.70713416,0.51685009,0.58140605,-3.2162008,-48.602235)')" but it does not work |
That should be the right syntax. I'm not quite sure on SVG support on matrix transformations applied to gradients. At first sight they don't work in Chrome but I didn't go really deep into it. |
I have a svg file where there are gradients with matrix |
Is it working in the browser as well? Can you send it so I can have a look? Maybe that would explain a little bit more. |
my svg file with "gradientTransform =" matrix " |
Ah, ok, I see now. You should set the gradientUnits to: gradient.attr('gradientUnits', 'userSpaceOnUse') |
I add gradient.attr ('gradientUnits', 'userSpaceOnUse') but it does not work |
It does here: http://jsfiddle.net/wout/KpYZy/9/ |
I found my mistake I forgot it; |
No problem. |
eg gradient.transform ('Matrix', '0 .5261727,0,0,0.7582733, -9.5647863,5.1185895 ') it does not work
The text was updated successfully, but these errors were encountered: