Example usage for org.jfree.graphics2d.svg SVGGraphics2D setRenderingHint

List of usage examples for org.jfree.graphics2d.svg SVGGraphics2D setRenderingHint

Introduction

In this page you can find the example usage for org.jfree.graphics2d.svg SVGGraphics2D setRenderingHint.

Prototype

@Override
public void setRenderingHint(RenderingHints.Key hintKey, Object hintValue) 

Source Link

Document

Sets the value for a hint.

Usage

From source file:org.jfree.graphics2d.demo.SVGPieChartDemo1.java

/**
 * Starting point for the demo./*from w ww. j a v a 2  s. c o  m*/
 * 
 * @param args  ignored.
 * 
 * @throws IOException 
 */
public static void main(String[] args) throws IOException {
    JFreeChart chart = createChart(createDataset());
    SVGGraphics2D g2 = new SVGGraphics2D(600, 400);
    g2.setRenderingHint(JFreeChart.KEY_SUPPRESS_SHADOW_GENERATION, true);
    Rectangle r = new Rectangle(0, 0, 600, 400);
    chart.draw(g2, r);
    File f = new File("SVGPieChartDemo1.svg");
    SVGUtils.writeToSVG(f, g2.getSVGElement());
}

From source file:org.jfree.graphics2d.demo.SVGTimeSeriesChartDemo1.java

/**
 * Starting point for the demo./*  w  ww.  ja  v a  2s  .c o  m*/
 * 
 * @param args  ignored.
 * 
 * @throws IOException 
 */
public static void main(String[] args) throws IOException {
    JFreeChart chart = createChart(createDataset());
    SVGGraphics2D g2 = new SVGGraphics2D(600, 400);
    g2.setRenderingHint(JFreeChart.KEY_SUPPRESS_SHADOW_GENERATION, true);
    Rectangle r = new Rectangle(0, 0, 600, 400);
    chart.draw(g2, r);
    File f = new File("SVGTimeSeriesChartDemo1.svg");
    SVGUtils.writeToSVG(f, g2.getSVGElement());
}