Most printers support commands with a variety of resolutions. For example, the Immediate Line Feed command on the Kodak Diconix printer provides a resolution of 1/288th of an inch while the same printer supports vertical-graphics resolutions of 1/96th of an inch. To simplify the problem of handling various resolutions, the Unidriver uses a single, common coordinate system. The units in this coordinate system are called master units. Master units are the least common multiple of the various horizontal and vertical resolutions supported by the printer.
The Unidriver calculates the arguments for some printer commands by adding a value to the specified master units, multiplying the specified master units by a value, or dividing the specified master units by a value. For example, the vertical master unit for the Kodak Diconix printer is 1/576 of an inch; however, the printer's immediate line-feed command operates in 1/288 inch increments. When using this command, the Unidriver must convert the argument it supplies from vertical master units to the required units.
UniTool stores each printer command in a Command Descriptor (CD) data structure. In cases where the Unidriver needs to supply an argument to a particular command, such as the Immediate Line Feed command, UniTool stores additional data in an Extended Command-Descriptor (EXTCD) data structure. This data structure contains values by which the Unidriver should divide, multiply, increase, or limit command arguments. A special Units dialog box is provided for each printer command. In those cases where the Unidriver must convert master units, specify the appropriate values in the corresponding Units dialog box. In the case of the Immediate Line Feed command, master units must be divided by 2 prior to setting the parameter, therefore the sUnitDiv control contains the value 2.
The sMax control contains the value 255 (the maximum allowable value for this parameter) and the sMin control contains the value 1 (the minimum allowable value for this parameter).