https://github.com/jfree/graphics2d-tester
A visual tester for Graphics2D implementations
https://github.com/jfree/graphics2d-tester
graphics2d java
Last synced: 3 months ago
JSON representation
A visual tester for Graphics2D implementations
- Host: GitHub
- URL: https://github.com/jfree/graphics2d-tester
- Owner: jfree
- License: gpl-3.0
- Created: 2021-07-27T04:45:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-27T17:37:17.000Z (8 months ago)
- Last Synced: 2025-09-03T05:44:04.690Z (4 months ago)
- Topics: graphics2d, java
- Language: Java
- Homepage:
- Size: 5.31 MB
- Stars: 11
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JFree Graphics2D Tester
Overview
--------
**JFree Graphics2D Tester** is a visual tester for implementations of Java2D's `Graphics2D` class. The program generates a pre-defined set of outputs for any provided subclass of `Graphics2D` that can be compared against a known good result. The following libraries (as well as others) can be tested this way:
- [JFreeSVG](https://github.com/jfree/jfreesvg)
- [JFreePDF](https://github.com/jfree/jfreepdf)
- [FXGraphics2D](https://github.com/jfree/fxgraphics2d)
- [SkijaGraphics2D](https://github.com/jfree/skijagraphics2d)
- [SkikoGraphics2D](https://github.com/jfree/skikographics2d)
By running through the features of `Graphics2D` systematically, this test kit is
able to highlight areas of weakness in a particular implementation. The goal is to drive improvements in the
available implementations.
Target Output
-------------
The output of the `Graphics2D` target under test must be manually compared against the expected ("correct") output. The expected output can be generated by running the test program against the `Graphics2D` instance used by Java2D itself
when drawing to a `BufferedImage`. For example, the following output is generated with Java 20 on MacOS:

Third Party Libraries
---------------------
The test kit uses several third party libraries:
- [ZXing](https://github.com/zxing/zxing) - used to create a QR code which is (a) part of the test and (b) provides a link to the `Graphics2D` implementation under test;
- [JFreeChart](https://github.com/jfree/jfreechart) - used to create a sample 2D chart;
- [Orson Charts](https://github.com/jfree/orson-charts) - used to create a sample 3D chart;
- [SteelSeries-Swing](https://github.com/HanSolo/SteelSeries-Swing) - used within the Java Swing UI demo to draw a dial.
License
-------
**Graphics2D Tester** is free software under the terms of the GNU General Public License version 3 (GPLv3) or later. The license file (LICENSE) is included in this distribution.
Please note that Graphics2D Tester is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Please refer to the license for details.