SVG_to_Flash:Adobe Illustrator 15.0.0与12.0.0,SVG导出插件,宽度/高度问题

时间:2011-06-20 23:19:15

标签: svg

我试图为自己解决这个问题,但我陷入困境。

概述:我有一个基于Flash的设计器应用程序,它对SVG上传的矢量源很挑剔。我有大约1000个SVG“模板”加载到基于Flash的设计器应用程序,然后人们可以在我的网站上构建产品。

问题:我不知道为什么这会导致我的工具中断,但是当我上传从Adobe Illustrator 15.0.0导出的SVG 1.0时,SVG Export Plug-In会导出svg width =“# ## px“height =”### px“标签不同,我的挑剔的应用程序将不会采取该文件。

具体来说,Illustrator 12.0.0似乎导出宽度 - “###”VS. 15.0.0添加'px',因此输出“### px”。 ### =好,XXXpx =坏(对于我的flash工具)

它不会导致错误(至少在我能看到的闪光部分)。 SVG不会出现在工具中。

我已尝试使用15.0.0插件的每个可能的SVG 1.0导出选项变体,没有运气使用它导出它。

test4_good.svg在我的工具中完美运行(width =“###”) test9_bad.svg打破了工具(width =“### px”)

我将粘贴SVG源:

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build        0)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
 width="463px" height="462px" viewBox="0 0 463 462" enable-background="new 0 0 463 462" xml:space="preserve">

                             

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
<svg  version="1.0" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
 width="463" height="462" viewBox="-0.96 0 463 462" enable-background="new -0.96 0 463 462" xml:space="preserve">
<defs>
</defs>
<path fill="#A59D9E" stroke="#000000" d="M452.375,231.13c0,122.212-99.053,221.285-221.239,221.285
c-122.186,0-221.238-99.073-221.238-221.285c0-122.213,99.052-221.285,221.238-221.285
C353.322,9.845,452.375,108.917,452.375,231.13z M231.136,69.65c-89.164,0-161.444,72.298-161.444,161.479
c0,89.181,72.281,161.476,161.444,161.476c89.165,0,161.442-72.295,161.442-161.476C392.578,141.949,320.301,69.65,231.136,69.65z"
/>
<path fill="#F8224E" stroke="#000000" d="M461.458,231c0,127.302-103.177,230.5-230.451,230.5
C103.731,461.5,0.556,358.302,0.556,231S103.731,0.5,231.007,0.5C358.281,0.5,461.458,103.698,461.458,231z M231.007,62.797
c-92.876,0-168.167,75.307-168.167,168.203c0,92.895,75.292,168.203,168.167,168.203c92.877,0,168.166-75.309,168.166-168.203
C399.173,138.104,323.884,62.797,231.007,62.797z"/>
<path fill="#A59D9E" stroke="#000000" d="M47.536,318.388l7.5-3.571c-7.012-14.581-12.256-30.17-15.477-46.486l27.477-0.037
c0,0-2.207-10.469-3.157-18.43c-0.918-7.684-0.993-18.184-0.998-18.906c0.004-0.722,0.08-11.223,0.998-18.906
c0.951-7.96,3.157-18.43,3.157-18.43l-27.724-0.038c3.115-16.366,8.27-32.007,15.196-46.648l-7.499-3.573
c-7.446,15.735-12.936,32.574-16.151,50.21l-27.274-0.037c0,0-1.297,6.575-2.335,20.073c-0.979,12.735-0.728,16.917-0.696,17.348
c-0.032,0.433-0.283,4.614,0.696,17.35c1.038,13.497,2.335,20.071,2.335,20.071l27.522-0.037
C34.43,285.927,40.002,302.717,47.536,318.388z"/>
<path fill="#A59D9E" stroke="#000000" d="M431.037,268.341l27.379,0.037c0,0,1.298-6.574,2.336-20.071
c0.979-12.735,0.729-16.917,0.696-17.35c0.032-0.432,0.283-4.613-0.696-17.348c-1.038-13.498-2.336-20.073-2.336-20.073
l-27.132,0.037c-3.214-17.636-8.705-34.475-16.15-50.209l-7.498,3.572c6.926,14.642,12.08,30.283,15.195,46.648l-27.867,0.038
c0,0,2.209,10.469,3.16,18.43c0.917,7.683,0.992,18.184,0.996,18.906c-0.004,0.723-0.079,11.223-0.996,18.906
c-0.951,7.961-3.16,18.43-3.16,18.43l27.619,0.037c-3.221,16.316-8.464,31.905-15.476,46.485l7.499,3.572
C422.14,302.717,427.713,285.927,431.037,268.341z"/>
<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#F8224E" stroke="#000000" points="16.377,230.592 31.8,206.367 
47.201,230.592 31.785,254.799 16.377,230.592 16.377,230.592 16.377,230.592 "/>
<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#F8224E" stroke="#000000" points="414.996,230.592 430.417,206.367 
445.817,230.592 430.403,254.799 414.996,230.592 414.996,230.592 414.996,230.592 "/>
</svg>

预先感谢Chase。

1 个答案:

答案 0 :(得分:2)

指定px单位和根本不指定单位之间没有功能差异。剥离“px”部分是安全的。