A question on SVG

D

Dung Ping

I didn't find a group for svg, so post my question to this forum.
Following code will present two circles, a small one in a big one. Both
circle are in solid line:

<?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 width="400" height="400" version="1.1"
xmlns="http://www.w3.org/2000/svg">

<circle cx="100" cy="100" r="80" stroke="black" stroke-width="2"
fill='white'/>

<circle cx="100" cy="100" r="40" stroke="black" stroke-width="2"
fill='white'/>
</svg>

But I like to draw the outer circle with broken line. Please teach.

Thanks.
Dung Ping
 
H

hilz

Dung said:
I didn't find a group for svg, so post my question to this forum.
Following code will present two circles, a small one in a big one. Both
circle are in solid line:


I don't know the answer, but you can try the news group
"gmane.comp.web.svg" on the news server ""news.gmane.org"


the first time you post a message, you will receive an email at the
email address that you provide when you setup the news reader. once you
answer that email back, you can start posting on that group.

HTH
 
M

Martin Honnen

Dung Ping wrote:

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<circle cx="100" cy="100" r="40" stroke="black" stroke-width="2"
fill='white'/>
</svg>

But I like to draw the outer circle with broken line.

Well SVG 1.1 is a W3C recommendation and as that publically available
and documented, so looking into <http://www.w3.org/TR/SVG/> could help.
There you will find
<http://www.w3.org/TR/SVG/painting.html#StrokeProperties>
so you could use stroke-dasharray e.g.

<circle
cx="50" cy="50" r="30"
stroke="green" stroke-width="1" stroke-dasharray="5,1"
fill="yellow" />
 
D

Dung Ping

Martin said:
Dung Ping wrote:




Well SVG 1.1 is a W3C recommendation and as that publically available
and documented, so looking into <http://www.w3.org/TR/SVG/> could help.
There you will find
<http://www.w3.org/TR/SVG/painting.html#StrokeProperties>
so you could use stroke-dasharray e.g.

<circle
cx="50" cy="50" r="30"
stroke="green" stroke-width="1" stroke-dasharray="5,1"
fill="yellow" />

--

Thank all for information. I've tested above code. It works well.
Thanks a lot.

Dung Ping
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top