- Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="main24" width="960" height="540">
<defs>
<linearGradient transform="matrix(1 0 0 1 0 0)" id="1" x1="129.0335" y1="369.4716" x2="129.0335369.4716" y2="129.0335323.0472">
<stop stop-color="#7e92a2" offset="0%"/>
<stop stop-color="#ffffff" offset="100%"/>
</linearGradient>
</defs>
<g transform="matrix(1.333333 0 0 1.333333 0 0)">
<path stroke="none" fill="#e5f3fe" fill-rule="evenodd" d="M0 0L720 0L720 405L0 405z" transform="matrix(1 0 0 1 0 0)" />
<path stroke="url(#1)" fill="none" d="M129.0335 207.948C 129.0335 118.741 201.3501 46.42441 290.5571 46.42441C 379.7641 46.42441 452.0807 118.741 452.0807 207.948C 452.0807 297.155 379.7641 369.4716 290.5571 369.4716C 201.3501 369.4716 129.0335 297.155 129.0335 207.948z" transform="matrix(0.8746197 -0.4848096 0.4848096 0.8746197 -64.38507 166.9374)" />
</g>
</svg>
注意到第五行中的x2,y2值有两个小数点
我认为应该是把字符串之间拼接在了x1,y1后面,也许是在进行加法计算时,错误的使用了字符串类型,这导致我不得不使用很长的一段代码来使得数据不出错