Class GraphicsUtilities

java.lang.Object
hec.map.annotations.GraphicsUtilities

public class GraphicsUtilities extends Object

GraphicsUtilities contains a set of tools to perform common graphics operations easily. These operations are divided into several themes, listed below.

Compatible Images

Compatible images can, and should, be used to increase drawing performance. This class provides a number of methods to load compatible images directly from files or to convert existing images to compatibles images.

Creating Thumbnails

This class provides a number of methods to easily scale down images. Some of these methods offer a trade-off between speed and result quality and shouuld be used all the time. They also offer the advantage of producing compatible images, thus automatically resulting into better runtime performance.

All these methodes are both faster than Image.getScaledInstance(int, int, int) and produce better-looking results than the various drawImage() methods in Graphics, which can be used for image scaling.

Image Manipulation

This class provides two methods to get and set pixels in a buffered image. These methods try to avoid unmanaging the image in order to keep good performance.