You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "Shapira, Yoav" <Yo...@mpi.com> on 2004/08/10 17:09:55 UTC

Can't view this SVG file in squiggle

Hi,
I have the SVG file below (generated by CDK [cdk.sf.net] using Batik),
which seems well-formed to me.  But nothing displays on the screen when
I try to view it with Squiggle, even though I can look at the DOM in
Squiggle so I know the file is loaded.  Any suggestions you can offer
would be welcome.  Thanks ;)

Yoav Shapira

<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1;
color-rendering:auto; color-interpolation:auto; text-rendering:auto;
stroke:black; stroke-linecap:square; stroke-miterlimit:10;
shape-rendering:auto; stroke-opacity:1; fill:black;
stroke-dasharray:none; font-weight:normal; stroke-width:1;
font-family:&apos;sansserif&apos;; font-style:normal;
stroke-linejoin:miter; font-size:12; stroke-dashoffset:0;
image-rendering:auto;" xmlns="http://www.w3.org/2000/svg">
  <!--Generated by the Chemistry Development Kit (http://cdk.sf.net/)
with Batik SVG Generator-->
  <defs id="genericDefs" />
  <g>
    <g style="text-rendering:optimizeLegibility;">
      <polygon style="stroke:none;" points=" 299 1001 301 1001 301 1000
299 1000" />
      <polygon style="stroke:none;" points=" 306 1001 308 1001 308 1000
306 1000" />
      <polygon style="stroke:none;" points=" 299 1001 301 1001 301 1001
299 1001" />
      <polygon style="stroke:none;" points=" 300 1000 300 1002 301 1002
301 1000" />
      <polygon style="stroke:none;" points=" 299 1000 301 1000 301 1000
299 1000" />
      <polygon style="stroke:none;" points=" 300 999 300 1001 301 1001
301 999" />
      <polygon style="stroke:none;" points=" 300 1000 300 1002 299 1002
299 1000" />
      <polygon style="stroke:none;" points=" 300 993 300 995 299 995 299
993" />
      <polygon style="stroke:none;" points=" 299 1001 301 1001 301 1002
299 1002" />
      <polygon style="stroke:none;" points=" 301 1000 301 1002 302 1002
302 1000" />
      <polygon style="stroke:none;" points=" 301 993 301 995 302 995 302
993" />
      <polygon style="stroke:none;" points=" 300 999 300 1001 299 1001
299 999" />
      <polygon style="stroke:none;" points=" 300 992 300 994 299 994 299
992" />
      <polygon style="stroke:none;" points=" 299 1000 301 1000 301 999
299 999" />
      <polygon style="stroke:none;" points=" 301 999 301 1001 302 1001
302 999" />
      <polygon style="stroke:none;" points=" 301 992 301 994 302 994 302
992" />
      <polygon style="stroke:none;" points=" 299 1000 299 1002 298 1002
298 1000" />
      <polygon style="stroke:none;" points=" 298 1001 300 1001 300 1000
298 1000" />
      <polygon style="stroke:none;" points=" 301 1001 303 1001 303 1000
301 1000" />
      <polygon style="stroke:none;" points=" 297 1001 299 1001 299 1002
297 1002" />
      <polygon style="stroke:none;" points=" 294 1001 296 1001 296 1001
294 1001" />
      <polygon style="stroke:none;" points=" 300 1001 302 1001 302 1001
300 1001" />
      <polygon style="stroke:none;" points=" 297 1002 299 1002 299 1002
297 1002" />
      <polygon style="stroke:none;" points=" 298 1001 298 1003 297 1003
297 1001" />
      <polygon style="stroke:none;" points=" 298 1008 298 1010 297 1010
297 1008" />
      <polygon style="stroke:none;" points=" 297 1002 299 1002 299 1003
297 1003" />
      <polygon style="stroke:none;" points=" 297 1001 297 1003 296 1003
296 1001" />
      <polygon style="stroke:none;" points=" 298 1002 298 1004 297 1004
297 1002" />
      <polygon style="stroke:none;" points=" 298 995 298 997 297 997 297
995" />
      <polygon style="stroke:none;" points=" 295 1002 297 1002 297 1003
295 1003" />
      <polygon style="stroke:none;" points=" 302 1002 304 1002 304 1003
302 1003" />
      <polygon style="stroke:none;" points=" 295 1002 297 1002 297 1002
295 1002" />
      <polygon style="stroke:none;" points=" 297 1002 297 1004 296 1004
296 1002" />
      <rect x="294" y="994" width="13" style="fill:white; stroke:none;"
height="16" />
      <text x="296" y="1008" style="fill:red; stroke:none;"
xml:space="preserve">O</text>
      <rect x="294" y="991" width="16" style="fill:white; stroke:none;"
height="16" />
      <text xml:space="preserve" x="296" y="1005"
style="stroke:none;">Cl</text>
      <rect x="292" y="994" width="13" style="fill:white; stroke:none;"
height="16" />
      <text x="294" y="1008" style="fill:blue; stroke:none;"
xml:space="preserve">N</text>
      <rect x="292" y="993" width="13" style="fill:white; stroke:none;"
height="16" />
      <text x="294" y="1007" style="fill:red; stroke:none;"
xml:space="preserve">O</text>
      <rect x="290" y="994" width="13" style="fill:white; stroke:none;"
height="16" />
      <text x="292" y="1008" style="fill:blue; stroke:none;"
xml:space="preserve">N</text>
    </g>
  </g>
</svg>

(Line breaks are generated by your email reader, I didn't add any)

Yoav Shapira
Millennium Research Informatics





This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Can't view this SVG file in squiggle

Posted by Thomas DeWeese <Th...@Kodak.com>.
Shapira, Yoav wrote:

> Hi,
> I have the SVG file below (generated by CDK [cdk.sf.net] using Batik),
> which seems well-formed to me.  But nothing displays on the screen when
> I try to view it with Squiggle, even though I can look at the DOM in
> Squiggle so I know the file is loaded.  Any suggestions you can offer
> would be welcome.  Thanks ;)

    The SVG appears to be pretty confused.  You have two major problems:

1) You don't have a viewBox attribute on the outermost SVG and where
    the drawing takes place is outside the default viewBox (0 0 400
    400) - I think you want something like '290 990 20 20' which is odd
    to say the least :)
2) Secondly you seem to be drawing everything in reverse order
    so in particular your rect element's cover up all the polygon
    drawings.  In fact your letters are in danger of doing the same
    thing.  I suspect that you have some coordinate system issues.



> 
> Yoav Shapira
> 
> <!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
> 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
> <svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1;
> color-rendering:auto; color-interpolation:auto; text-rendering:auto;
> stroke:black; stroke-linecap:square; stroke-miterlimit:10;
> shape-rendering:auto; stroke-opacity:1; fill:black;
> stroke-dasharray:none; font-weight:normal; stroke-width:1;
> font-family:&apos;sansserif&apos;; font-style:normal;
> stroke-linejoin:miter; font-size:12; stroke-dashoffset:0;
> image-rendering:auto;" xmlns="http://www.w3.org/2000/svg">
>   <!--Generated by the Chemistry Development Kit (http://cdk.sf.net/)
> with Batik SVG Generator-->
>   <defs id="genericDefs" />
>   <g>
>     <g style="text-rendering:optimizeLegibility;">
>       <polygon style="stroke:none;" points=" 299 1001 301 1001 301 1000
> 299 1000" />
>       <polygon style="stroke:none;" points=" 306 1001 308 1001 308 1000
> 306 1000" />
>       <polygon style="stroke:none;" points=" 299 1001 301 1001 301 1001
> 299 1001" />
>       <polygon style="stroke:none;" points=" 300 1000 300 1002 301 1002
> 301 1000" />
>       <polygon style="stroke:none;" points=" 299 1000 301 1000 301 1000
> 299 1000" />
>       <polygon style="stroke:none;" points=" 300 999 300 1001 301 1001
> 301 999" />
>       <polygon style="stroke:none;" points=" 300 1000 300 1002 299 1002
> 299 1000" />
>       <polygon style="stroke:none;" points=" 300 993 300 995 299 995 299
> 993" />
>       <polygon style="stroke:none;" points=" 299 1001 301 1001 301 1002
> 299 1002" />
>       <polygon style="stroke:none;" points=" 301 1000 301 1002 302 1002
> 302 1000" />
>       <polygon style="stroke:none;" points=" 301 993 301 995 302 995 302
> 993" />
>       <polygon style="stroke:none;" points=" 300 999 300 1001 299 1001
> 299 999" />
>       <polygon style="stroke:none;" points=" 300 992 300 994 299 994 299
> 992" />
>       <polygon style="stroke:none;" points=" 299 1000 301 1000 301 999
> 299 999" />
>       <polygon style="stroke:none;" points=" 301 999 301 1001 302 1001
> 302 999" />
>       <polygon style="stroke:none;" points=" 301 992 301 994 302 994 302
> 992" />
>       <polygon style="stroke:none;" points=" 299 1000 299 1002 298 1002
> 298 1000" />
>       <polygon style="stroke:none;" points=" 298 1001 300 1001 300 1000
> 298 1000" />
>       <polygon style="stroke:none;" points=" 301 1001 303 1001 303 1000
> 301 1000" />
>       <polygon style="stroke:none;" points=" 297 1001 299 1001 299 1002
> 297 1002" />
>       <polygon style="stroke:none;" points=" 294 1001 296 1001 296 1001
> 294 1001" />
>       <polygon style="stroke:none;" points=" 300 1001 302 1001 302 1001
> 300 1001" />
>       <polygon style="stroke:none;" points=" 297 1002 299 1002 299 1002
> 297 1002" />
>       <polygon style="stroke:none;" points=" 298 1001 298 1003 297 1003
> 297 1001" />
>       <polygon style="stroke:none;" points=" 298 1008 298 1010 297 1010
> 297 1008" />
>       <polygon style="stroke:none;" points=" 297 1002 299 1002 299 1003
> 297 1003" />
>       <polygon style="stroke:none;" points=" 297 1001 297 1003 296 1003
> 296 1001" />
>       <polygon style="stroke:none;" points=" 298 1002 298 1004 297 1004
> 297 1002" />
>       <polygon style="stroke:none;" points=" 298 995 298 997 297 997 297
> 995" />
>       <polygon style="stroke:none;" points=" 295 1002 297 1002 297 1003
> 295 1003" />
>       <polygon style="stroke:none;" points=" 302 1002 304 1002 304 1003
> 302 1003" />
>       <polygon style="stroke:none;" points=" 295 1002 297 1002 297 1002
> 295 1002" />
>       <polygon style="stroke:none;" points=" 297 1002 297 1004 296 1004
> 296 1002" />
>       <rect x="294" y="994" width="13" style="fill:white; stroke:none;"
> height="16" />
>       <text x="296" y="1008" style="fill:red; stroke:none;"
> xml:space="preserve">O</text>
>       <rect x="294" y="991" width="16" style="fill:white; stroke:none;"
> height="16" />
>       <text xml:space="preserve" x="296" y="1005"
> style="stroke:none;">Cl</text>
>       <rect x="292" y="994" width="13" style="fill:white; stroke:none;"
> height="16" />
>       <text x="294" y="1008" style="fill:blue; stroke:none;"
> xml:space="preserve">N</text>
>       <rect x="292" y="993" width="13" style="fill:white; stroke:none;"
> height="16" />
>       <text x="294" y="1007" style="fill:red; stroke:none;"
> xml:space="preserve">O</text>
>       <rect x="290" y="994" width="13" style="fill:white; stroke:none;"
> height="16" />
>       <text x="292" y="1008" style="fill:blue; stroke:none;"
> xml:space="preserve">N</text>
>     </g>
>   </g>
> </svg>
> 
> (Line breaks are generated by your email reader, I didn't add any)
> 
> Yoav Shapira
> Millennium Research Informatics
> 
> 
> 
> 
> 
> This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org