A question on SVG

Discussion in 'XML' started by Dung Ping, Oct 29, 2005.

  1. Dung Ping

    Dung Ping Guest

    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
     
    Dung Ping, Oct 29, 2005
    #1
    1. Advertising

  2. Dung Ping

    hilz Guest

    Dung Ping wrote:
    > 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
     
    hilz, Oct 29, 2005
    #2
    1. Advertising

  3. 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" />

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Oct 29, 2005
    #3
  4. Dung Ping

    Dung Ping Guest

    Martin Honnen wrote:
    > 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" />
    >
    > --


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

    Dung Ping

    >
    > Martin Honnen
    > http://JavaScript.FAQTs.com/
     
    Dung Ping, Oct 29, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arne Nordmann
    Replies:
    0
    Views:
    533
    Arne Nordmann
    Jun 28, 2004
  2. Mardagg
    Replies:
    0
    Views:
    810
    Mardagg
    May 12, 2006
  3. Mardagg
    Replies:
    0
    Views:
    669
    Mardagg
    May 12, 2006
  4. milof83

    svg to svg saving problem

    milof83, Aug 18, 2006, in forum: Java
    Replies:
    1
    Views:
    835
    Roland de Ruiter
    Aug 18, 2006
  5. Helmut Jarausch

    Re: svg-chart 1.1 SVG Charting Library

    Helmut Jarausch, May 20, 2008, in forum: Python
    Replies:
    0
    Views:
    475
    Helmut Jarausch
    May 20, 2008
Loading...

Share This Page