html - Scaling SVG produced with inkscape -


i trying resize this svg file produced using inkscape

i have tried using viewbox="0 0 h w" attribute within <svg/> crops image instead of resizing. in anticipation

inkscape doesn't add viewbox attribute files produces. attribute needed scaling work.

the solution convert width , height values viewbox , alter width , height.

so add following root <svg> tag:

viewbox="0 0 205 69" 

then change width/height. if want double size, do:

width="410" height="138" 

or if want fill page or it's parent container do:

width="100%" height="100%" 

<!-- created inkscape (http://www.inkscape.org/) -->    <svg     xmlns:dc="http://purl.org/dc/elements/1.1/"     xmlns:cc="http://creativecommons.org/ns#"     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"     xmlns:svg="http://www.w3.org/2000/svg"     xmlns="http://www.w3.org/2000/svg"     xmlns:sodipodi="http://sodipodi.sourceforge.net/dtd/sodipodi-0.dtd"     xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"     viewbox="0 0 205 69"     width="100%"     height="100%"     id="svg2985"     version="1.1"     inkscape:version="0.48.4 r9939"     sodipodi:docname="official.svg">    <sodipodi:namedview       id="base"       pagecolor="#ffffff"       bordercolor="#666666"       borderopacity="1.0"       inkscape:pageopacity="0.0"       inkscape:pageshadow="2"       inkscape:zoom="1.88"       inkscape:cx="268.4359"       inkscape:cy="163.44054"       inkscape:current-layer="layer1"       inkscape:document-units="px"       showgrid="false"       inkscape:window-width="1301"       inkscape:window-height="744"       inkscape:window-x="65"       inkscape:window-y="24"       inkscape:window-maximized="1">      <sodipodi:guide         id="guide3594"         position="0,370.82039325"         orientation="0,800.0" />      <sodipodi:guide         id="guide3596"         position="0,229.17960675"         orientation="0,800.0" />      <sodipodi:guide         id="guide3598"         position="494.427191,0"         orientation="600.0,0" />      <sodipodi:guide         id="guide3600"         position="305.572809,0"         orientation="600.0,0" />      <sodipodi:guide         id="guide3602"         position="0,600.0"         orientation="0,800.0" />      <sodipodi:guide         id="guide3604"         position="600.0,0"         orientation="0,800.0" />      <sodipodi:guide         id="guide3606"         position="0,800.0"         orientation="600.0,0" />      <sodipodi:guide         id="guide3608"         position="800.0,0"         orientation="600.0,0" />    </sodipodi:namedview>    <defs       id="defs2987" />    <metadata       id="metadata2990">      <rdf:rdf>        <cc:work           rdf:about="">          <dc:format>image/svg+xml</dc:format>          <dc:type             rdf:resource="http://purl.org/dc/dcmitype/stillimage" />          <dc:title></dc:title>        </cc:work>      </rdf:rdf>    </metadata>    <g       id="layer1"       inkscape:label="layer 1"       inkscape:groupmode="layer"       transform="translate(0,-531)">      <path         sodipodi:type="star"         style="fill:#008080;fill-opacity:1;fill-rule:evenodd;stroke:#008080;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.03921569"         id="path3003"         sodipodi:sides="3"         sodipodi:cx="208.33333"         sodipodi:cy="448.33334"         sodipodi:r1="329.16138"         sodipodi:r2="164.5807"         sodipodi:arg1="0.57255439"         sodipodi:arg2="1.6197519"         inkscape:flatsided="true"         inkscape:rounded="0.15947024"         inkscape:randomized="0"         d="m 484.99998,626.66667 c 435.74244,703.08492 -42.889814,679.63445 -84.441188,598.76703 -125.99256,517.89962 133.63227,115.11717 224.44119,119.56633 c 90.80892,4.44916 309.81634,430.68209 260.55879,507.10034 z"         inkscape:transform-center-x="-8.8816078"         inkscape:transform-center-y="-0.012778438"         transform="matrix(0.00520436,0.0991022,-0.10795132,0.00477775,212.00937,543.99054)" />      <path         sodipodi:type="star"         style="fill:#241f1c;fill-opacity:0.33333333;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.03921569"         id="path3003-6"         sodipodi:sides="3"         sodipodi:cx="208.33333"         sodipodi:cy="448.33334"         sodipodi:r1="329.16138"         sodipodi:r2="164.5807"         sodipodi:arg1="0.57255439"         sodipodi:arg2="1.6197519"         inkscape:flatsided="true"         inkscape:rounded="0.15947024"         inkscape:randomized="0"         d="m 484.99998,626.66667 c 435.74244,703.08492 -42.889814,679.63445 -84.441188,598.76703 -125.99256,517.89962 133.63227,115.11717 224.44119,119.56633 c 90.80892,4.44916 309.81634,430.68209 260.55879,507.10034 z"         inkscape:transform-center-x="-8.8816118"         inkscape:transform-center-y="-0.012779205"         transform="matrix(0.00520436,0.0991022,-0.10795132,0.00477775,213.12005,546.20636)" />      <text         xml:space="preserve"         style="font-size:16.25434494px;font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#576a6c;fill-opacity:1;stroke:none;font-family:century schoolbook l;-inkscape-font-specification:century schoolbook l medium"         x="2.427422"         y="563.2641"         id="text3791"         sodipodi:linespacing="125%"><tspan           sodipodi:role="line"           id="tspan3793"           x="2.427422"           y="563.2641"           style="font-size:36.57227707px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;word-spacing:0px;fill:#576a6c;fill-opacity:1;font-family:ubuntu;-inkscape-font-specification:ubuntu">akogun</tspan></text>      <text         xml:space="preserve"         style="font-size:16.25434494px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:sans"         x="186.45212"         y="409.6254"         id="text5280"         sodipodi:linespacing="125%"><tspan           sodipodi:role="line"           id="tspan5282"           x="186.45212"           y="409.6254" /></text>      <text         xml:space="preserve"         style="font-size:16.25434494px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#008080;fill-opacity:0.50196078;stroke:none;font-family:sans"         x="49.39143"         y="567.16937"         id="text5284"         sodipodi:linespacing="125%"><tspan           sodipodi:role="line"           id="tspan5286"           x="49.39143"           y="567.16937" /><tspan           sodipodi:role="line"           id="tspan5288"           x="49.39143"           y="584.67633"           style="font-size:13.20665646px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#008080;fill-opacity:0.50196078;font-family:ubuntu;-inkscape-font-specification:ubuntu">p o l y m t h</tspan></text>      <path         sodipodi:type="star"         style="fill:#241f1c;fill-opacity:0.33333333;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.03921569"         id="path3003-6-5"         sodipodi:sides="3"         sodipodi:cx="208.33333"         sodipodi:cy="448.33334"         sodipodi:r1="329.16138"         sodipodi:r2="164.5807"         sodipodi:arg1="0.57255439"         sodipodi:arg2="1.6197519"         inkscape:flatsided="true"         inkscape:rounded="0.15947024"         inkscape:randomized="0"         d="m 484.99998,626.66667 c 435.74244,703.08492 -42.889814,679.63445 -84.441188,598.76703 -125.99256,517.89962 133.63227,115.11717 224.44119,119.56633 c 90.80892,4.44916 309.81634,430.68209 260.55879,507.10034 z"         inkscape:transform-center-x="-8.8816136"         inkscape:transform-center-y="-0.012761026"         transform="matrix(0.00520436,0.0991022,-0.10795132,0.00477775,214.3031,538.55495)" />      <flowroot         xml:space="preserve"         id="flowroot3053"         style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:sans"         transform="matrix(0.40635864,0,0,0.40635864,0.801987,362.21684)"><flowregion           id="flowregion3055"><rect             id="rect3057"             width="598"             height="182"             x="102"             y="144" /></flowregion><flowpara           id="flowpara3059" /></flowroot>    <flowroot         style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:sans"         id="flowroot3296"         xml:space="preserve"         transform="matrix(0.40635864,0,0,0.40635864,0.801987,362.21684)"><flowregion           id="flowregion3298"><rect             y="164"             x="30"             height="218"             width="502"             id="rect3300" /></flowregion><flowpara           id="flowpara3302" /></flowroot>  </g>  </svg>


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -