Loading ...
Sorry, an error occurred while loading the content.

not working

Expand Messages
  • daniel_b_davis
    I am new to svg, but it had seemed quite clear upon reading the material. Yet I am unable to make the translate work. I have refined and simplified the failure
    Message 1 of 4 , Jun 9, 2014
    • 0 Attachment
      I am new to svg, but it had seemed quite clear upon reading the material. Yet I am unable to make the translate work. I have refined and simplified the failure into the the following html file generated from an.erb file: Instead of 4 lines offset from each other by 100, I get a single line, as each overwrites the other. What am I doing wrong? The browser is Firefox 29.0.1

      Thank you.

      <html>
      <head>
       <title>Translate Test</title>
      </head>
      <body>
        <h1>Translate</h1>
        <svg width="700" height="500" xmlns="http://www.w3.org/2000/svg" version="1.2">

             <g transform="translate(0,0)"/>
             <line x1="10" y1="80" x2="80" y2="10" style="stroke:black;stroke-width:2"/>
             </g>

             <g transform="translate(100,0)"/>
             <line x1="10" y1="80" x2="80" y2="10" style="stroke:black;stroke-width:2"/>
             </g>

             <g transform="translate(200,0)"/>
             <line x1="10" y1="80" x2="80" y2="10" style="stroke:black;stroke-width:2"/>
             </g>

             <g transform="translate(300,0)"/>
             <line x1="10" y1="80" x2="80" y2="10" style="stroke:black;stroke-width:2"/>
             </g>

        </svg>
        <br>
      </body>
      </html>


    • G. Wade Johnson
      Hi Daniel, Your issue is a simple one and relatively hard to see if you re not careful. On 09 Jun 2014 19:02:59 -0700 daniel_b_davis@yahoo.com
      Message 2 of 4 , Jun 24, 2014
      • 0 Attachment
        Hi Daniel,

        Your issue is a simple one and relatively hard to see if you're not
        careful.

        On 09 Jun 2014 19:02:59 -0700
        "daniel_b_davis@... [svg-developers]"
        <svg-developers@yahoogroups.com> wrote:

        > I am new to svg, but it had seemed quite clear upon reading the
        > material. Yet I am unable to make the translate work. I have refined
        > and simplified the failure into the the following html file generated
        > from an.erb file: Instead of 4 lines offset from each other by 100, I
        > get a single line, as each overwrites the other. What am I doing
        > wrong? The browser is Firefox 29.0.1
        >
        > Thank you.
        >
        > <html>
        > <head>
        > <title>Translate Test</title>
        > </head>
        > <body>
        > <h1>Translate</h1>
        > <svg width="700" height="500" xmlns="http://www.w3.org/2000/svg"
        > version="1.2">
        >
        > <g transform="translate(0,0)"/>

        This is an empty group thanks to the ^ slash at the end.

        > <line x1="10" y1="80" x2="80" y2="10"
        > style="stroke:black;stroke-width:2"/> </g>
        >
        > <g transform="translate(100,0)"/>

        This is an empty group thanks to the ^ slash at the end.
        The translate does not apply to the line below, because it's not in the
        group.

        > <line x1="10" y1="80" x2="80" y2="10"
        > style="stroke:black;stroke-width:2"/> </g>
        >
        > <g transform="translate(200,0)"/>
        > <line x1="10" y1="80" x2="80" y2="10"
        > style="stroke:black;stroke-width:2"/> </g>
        >
        > <g transform="translate(300,0)"/>
        > <line x1="10" y1="80" x2="80" y2="10"
        > style="stroke:black;stroke-width:2"/> </g>
        >
        > </svg>
        > <br>
        > </body>
        > </html>

        When I tried loading just the SVG in Chrome, it reported the first
        trailing, unmatched '</g>' as an error. The problem was clear from
        there.

        Happy SVGing,
        G. Wade
        --
        "No Boom today. Boom tomorrow, There's always a boom tomorrow."
        -- Ivanova, "Grail"
      • G. Wade Johnson
        On Tue, 24 Jun 2014 07:25:43 -0500 G. Wade Johnson gwadej@anomaly.org [svg-developers] ... Wow. That could be read as a lot more judgmental than I meant it
        Message 3 of 4 , Jun 24, 2014
        • 0 Attachment
          On Tue, 24 Jun 2014 07:25:43 -0500
          "'G. Wade Johnson' gwadej@... [svg-developers]"
          <svg-developers@yahoogroups.com> wrote:

          > Hi Daniel,
          >
          > Your issue is a simple one and relatively hard to see if you're not
          > careful.

          Wow. That could be read as a lot more judgmental than I meant it to
          be.<sigh/>

          I meant that carefully reading can find these things, but it's easy to
          miss in any case.

          > On 09 Jun 2014 19:02:59 -0700
          > "daniel_b_davis@... [svg-developers]"
          > <svg-developers@yahoogroups.com> wrote:
          >
          > > I am new to svg, but it had seemed quite clear upon reading the
          > > material. Yet I am unable to make the translate work. I have refined
          > > and simplified the failure into the the following html file
          > > generated from an.erb file: Instead of 4 lines offset from each
          > > other by 100, I get a single line, as each overwrites the other.
          > > What am I doing wrong? The browser is Firefox 29.0.1
          > >
          > > Thank you.
          > >
          > > <html>
          > > <head>
          > > <title>Translate Test</title>
          > > </head>
          > > <body>
          > > <h1>Translate</h1>
          > > <svg width="700" height="500" xmlns="http://www.w3.org/2000/svg"
          > > version="1.2">
          > >
          > > <g transform="translate(0,0)"/>
          >
          > This is an empty group thanks to the ^ slash at the end.
          >
          > > <line x1="10" y1="80" x2="80" y2="10"
          > > style="stroke:black;stroke-width:2"/> </g>
          > >
          > > <g transform="translate(100,0)"/>
          >
          > This is an empty group thanks to the ^ slash at the end.
          > The translate does not apply to the line below, because it's not in
          > the group.
          >
          > > <line x1="10" y1="80" x2="80" y2="10"
          > > style="stroke:black;stroke-width:2"/> </g>
          > >
          > > <g transform="translate(200,0)"/>
          > > <line x1="10" y1="80" x2="80" y2="10"
          > > style="stroke:black;stroke-width:2"/> </g>
          > >
          > > <g transform="translate(300,0)"/>
          > > <line x1="10" y1="80" x2="80" y2="10"
          > > style="stroke:black;stroke-width:2"/> </g>
          > >
          > > </svg>
          > > <br>
          > > </body>
          > > </html>
          >
          > When I tried loading just the SVG in Chrome, it reported the first
          > trailing, unmatched '</g>' as an error. The problem was clear from
          > there.
          >
          > Happy SVGing,
          > G. Wade


          --
          It's better to make mistakes in electrons, than in granite.
          -- Bruce Beasley
        • Peter Thompson
          If you haven t solved this already, the group elements, as you ve written them, don t include the line elements. The following works:
          Message 4 of 4 , Jun 25, 2014
          • 0 Attachment
            If you haven't solved this already, the group elements, as you've written them, don't include the line elements. The following works:

            <html>
            <head>
             <title>Translate Test</title>
            </head>
            <body>
              <h1>Translate</h1>
              <svg width="700" height="500" xmlns="http://www.w3.org/2000/svg" version="1.2">

                   <g transform="translate(0,0)">
                   <line x1="10" y1="80" x2="80" y2="10" style="stroke:black;stroke-width:2"/>
                   </g>

                   <g transform="translate(100,0)">
                   <line x1="10" y1="80" x2="80" y2="10" style="stroke:black;stroke-width:2"/>
                   </g>

                   <g transform="translate(200,0)">
                   <line x1="10" y1="80" x2="80" y2="10" style="stroke:black;stroke-width:2"/>
                   </g>

                   <g transform="translate(300,0)">
                   <line x1="10" y1="80" x2="80" y2="10" style="stroke:black;stroke-width:2"/>
                   </g>

              </svg>
              <br>
            </body>
            </html>



            On Tuesday, June 24, 2014 7:01 AM, "daniel_b_davis@... [svg-developers]" <svg-developers@yahoogroups.com> wrote:


             
            I am new to svg, but it had seemed quite clear upon reading the material. Yet I am unable to make the translate work. I have refined and simplified the failure into the the following html file generated from an.erb file: Instead of 4 lines offset from each other by 100, I get a single line, as each overwrites the other. What am I doing wrong? The browser is Firefox 29.0.1

            Thank you.

            <html>
            <head>
             <title>Translate Test</title>
            </head>
            <body>
              <h1>Translate</h1>
              <svg width="700" height="500" xmlns="http://www.w3.org/2000/svg" version="1.2">

                   <g transform="translate(0,0)"/>
                   <line x1="10" y1="80" x2="80" y2="10" style="stroke:black;stroke-width:2"/>
                   </g>

                   <g transform="translate(100,0)"/>
                   <line x1="10" y1="80" x2="80" y2="10" style="stroke:black;stroke-width:2"/>
                   </g>

                   <g transform="translate(200,0)"/>
                   <line x1="10" y1="80" x2="80" y2="10" style="stroke:black;stroke-width:2"/>
                   </g>

                   <g transform="translate(300,0)"/>
                   <line x1="10" y1="80" x2="80" y2="10" style="stroke:black;stroke-width:2"/>
                   </g>

              </svg>
              <br>
            </body>
            </html>



          Your message has been successfully submitted and would be delivered to recipients shortly.