在SVG中更改矩阵的文本变换的坐标

时间:2016-11-03 09:45:37

标签: svg

我是SVG的新手。现在,我正在处理SVG中的文本。

如果矩阵的形式为(1 0 0 1 286.6445 563.3346),那么我假设x为286.6445,y为563.3346

我的问题是,有时矩阵以其他格式找到(0.8191 -0.5736 0.5735 0.8192 304.2636 584.46)就像那样

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     viewBox="0 0 595 842" enable-background="new 0 0 595 842" xml:space="preserve">

<text transform="matrix(1 0 0 1 127.3852 556.6279)" font-family="'HelveticaNeue-Roman'" font-size="7">shLUC </text>
<text transform="matrix(1 0 0 1 158.0637 556.791)"><tspan x="0" y="0" font-family="'HelveticaNeue-Roman'" font-size="7">shH2AX</tspan><tspan x="4.7" y="8.4" font-family="'HelveticaNeue-Roman'" font-size="7">no.1 </tspan></text>
<text transform="matrix(1 0 0 1 194.4885 556.791)"><tspan x="0" y="0" font-family="'HelveticaNeue-Roman'" font-size="7">shH2AX</tspan><tspan x="3.8" y="8.4" font-family="'HelveticaNeue-Roman'" font-size="7">no. 2 </tspan></text>
<text transform="matrix(1 0 0 1 151.938 492.3261)" font-family="'HelveticaNeue-Roman'" font-size="7">Senescence </text>
<text transform="matrix(1 0 0 1 93.7368 492.0358)" font-family="'HelveticaNeue-Bold'" font-size="8">f</text>
<text transform="matrix(1 0 0 1 227.0126 507.0358)" font-family="'HelveticaNeue-Bold'" font-size="8">g</text>
<text transform="matrix(0.8191 -0.5736 0.5735 0.8192 289.2609 582.4389)"><tspan x="0" y="0" font-family="'HelveticaNeue-Roman'" font-size="7">s</tspan><tspan x="3.5" y="0" font-family="'HelveticaNeue-Roman'" font-size="7">hLU</tspan><tspan x="16.3" y="0" font-family="'HelveticaNeue-Roman'" font-size="7">C</tspan></text>
<text transform="matrix(0.8191 -0.5736 0.5735 0.8192 304.2636 584.46)" font-family="'HelveticaNeue-Roman'" font-size="7">shH2AX</text>
<text transform="matrix(0.8191 -0.5736 0.5735 0.8192 307.2189 591.7231)" font-family="'HelveticaNeue-Roman'" font-size="7">shLUC + Cis</text>
<text transform="matrix(0.8191 -0.5736 0.5735 0.8192 323.3571 593.1634)" font-family="'HelveticaNeue-Roman'" font-size="7">shH2AX + Cis</text>
<text transform="matrix(1 0 0 1 286.6445 563.3346)" font-family="'HelveticaNeue-Roman'" font-size="7">0</text>
<text transform="matrix(1 0 0 1 282.7241 544.9635)" font-family="'HelveticaNeue-Roman'" font-size="7">20</text>
<text transform="matrix(1 0 0 1 282.7241 526.5885)" font-family="'HelveticaNeue-Roman'" font-size="7">40</text>
<text transform="matrix(1 0 0 1 282.7241 508.2213)" font-family="'HelveticaNeue-Roman'" font-size="7">60</text>
<text transform="matrix(1 0 0 1 282.7241 489.8473)" font-family="'HelveticaNeue-Roman'" font-size="7">80</text>
<text transform="matrix(1 0 0 1 311.1016 504.7193)" font-family="'Symbol'" font-size="7">*</text>
<text transform="matrix(1 0 0 1 347.4725 481.9498)" font-family="'Symbol'" font-size="7">*</text>
</svg>

我需要从相应的坐标中提取此SVG中的文本。几乎所有矩阵都以“1 0 0 1”开头,但有些则不同。

是否有任何逻辑/计算将(0.8191 -0.5736 0.5735 0.8192 304.2636 584.46)转换为此格式(1 0 0 1??)

0 个答案:

没有答案