tags:

views:

16

answers:

2

Hi ,

How can I calculate coordinates (x1,y1,x2,y2) values for linearGradient SVG element with different angles?. Need to achieve rotation of gradient.

Any help much appreciated,

Thanks SHAN

A: 

You can use gradientTransform="rotate(angle [cx cy])" or you can calculate the angle you want and tweak the gradient vector (x1,y1)->(x2,y2).

Erik Dahlström
A: 

Thanks for your reply Erik, I've tried already with gradietTransform attribute but no success yet, I have an angle but I don't know how to tweak gradient vector for that value, can you explain me about this.

SHAN

shan
Here's an example: http://dev.w3.org/SVG/profiles/1.1F2/test/harness/htmlObject/pservers-grad-06-b.html
Erik Dahlström