The Java 2D TM API extends the Java TM core APIs with enhanced 2D graphics and imaging capabilities.
The Java 2D API (Java 2D) is a set of classes that extend the capabilities of Sun's Abstract Windowing Toolkit (AWT). Java 2D handles arbitrary shapes, text, and images and allows all of these to be rotated, scaled, skewed, and otherwise transformed in a uniform manner. By leveraging the inherent strengths of Java technology, Java 2D brings the concept of "Write Once, Run Anywhere TM " to applications that require enhanced 2D graphics and imaging capabilities. As a result, developers are easily able to incorporate high-quality, scalable and platform-independent graphics into Java based applets and applications.
Because Java 2D extends the AWT hierarchy, existing programs will continue to work. And even new Java programs can compatibly mix both new and existing classes. In addition, as one of the Java Media APIs, Java 2D can help provide an ideal platform for creating enterprise-scale Java applications and applets that take full advantage of rich media to enhance communications.
Image processing using an edge detection convolution filter
|Alpha blending of graphics over an image||Antialiased, bidirectional, rotated text|
Java 2D consists of a set of interfaces and base classes which provide the foundation for extensibility. This structure allows developers to manage simple and complex drawing operations with the same basic framework. This simple architecture also keeps the core classes stable and compact as new functionality is added, while facilitating code sharing and minimizing the number of concepts the developer must master.
The Java 2D rendering model enables high-quality, device-independent graphics and allows client applications to use the same imaging model for both screen and print.
Java 2D compatibly extends java.awt. Therefore, developers do not need to change the structure of their programs to use Java 2D since it follows the same programming model as existing classes in the java.awt and java.awt.image packages.
The Java 2D classes supports text handling that ranges from the simple use of fonts to professional-quality handling of character layout and font features.
Java 2D supplements the image-handling classes in the java.awt.image package, providing an array of image processing and display features. These features include image rescaling, thresholding, computing, manipulating lookup tables, and channel combining. These capabilities are useful in contrast filtering, high- and low-pass filtering, image sharpening and enhancement.
Java 2D makes color reproduction simple yet empowers developers to make sophisticated use of high-quality color output. Java 2D also helps solve the consistency and accuracy problems of device-dependent color descriptions such as RGB and CMYK. For example, Java 2D allows you to create images in color spaces other than RGB color, and allows you to characterize colors for more accurate reproduction.
For more information on Java Media APIs and how they can enable you to transform your ideas into innovative software solutions, see the Java 2D API homepage.
All information contained in this document is subject to change.
All Java Media API specifications have been developed in cooperation
with leading technology partners.