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

RE: [svg-developers] Re: Issues in rendering SVG files with multiple SVG tags

Expand Messages
  • Naveen Kumar T N
    Hi Jeff, Thank you very much for your input. We got the required idea from your mail. Thanks and regards, Naveen ________________________________ From:
    Message 1 of 3 , Sep 10, 2009
    • 0 Attachment
      Hi Jeff,

      Thank you very much for your input. We got the required idea from your mail.

      Thanks and regards,
      Naveen



      ________________________________
      From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com] On Behalf Of jeff_schiller
      Sent: Wednesday, September 09, 2009 6:23 PM
      To: svg-developers@yahoogroups.com
      Subject: [svg-developers] Re: Issues in rendering SVG files with multiple SVG tags



      Each SVG can define its size in relation to its outer container as well as its own coordinate system for the elements inside it.

      So here's how I understand things:

      - the outer SVG defines the physical size of the image (unless the outer SVG itself is embedded in another context, like an <object> elemnet), so the image will be 8.5" x 11"
      - the outer SVG defines a coordinate system of 0,0 to 612,792. This means that at point 612,792 in the outer SVG you will be in the lower right corner (at 8.5" in the x-direction and 11" in the y direction)

      - the inner SVG states that it takes up 200 units in the x direction and 900 units in the y direction. This means that the inner SVG only takes up about a third of the outer SVG's width (whose total coordinate system extends to 612 units in the x direction) and is actually longer than the outer SVG (900 is bigger than the total outer SVG y-coordinate which goes up to 792 units)
      - the inner SVG defines its own coordinate system which is 524.29 wide and 313.79 wide

      Hope that helps,
      Jeff

      --- In svg-developers@yahoogroups.com<mailto:svg-developers%40yahoogroups.com>, Naveen Kumar T N <naveenkumar_n02@...> wrote:
      >
      > Hi,
      >
      > I have SVG file where a <svg> tag is embedded inside the outer <svg> tag (please refer below svg data for better understanding). I want to know the logic or algorithm which a svg viewer use to display the file. .i.e what is the relation between the outer and the inner <svg> tags? Do we need to consider the value of the outer <svg> data(height, width, etc), while rendering the elements present in the inner <svg> element?
      >
      > Attributes of the outer svg element are: width="8.5in" height="11in" viewBox="0 0 612 792"
      > Attributes of the inner svg element are: height="900", width="200" x="0" y="0 and viewBox="0 0 524.29 313.79".
      >
      > Please help me in this regards
      >
      > Thanks and regards
      > Naveen
      >
      > Sample file with SVG embedded in SVG tag which I want to render:
      >
      > <svg xmlns="http://www.w3.org/2000/svg" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="8.5in"
      > height="11in" viewBox="0 0 612 792" xml:space="preserve" color-interpolation-filters="sRGB" class="st2">
      > <v:documentProperties v:langID="1033" v:viewMarkup="false"/>
      >
      > <style type="text/css">
      > <![CDATA[
      > .st1 {stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72}
      > .st2 {fill:none;fill-rule:evenodd;font-size:12;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}
      > ]]>
      > </style>
      >
      > <g v:mID="0" v:index="1" v:groupContext="foregroundPage">
      > <title>Page-1</title>
      > <v:pageProperties v:drawingScale="1" v:pageScale="1" v:drawingUnits="19" v:shadowOffsetX="9" v:shadowOffsetY="-9"/>
      >
      >
      > <svg viewBox="0 0 524.29 313.79" enable-background="new" color-interpolation-filters="sRGB"
      > height="900" width="200" x="0" y="0">
      >
      > <g stroke-width=".72" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" fill="none">
      > <rect x="0" y="0" width="1044" height="1044" class="st1"/>
      > </g>
      >
      > </svg>
      > </g>
      > </svg>
      >
      >
      > [Non-text portions of this message have been removed]
      >



      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.