Module org.jfree.chart3d
Package org.jfree.chart3d.export

# Class ExportUtils

java.lang.Object
org.jfree.chart3d.export.ExportUtils

public class ExportUtils extends Object
Export utility methods.

Since:
  1.4

## Constructor Summary

Constructors
Constructor
Description
`ExportUtils()`

## Method Summary

Modifier and Type
Method
Description
`static RenderingInfo`
`writeAsJPEG(Drawable3D drawable, int w, int h, File file)`
Writes the current content to the specified file in JPEG format.
`static RenderingInfo`
`writeAsPDF(Drawable3D drawable, int w, int h, File file)`
Writes a `Drawable3D` to the specified file in PDF format.
`static RenderingInfo`
`writeAsPNG(Drawable3D drawable, int w, int h, File file)`
Writes the current content to the specified file in PNG format.
`static RenderingInfo`
`writeAsSVG(Drawable3D drawable, int w, int h, File file)`
Writes the current content to the specified file in SVG format.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ExportUtils

public ExportUtils()

## Method Details

### writeAsSVG

public static RenderingInfo writeAsSVG(Drawable3D drawable, int w, int h, File file)
Writes the current content to the specified file in SVG format. This will only work when the JFreeSVG library is found on the classpath. Reflection is used to ensure there is no compile-time dependency on JFreeSVG. Any exceptions that occur while writing the file are caught and wrapped in a `RuntimeException` that is then thrown.

Parameters:
  `drawable` - the drawable (`null` not permitted).
  `w` - the chart width.
  `h` - the chart height.
  `file` - the output file (`null` not permitted).
Returns:
  The rendering info.

### writeAsPDF

public static RenderingInfo writeAsPDF(Drawable3D drawable, int w, int h, File file)
Writes a `Drawable3D` to the specified file in PDF format. This will only work when the OrsonPDF library is found on the classpath. Reflection is used to ensure there is no compile-time dependency on OrsonPDF. Any exceptions that occur while writing the file are caught and wrapped in a `RuntimeException` that is then thrown.

Parameters:
  `drawable` - the drawable ({code null} not permitted).
  `w` - the chart width.
  `h` - the chart height.
  `file` - the output file ({code null} not permitted).
Returns:
  The rendering info.

### writeAsPNG

public static RenderingInfo writeAsPNG(Drawable3D drawable, int w, int h, File file) throws FileNotFoundException, IOException
Writes the current content to the specified file in PNG format.

Parameters:
  `drawable` - the drawable (`null` not permitted).
  `w` - the chart width.
  `h` - the chart height.
  `file` - the output file (`null` not permitted).
Returns:
  The rendering info.
Throws:
  `FileNotFoundException` - if the file is not found.
  `IOException` - if there is an I/O problem.

### writeAsJPEG

public static RenderingInfo writeAsJPEG(Drawable3D drawable, int w, int h, File file) throws FileNotFoundException, IOException
Writes the current content to the specified file in JPEG format.

Parameters:
  `drawable` - the drawable (`null` not permitted).
  `w` - the chart width.
  `h` - the chart height.
  `file` - the output file (`null` not permitted).
Returns:
  The rendering info.
Throws:
  `FileNotFoundException` - if the file is not found.
  `IOException` - if there is an I/O problem.