Vector Graphics 2.0 Release Notes

Release Notes Version: $Revision: 10163 $.

The most recent version of this file is available at

Release notes for all versions of the VectorGraphics package are available at

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.

The formats CGM, LaTeX and JAVA (for debugging) have not been released in version 2.0. 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 1.2.2. 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.

All changes previously declared fixed for version 1.2.3 are included in version 2.0 of VectorGraphics. Version 1.2.3 will not be released.

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

Below the major changes in general and by format:


  • [FVG-2] - add text as shapes
  • [FVG-13] - Unicode symbols don't appear in output
  • [FVG-17] - The size of symbols, drawn and filled seems not always equal
  • [FVG-21] - TagString doesn't handle Nested Tags
  • [FVG-23] - PixelGraphics has offset in several tests on MacOS X
  • [FVG-39] - Write DashedLinePathConstructor
  • [FVG-40] - Reorganize PathConstructors so that they can Cascade
  • [FVG-44] - Compile time error due to ambigous reference to method drawString
  • [FVG-82] - drawString(attributedCharIter) is unimplemented by all formats
  • [FVG-104] - PixelGraphics2D: createShape could be faster and less memory consumptive
  • [FVG-109] - drawImage does not save/restore transform.
  • [FVG-110] - ArrayPath has a problem with empty closed paths.
  • [FVG-111] - getDefaultInstance(ClassLoader loader) in ExportFileTypeRegistry can only be called once for the same loader.
  • [FVG-113] - VectorGraphics: some drawString(...) and drawGlyphVector(...) unimplemented
  • [FVG-114] - copy and paste into Word 97 doesn't support EMF
  • [FVG-116] - Export Dialog does not report errors to user
  • [FVG-121] - BufferedPanel should not build a clipped bufferedimage since the blit of it is much slower on Linux.
  • [FVG-122] - ClassCastException in makeImage of BuffredPanel when sun.java2d.ddoffscreen set to true.
  • [FVG-123] - Negative coordinates seem clipped.
  • [FVG-124] - Add test for resolution
  • [FVG-132] - Move org.freehep.graphicsio.font.encoding to org.freehep.graphics2d.font
  • [FVG-134] - getGraphics() in BufferedPanel does not return correct VG.
  • [FVG-136] - AbstractVectorGraphicsIO.setTranform(AffineTransform) is incorrectly doing "pass by reference".
  • [FVG-139] - Exporting array of components produces bad file
  • [FVG-141] - Switching exportFileTypes should properly update extensions
  • [FVG-142] - BufferedPanel will now limit clipped copy to bounds of panel, avoiding a RasterException.
  • [FVG-143] - Change PathConstructor method closePath to have coordinates
  • [FVG-145] - createShape should return Shape rather than GeneralPath
  • [FVG-146] - Export Type selection case sensitive
  • [FVG-147] - ExportDemo: Security Exception for GIF, PNG, JPG and RAW formats in WebStart
  • [FVG-149] - Font derivation does not work for arbitrary transforms
  • [FVG-159] - Buggfix for TTFGlyphTable.SimpleGlyph.getShape()
  • [FVG-162] - Custom Strokes should work in all formats supporting shapes. Currently only in PDF.
  • [FVG-165] - modify writeDash to use float as parameters rather than doubles.
  • [FVG-166] - Handle the writing of fonts better.
  • [FVG-167] - setRenderingHints with null value should remove hint
  • [FVG-168] - draw methods using integer need a bias of 0.5 to be correctly displayed.
  • [FVG-170] - Underline, StrikeThrough ... lost for TEXT_AS_SHAPE
  • [FVG-211] - ArrayIndexOutOfBoundsException for CubicCurve
  • [FVG-212] - Wrong Mapping of DialogInput
  • [FVG-215] - Add ExportFileType for WBMP and BMP
  • [FVG-216] - ExportFileTypes for Bitmap formats should failover to real class rather than ZZZclass.
  • [FVG-217] - ZZZExportFileType works on Windows but fails on MacOS X (and maybe others).
  • [FVG-245] - Disabled tests should end up in report list without link, and be skipped with next/previous
  • [FVG-246] - Test reports should be written in different dirs for JDK version and OS
  • [FVG-247] - Add a link back to vectorgraphics page
  • [FVG-248] - FreeHEP image is missing..
  • [FVG-249] - Add link to test matrix from vectorgraphics web.
  • [FVG-250] - CubicToQuadPatrhConstructor is not protected for parallel lines
  • [FVG-258] - Add a way to skip certain formats in tests and reports
  • [FVG-259] - Deploy test results for all platforms.
  • [FVG-260] - Add format-wide test of normal and scatter plot
  • [FVG-261] - Add gray cloudy background to table so we can see tarsnparency.
  • [FVG-273] - Add missing tests to TestApplication
  • [FVG-274] - All formats should just declare their extensions in lowercase only.
  • [FVG-275] - Handle setColor, setFont and setPaint with null argument to mean NOP.


  • [FVG-1] - Bad polygon export for EMF
  • [FVG-5] - EMFGraphics2D thows NPE on Ilog component
  • [FVG-18] - EMF: change output of EMF test ref files into EMZ
  • [FVG-29] - EMF: Export to EMF under MacOS X shows only one quadrant
  • [FVG-48] - Export to EMF messes up screen under Windows 98
  • [FVG-107] - EMFGraphics2D.writeImage should not call writeGraphics* directly
  • [FVG-112] - EMF: problem in writeImage
  • [FVG-148] - EMF: Add option to write gzipped EMF as EMZ file.
  • [FVG-236] - EMF: TestImage2D no background and no red
  • [FVG-237] - EMF: TestImages no background (or wrong) and no red.
  • [FVG-240] - EMF: TestTransparency no transparency, no red and wrong background
  • [FVG-271] - Remove EMZ extension


  • [FVG-115] - Exceptions, such as GIF > 256 colors, end up on WebStart Console, rather than on DialogBox.
  • [FVG-119] - GIF: can only handle 256 colors
  • [FVG-158] - GIFGraphics2D should disallow anti-aliasing
  • [FVG-202] - GIF: TestColors background incorrect
  • [FVG-204] - GIF: TestImage2D background incorrect
  • [FVG-205] - GIF: TestSymbols2D seems not nicely drawn.
  • [FVG-206] - GIF: TestTransparency incorrect
  • [FVG-254] - GIF: TestCustomStrokes is all black.
  • [FVG-263] - GIF: TestColors bottom bar is not transparent
  • [FVG-265] - GIF: TestHistogram wrong background.
  • [FVG-266] - GIF: TestHTML wrong background
  • [FVG-267] - New Quantizer for GIF improves on color selection.
  • [FVG-270] - Exception when clicking option box in exportdialog for GIF format


  • [FVG-66] - PDF: TestFonts no MonoType Corsiva.
  • [FVG-67] - PDF, PS: TestAll no impact font
  • [FVG-105] - Write images once each to pdf file
  • [FVG-144] - tiny typo in PDFGraphics.openPage()
  • [FVG-157] - drawGlyphVector(GlyphVector g, float x, float y) not implemented in PDFGraphics2D
  • [FVG-199] - PDF, PS, SVG and SWF: TestFonts and TestShapes has wrong symbol and dingbats
  • [FVG-200] - PDF: TestTransform misses one figure.
  • [FVG-219] - PDF: TestTaggedString has no bold or italic.
  • [FVG-221] - PDF: TestShapes no bold or italic
  • [FVG-222] - PDF: TestHTML has no bold or italic
  • [FVG-224] - PDF: TestFonts, no monotype corsiva
  • [FVG-225] - PDF: TestFonts, no smiley character


  • [FVG-67] - PDF, PS: TestAll no impact font
  • [FVG-68] - PS: TestAll fails to show sky.
  • [FVG-102] - PS: FrameColor in drawString is ignored
  • [FVG-103] - PS: TestFonts no monotype corsiva
  • [FVG-125] - PDF: write out floats in higher precision, but do not use E.
  • [FVG-126] - PS: write out floating points in scientific format (E if necessary)
  • [FVG-140] - PS: different default orientation
  • [FVG-174] - PostScript output eats memory in GhostView
  • [FVG-198] - PS: TestPaint has the wrong image encoding
  • [FVG-199] - PDF, PS, SVG and SWF: TestFonts and TestShapes has wrong symbol and dingbats
  • [FVG-213] - Transparency in PS does not work
  • [FVG-226] - PS: TestFonts , no smiley and no heart


  • [FVG-92] - SVG: Use predefined symbol set in output
  • [FVG-127] - SVG: write out floating points in scientific format (E if necessary)
  • [FVG-137] - SVG: xlink namespace is not bound.
  • [FVG-138] - SVG: Dtd and SVG namespace not correct.
  • [FVG-151] - SVG: avoid style attribute
  • [FVG-152] - SVG: make stylable false the default and do not compress, since Firefox reads non-compressed files.
  • [FVG-156] - Ref and test files in svg test area are of type svgz with extension svg
  • [FVG-155] - Some constructors in the SVGGraphics2D should not throw IOException
  • [FVG-163] - Cleaner and more correct SVG Output
  • [FVG-164] - Embed fonts into SVG
  • [FVG-191] - SVG: TestAll, sky image missing
  • [FVG-192] - SVG: TestFonts symbol and dingbats do not show correctly
  • [FVG-194] - SVG: TestLineStyles has missing dotted lines.
  • [FVG-195] - SVG: TestPaint has missing images
  • [FVG-196] - SVG: TestShapes has wrong symbol and dingbats font
  • [FVG-199] - PDF, PS, SVG and SWF: TestFonts and TestShapes has wrong symbol and dingbats
  • [FVG-220] - SVG: TestTaggedString has no fonts, bold or italic and no super/subscripts
  • [FVG-223] - SVG: TestHTML has no bold
  • [FVG-227] - SVG: TestFonts serif font is not plain but italic
  • [FVG-229] - SVG: TestAll text is in italic rather than plain
  • [FVG-230] - SVG: TestAll Impact text is missing
  • [FVG-231] - SVG: TestAll no bold text
  • [FVG-257] - SVG: Symbol and Dingbats are not correct
  • [FVG-272] - SVG: default extension should be svg and not svgz


  • [FVG-106] - SWF: DrawString("", ...) creates an unreadable file.
  • [FVG-120] - SWF: Parsing Header should re-set the TagSets depending on the version number.
  • [FVG-130] - SWF: Adjust resolution for PathConstructor
  • [FVG-133] - SWF: ButtonRecord needs extra 0 byte when no colorXForm is written
  • [FVG-135] - SWF: version 7 reads and write DefineText in a different way than version 6.
  • [FVG-150] - SWF: color xform should be byte-aligned
  • [FVG-176] - SWF: TestClip draws thick green lines in JavaClip part.
  • [FVG-177] - SWF: TestColors bottom background incorrect
  • [FVG-178] - SWF TestCustomStrokes wrong background and green line.
  • [FVG-179] - SWF: TestFonts no characters written.
  • [FVG-183] - SWF: TestImages has green line on top and left.
  • [FVG-184] - SWF: TestLabels green lines on label 1 and 4.
  • [FVG-185] - SWF: TestLineStyles has missing 0 with (thinnest) line.
  • [FVG-186] - SWF: TestPrintColors, has green line.
  • [FVG-188] - SWF: TestTaggedString has no underline, overline etc...
  • [FVG-189] - SWF: TestTransforms has incorrect line thickness
  • [FVG-199] - PDF, PS, SVG and SWF: TestFonts and TestShapes has wrong symbol and dingbats
  • [FVG-244] - SWF TestFonts produces NPE
  • [FVG-262] - SWF: TestColors bottom bar not transparent
  • [FVG-268] - SWF: upgrade to version 8 of the SWF format
  • [FVG-269] - SWF: TestPaint, no support for cyclic gradients


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:


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:


All distributions for the VectorGraphics package can be donwloaded from

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

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

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

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


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.0-src.tar.gz or .zip file and unpack.
  • Check out a copy of the source code either from a tagged version:
    cd vectorgraphics-2.0
    svn co svn:// src
  • If you like to live on the edge from the HEAD of svn:
    cd vectorgraphics-2.0
    svn co svn:// src

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

vectorgraphics-2.0/src/freehep-graphics3d        (to be ignored)
vectorgraphics-2.0/src/freehep-graphicsio-cgm    (not included in this release, but available for compilation)
vectorgraphics-2.0/src/freehep-graphicsio-java   (not included in this release, but available for compilation)
vectorgraphics-2.0/src/freehep-graphicsio-latex        (not included in this release, but available for compilation)
vectorgraphics-2.0/src/src/...                   (the website and files for building the distributions)
vectorgraphics-2.0/src/..                        (other files)

To compile and run the tests type the following:

cd vectorgraphics-2.0/src

To recreate the full distribution

cd vectorgraphics-2.0/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:


Running an Application with the VectorGraphics package

Add the following libraries to your CLASSPATH:



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

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

To run any of the tests you must also add:


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
Maven 2 URL
as listed above
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.


The VectorGraphics-version/examples directory contains:

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