xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fayyad, Elias" <EFay...@iso.com>
Subject RE: How come my piechart is gray when using svg
Date Fri, 19 Aug 2005 18:00:15 GMT
Does it make any difference if one used
SVGDOMImplementation.getDOMImplementation(), as opposed to 
GenericDOMImplementation.getDOMImplementation()?

-----Original Message-----
From: Lila Tran [mailto:chinarosesz@gmail.com] 
Sent: Friday, August 19, 2005 10:22 AM
To: batik-users@xmlgraphics.apache.org
Subject: Re: How come my piechart is gray when using svg

Actually, I am using batik 1.6, just downloaded about three weeks ago.
 In the forum, I stated that I also tried batik 1.5, but that didn't
do any changes.  Do you have any other suggestions?  Below is the
method that I use to save the chart as svg file.

// saveChartToSVG(), source from online from JFreeChart forum
public void saveChartToSVG( JFreeChart chart, OutputStream outStream,
      int width, int height ) throws Exception
{
    if ( chart != null )
    {
      DOMImplementation domImpl =   =
GenericDOMImplementation.getDOMImplementation();
      Document document = domImpl.createDocument( null, "svg", null );
      SVGGraphics2D svgGenerator = new SVGGraphics2D( document );
      chart.draw( svgGenerator, new Rectangle2D.Double( 0, 0, width,
height ),
          null );
      boolean useCSS = true;
      Writer out = new OutputStreamWriter( outStream, "UTF-8" );
      svgGenerator.stream( out, useCSS );
    }
}

On 8/19/05, Thomas DeWeese <Thomas.DeWeese@kodak.com> wrote:
> Hi Lila,
> 
> Lila Tran wrote:
> > Thank you so much for replying.  Click the below link for the
output,
> > it will lead you to the jfreechart forum, someone there has the
exact
> > same problem as I did.   I posted a reply to that thread saying that
I
> > have the same problem.  but you can view the output at this link
> > http://www.jfree.org/phpBB2/viewtopic.php?p=40152#40152
> 
>    Ahh, the problem is not that your circle is grey.  The problem
> is that the blue circle is drawn malformed.  This is fixed in
> Batik 1.6 I suggest you upgrade.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
batik-users-help@xmlgraphics.apache.org
> 
>

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



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


Mime
View raw message