Bug? Fail of circle import

Post questions on how to use or achieve an effect in Inkscape.
chrisjj
Posts: 153
Joined: Thu Jan 17, 2013 10:45 am

Bug? Fail of circle import

Postby chrisjj » Sun Mar 10, 2013 1:10 am

Import of a file containing just one circle:

Code: Select all

<?xml version='1.0' standalone='no'?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg>
<circle cx=7.8125 cy=6.25 r=3.125 fill='black'/>
 </svg>


fails with:

Image

Any idea why? No answer found by Google search, inc. of Lanchpad.

Thanks.

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Bug? Fail of circle import

Postby ragstian » Sun Mar 10, 2013 1:42 am

Hi.

Yes - got an idéa why;

Corrected file:

Code: Select all

<?xml version='1.0' standalone='no'?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg>
<circle cx="7.8125" cy="6.25" r="3.125" fill="black"/>
 </svg>

A lot of nice reading here; http://www.w3.org/TR/SVG/

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

chrisjj
Posts: 153
Joined: Thu Jan 17, 2013 10:45 am

Re: Bug? Fail of circle import

Postby chrisjj » Sun Mar 10, 2013 2:08 am

ragstian wrote:Hi.
Corrected file:

Thanks! Starting from that, I find the only correction needed is single quotes around the numbers:

Code: Select all

<circle cx='7.8125' cy='6.25' r='3.125' fill='black'/>


I wonder why Inskscape requires what the other SVG readers I tried (Firefox, Chrome) do not.

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Bug? Fail of circle import

Postby ragstian » Sun Mar 10, 2013 4:01 am

Hi chrisjj

chrisjj wrote;
Thanks! Starting from that, I find the only correction needed is single quotes around the numbers:

Strange - it opens fine on my system (in Inkscape) with double quotes.
Inkscape itself saves with double quotes. Like this;

Code: Select all

id="path810"
       sodipodi:cx="241.4285736"
       sodipodi:cy="465.2193298"
       sodipodi:rx="58.57143021"
       sodipodi:ry="58.57143021"

The SVG Specification document also uses double quotes in all examples.

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

chrisjj
Posts: 153
Joined: Thu Jan 17, 2013 10:45 am

Re: Bug? Fail of circle import

Postby chrisjj » Wed Mar 20, 2013 4:23 am

Thanks. I should probably use double quotes for certainty.


Return to “Help with using Inkscape”