Windows provides built-in support for mapping page coordinates to a device, such as a printer or display.
For most of the coordinate systems defined by Windows, the system itself performs the conversion. For example, if you associate a Graphics object with the CooordinateSystem.HIMETRIC coordinate system, each logical unit on the object translates to .001 of an inch on the device.
However, when using the user-defined ANISOTROPIC and ISOTROPIC coordinate systems, you must use the setCoordinateScale method to tell the system how to perform the conversion, as in the following example:
Graphics g = this.createGraphics();
g.setCoordinateSystem(CoordinateSystem.ANISOTROPIC);
g.setCoordinateScale(new Point(1,1), new Point(2,2));
The call to setCoordinateScale in this example instructs the system to convert a single logical horizontal and vertical unit to two horizontal and vertical device units.