开发者

SVG linearGradient coordinates calculation

开发者 https://www.devze.com 2023-01-04 08:43 出处:网络
How can I calculate coordinates (x1,y1,x2,y2) values for linearGradient SVG element with different angles?. Need to achieve rotation of gradient开发者_运维百科.

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


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消