Hi, your svg flile has no problem both by my firefox3 on linux(centos)
and firefox3 on windows 2003 ;

Abd I find no error but some style warnings ; and also I can zoom in or
out on the svg !

So maybe u could check your mouse ? :-)






[EMAIL PROTECTED] 写道:
> hi~
> i'm first use the Batik.
> It's java code from apache-batik.
> packageacom;
> importjava.awt.Rectangle;
> importjava.awt.Graphics2D;
> importjava.awt.Color;
> importjava.io.Writer;
> importjava.io.OutputStreamWriter;
> importjava.io.IOException;
> importorg.apache.batik.svggen.SVGGraphics2D;
> importorg.apache.batik.dom.GenericDOMImplementation;
> importorg.w3c.dom.Document;
> importorg.w3c.dom.DOMImplementation;
> publicclassTestSVGGen{
> publicvoidpaint(Graphics2Dg2d){
> g2d.setPaint(Color.red);
> g2d.fill(newRectangle(10,10,100,100));
> g2d.setPaint(Color.black);
> g2d.fill(newRectangle(10,10,80,10));
> }
> publicstaticvoidmain(String[]args)throwsIOException{
> //GetaDOMImplementation.
> DOMImplementationdomImpl=
> GenericDOMImplementation.getDOMImplementation();
> //Createaninstanceoforg.w3c.dom.Document.
> StringsvgNS="http://www.w3.org/2000/svg";;
> Documentdocument=domImpl.createDocument(svgNS,"svg",null);
> //CreateaninstanceoftheSVGGenerator.
> SVGGraphics2DsvgGenerator=newSVGGraphics2D(document);
> //AskthetesttorenderintotheSVGGraphics2Dimplementation.
> TestSVGGentest=newTestSVGGen();
> test.paint(svgGenerator);
> //Finally,streamoutSVGtothestandardoutputusing
> //UTF-8encoding.
> booleanuseCSS=true;//wewanttouseCSSstyleattributes
> Writerout=newOutputStreamWriter(System.out,"UTF-8");
> svgGenerator.stream(out,useCSS);
> }
> }
> the svg file
> <?xmlversion="1.0"encoding="UTF-8"?>
> <!DOCTYPEsvgPUBLIC'-//W3C//DTDSVG1.0//EN'
> 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
> <svgxmlns:xlink="http://www.w3.org/1999/xlink"style="fill-opacity:1;color-rendering:auto;color-interpolation:auto;stroke:black;text-rendering:auto;stroke-linecap:square;stroke-miterlimit:10;stroke-opacity:1;shape-rendering:auto;fill:black;stroke-dasharray:none;font-weight:normal;stroke-width:1;font-family:&apos;Dialog&apos;;font-style:normal;stroke-linejoin:miter;font-size:12;stroke-dashoffset:0;image-rendering:auto;"xmlns="http://www.w3.org/2000/svg";
> ><!--GeneratedbytheBatikGraphics2DSVGGenerator--><defsid="genericDefs"
> /><g
> ><gstyle="fill:red;stroke:red;"
> ><rectx="10"width="100"height="100"y="10"style="stroke:none;"
> /><rectx="10"y="10"width="80"style="fill:black;stroke:none;"height="10"
> /></g
> ></g
> ></svg
> >
> The svg file can not be *shrinked *on FireFox3.0.
> why?
> ------------------------------------------------------------------------
> 2008-09-12

Reply via email to