Vector Graphics 2.1 Release Notes

Release Notes Version: $Revision: 10163 $.

The most recent version of this file is available at http://java.freehep.org/vectorgraphics/ReleaseNotes-2.1.html.

Release notes for all versions of the VectorGraphics package are available at http://java.freehep.org/vectorgraphics/ReleaseNotes.html.

The VectorGraphics package of FreeHEP Java Library enables any Java program to export to a variety of vector graphics formats as well as bitmap image formats. Among the vector formats are PostScript, PDF, EMF, SVF, and (Flash) SWF. The image formats include GIF, PNG, JPG, BMP, WBPM and PPM. All image formats included in the Java runtime, as well as any in the Java Advanced Imaging package (if installed) are also be available. A special JAVA export format will write a java file with all the calls your application makes to Graphics2D. This java file can help us debug any potential problems.

The formats CGM and LaTeX have not been released in version 2.1. They may be released at a later date/version.

The package uses the standard java.awt.Graphics2D class as its interface to the user program. Using this package from any Java GUI program is therefore quite easy. It also comes with a dialog box which allows you to choose between all the formats mentioned above and set specific parameters for them.

Major Changes

This version is binary compatible at the java.awt.Graphics2d level with version 2.0. However if you used classes/methods from the low-level format drivers or have used methods of the VectorGraphics class or its descendants you may have to adjust your code and recompile.

This version runs on Java 1.4.2 and up, but has only been tested mildly in Java 1.6.0.

Below the major changes in general and by format:

General

  • [FVG-169] - Better font handling for most drivers
  • [FVG-214] - Draw clip only if necessary
  • [FVG-252] - ALL: TestHTML white box is too small
  • [FVG-256] - Add option to ExportDialog to toggle TEXT_AS_SHAPE
  • [FVG-281] - Remove refs to LaTeX and CGM from doc.
  • [FVG-282] - Eclipse has problems with the POM files. Error about missing version.
  • [FVG-285] - Fontderivation seems to fail for JDK 1.6.0
  • [FVG-291] - FontTable was not normalizing italic.
  • [FVG-293] - Moved constants and image creation
  • [FVG-296] - Added RenderingHints, AttributedCharacterIterator
  • [FVG-302] - Fix for Font.getAttributes() in JDK 1.6
  • [FVG-304] - Make AbstractExtTextOut#getText() public
  • [FVG-310] - Add a way to export a component in a different size than its own
  • [FVG-312] - Compilation (Test) fails with mvn 2.0.6 and 2.0.7

Bitmaps

  • [FVG-228] - BitMaps, PNG, SWF, SVG: TestAll: Stars missing.
  • [FVG-243] - When using the bmp output option from the ExportDialog I get a stack trace from a 'java.lang.IllegalStateException: No compression type set!' exception

EMF

  • [FVG-69] - EMF: TestAll no sky
  • [FVG-97] - EMF: add superclass of Poly and PolyPoly
  • [FVG-98] - EMF: make superclass for BitMap classes
  • [FVG-233] - EMF: TestAll no stars
  • [FVG-277] - Rotated texts are broken when exporting to EMF format!
  • [FVG-283] - EMF seems to have the wrong type specified in the EMFHeader
  • [FVG-289] - EMF fonts are not replayed correctly
  • [FVG-294] - EMF: Renderer improvements
  • [FVG-295] - EMF: ExtCreateFontIndirectW with size of 368 not supported
  • [FVG-300] - Major improvements for EMFRenderer
  • [FVG-301] - EMFGraphics2D does not reset the clipping region
  • [FVG-305] - EOFException reading an EMF file with some kind of header padding.
  • [FVG-309] - setTransform does not work in AbstractVectorGraphicsIO (for PDF and EMF).

JAVA

  • [FVG-26] - JAVA: images are not embedded in file.
  • [FVG-280] - Re-enable JAVA module
  • [FVG-307] - AlphaComposite.getInstance should use float rather than double.
  • [FVG-308] - protect JAVAGeneralPath for null transform.

PDF

  • [FVG-73] - setClip in PDF and EPS
  • [FVG-251] - PDF, PS, SVG and SWF: TestFontDerivation is wrong
  • [FVG-276] - Add use of create() method to Restore Clipping in PS and PDF to FAQ.
  • [FVG-279] - PDF has unbalanced q/Q operators
  • [FVG-309] - setTransform does not work in AbstractVectorGraphicsIO (for PDF and EMF).

PS

  • [FVG-73] - setClip in PDF and EPS
  • [FVG-87] - PS, SVG: TestAll, TestPaint: TexturePaint is not implemented
  • [FVG-251] - PDF, PS, SVG and SWF: TestFontDerivation is wrong
  • [FVG-276] - Add use of create() method to Restore Clipping in PS and PDF to FAQ.
  • [FVG-278] - TexturePaint fills are broken when exporting to PS format.
  • [FVG-287] - Multiple images in PS
  • [FVG-288] - PS cannot handle custom page sizes

SVG

  • [FVG-87] - PS, SVG: TestAll, TestPaint: TexturePaint is not implemented
  • [FVG-197] - SVG: TestResolution eats CPU and produces black image.
  • [FVG-228] - BitMaps, PNG, SWF, SVG: TestAll: Stars missing.
  • [FVG-251] - PDF, PS, SVG and SWF: TestFontDerivation is wrong
  • [FVG-290] - SVG Driver creates incompatible SVG

SWF

  • [FVG-228] - BitMaps, PNG, SWF, SVG: TestAll: Stars missing.
  • [FVG-251] - PDF, PS, SVG and SWF: TestFontDerivation is wrong

Documentation

The following documentation is currently available:

Test Output

To better understand the behaviour of the VectorGraphics package for different usage on different Operating Systems and with different JDK's we publish the test results (and a PNG reference) on our website: http://java.freehep.org/vectorgraphics.

License

The VectorGraphics package is part of the FreeHEP Java Library, an "Open Source" library distributed under the terms of the LGPL. If you have questions about the licensing please send a mail to: developers@freehep.org.

Installation

All distributions for the VectorGraphics package can be donwloaded from ftp://ftp.slac.stanford.edu/software/freehep/VectorGraphics/v2.1.

Download the binary distribution vectorgraphics-2.1-bin.tar.gz or the .zip file and unpack. It creates the following directory structure:

vectorgraphics-2.1            containing license and release notes
vectorgraphics-2.1/bin        empty
vectorgraphics-2.1/examples   containing examples
vectorgraphics-2.1/lib        containing jar files

You may optionally download the documentation distribution vectorgraphics-2.1-doc.tar.gz or the .zip file and unpack. It creates the following directory structure:

vectorgraphics-2.1/doc        empty
vectorgraphics-2.1/site       containing a copy of the website, including these release notes.

Compilation

The source distribution contain all source files and can be used for recompilation. Unless you wish to make modifications, you can just use the binary distribution.

To (re-)build the VectorGraphics package you need:

Get the source code in one of the following ways:

  • Download the source distribution vectorgraphics-2.1-src.tar.gz or .zip file and unpack.
  • Check out a copy of the source code either from a tagged version:
    cd vectorgraphics-2.1
    svn co svn://svn.freehep.org/svn/freehep/tags/vectorgraphics-2.1 src
  • If you like to live on the edge from the HEAD of svn:
    cd vectorgraphics-2.1
    svn co svn://svn.freehep.org/svn/freehep/trunk/vectorgraphics src

All of these will create a directory in which you will find all VectorGraphics modules:

vectorgraphics-2.1/src/freehep-graphics2d
vectorgraphics-2.1/src/freehep-graphics3d        (to be ignored)
vectorgraphics-2.1/src/freehep-graphicsio
vectorgraphics-2.1/src/freehep-graphicsio-cgm    (not included in this release, but available for compilation)
vectorgraphics-2.1/src/freehep-graphicsio-emf
vectorgraphics-2.1/src/freehep-graphicsio-java   
vectorgraphics-2.1/src/freehep-graphicsio-latex  (not included in this release, but available for compilation)
vectorgraphics-2.1/src/freehep-graphicsio-pdf
vectorgraphics-2.1/src/freehep-graphicsio-ps
vectorgraphics-2.1/src/freehep-graphicsio-svg
vectorgraphics-2.1/src/freehep-graphicsio-swf
vectorgraphics-2.1/src/freehep-graphicsio-tests
vectorgraphics-2.1/src/pom.xml
vectorgraphics-2.1/src/site/...                  (the website and files for building the distributions)
vectorgraphics-2.1/src/..                        (other files)

To compile and run the tests type the following:

cd vectorgraphics-2.1/src
mvn

To recreate the full distribution

cd vectorgraphics-2.1/src
mvn javadoc:javadoc             (creates aggregated apidoc)
mvn site:site                   (creates top-level site, module-sites and module-apidoc)
mvn install assembly:attached   (compiles, runs tests and creates -bin, -doc and -src distributions) 

For further instructions see the FreeHEP WebSite.

Building an Application with the VectorGraphics package

Add the following libraries to your CLASSPATH:

freehep-graphics2d-2.1.jar
freehep-export-2.1.jar
openide-lookup-1.9-patched-1.0.jar
freehep-swing-2.0.2.jar
freehep-util-2.0.2.jar

Running an Application with the VectorGraphics package

Add the following libraries to your CLASSPATH:

freehep-graphicsio-2.1.jar
freehep-io-2.0.2.jar

freehep-graphics2d-2.1.jar
freehep-export-2.1.jar
openide-lookup-1.9-patched-1.0.jar
freehep-swing-2.0.2.jar
freehep-util-2.0.2.jar

Then add any or all of the following jar files to your CLASSPATH to enable these vector format as output:

freehep-graphicsio-emf-2.1.jar
    jdom-1.0.jar                            (needed by freehep-graphicsio-emf for the EMF2SVG converter)
freehep-graphicsio-pdf-2.1.jar
freehep-graphicsio-ps-2.1.jar
freehep-graphicsio-svg-2.1.jar
    freehep-xml-2.0.1.jar                   (needed by freehep-graphicsio-svg)
freehep-graphicsio-swf-2.1.jar

To run any of the tests you must also add:

freehep-graphicsio-tests-2.1.jar
jas-plotter-2.0.jar
junit-3.8.2.jar

To debug and write out a java file add:

freehep-graphicsio-java-2.1.jar

Usage with Maven

All of the jar files listed above, including the -javadoc and -source jar attachements are available from our maven servers:

Maven 1 URL
http://java.freehep.org/maven
Maven 2 URL
http://java.freehep.org/maven2
GroupId
org.freehep
ArtifactId
as listed above
Version
as listed above

Features/Limitations of the Current Release

The following limitations exist:

Reporting Bugs

To report bugs or request enhancements you may use the FreeHEP Bug Database and the FreeHEP VectorGraphics Forum.

Examples

The VectorGraphics-version/examples directory contains:

  • ExportDialogExample.java to show how to use the default ExportDialog that comes with the VectorGraphics package.
  • HeadlessExample.java to show how you can write out any format while not actually displaying anything on the screen.
  • pom.xml to compile the example files.