Overview of the Java 2D API |
The Java 2D system maintains two coordinate spaces:
- User space is a component's coordinate system.
- Device space is the coordinate system of an output device such as a monitor or printer.
User space is a device-independent, logical coordinate system. This is the coordinate space that your program uses. All geometries passed into Java 2D rendering routines are specified in user space coordinates.
The origin of user space is the upper left corner of the component's drawing area. The x coordinate increases to the right, the y coordinate increases downward:
User Space Device space is a device-dependent coordinate system that varies according to the target rendering device. Although the coordinate system for a monitor might be very different from the coordinate system for a printer, these differences are invisible to Java programs. The necessary conversions between user space and device space are performed automatically during rendering.
Overview of the Java 2D API |