双倍大小的SVG文件

时间:2014-01-05 21:28:52

标签: svg

我有带图标的SVG文件,它的大小是512 x 512,我需要将其更改为1024 x 1024.它具有以下内容:

<?xml version="1.0" ?><!DOCTYPE svg  PUBLIC '-//W3C//DTD SVG 1.1//EN'  'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 512 512" height="512px" id="Layer_1" version="1.1" viewBox="0 0 512 512" width="512px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"><g><path d="M400.219,208c10.219,31.75-4.031,96.969-43,112.328C415.406,195.969,290,16,176.008,16   c47.805,26.516,99.289,122.734,29.375,206.953C212.281,212.359,213.828,142,176.07,112C201.063,205.828,96,226.766,96,330.859   C96,413.234,170.672,480,262.766,480C383.094,480,486.313,332.672,400.219,208z" fill="#FC2929"/></g></svg>

1 个答案:

答案 0 :(得分:1)

<?xml version="1.0" ?>
<!DOCTYPE svg  PUBLIC '-//W3C//DTD SVG 1.1//EN'  'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg enable-background="new 0 0 1024 1024" height="1024px" id="Layer_1" version="1.1" viewBox="0 0 1024 1024" width="1024px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
<g transform="scale(2)">
    <path d="M400.219,208c10.219,31.75-4.031,96.969-43,112.328C415.406,195.969,290,16,176.008,16   c47.805,26.516,99.289,122.734,29.375,206.953C212.281,212.359,213.828,142,176.07,112C201.063,205.828,96,226.766,96,330.859   C96,413.234,170.672,480,262.766,480C383.094,480,486.313,332.672,400.219,208z" fill="#FC2929"/>
</g>
</svg>

在具有scale属性的组上使用transform属性并将512更改为1024。