beautypg.com

Setgray – AMT Datasouth PAL User Manual

Page 176

background image

setgray

170

setgray

Description

Establishes a gray scale printing level within the DeviceGray color space to use for subsequent
image rendering operations.

Usage

LevelNum

setgray

LevelNum

Integer or fixed-point. Specifies the gray level (amount of white) to apply to
subsequent image rendering operations. LevelNum can range from 0.0 (black)
to 1.0 (white).

Comments

PAL currently only supports the DeviceGray color space. This color space allows the user to
select a gray level which PAL will apply to all subsequent drawing operations. The gray level
setting specifies the percentage of white to apply to images. A setgray values of 0.0 specifies 0%
white, which implies black. A setgray value of 1.0 specifies 100% white. Intermediately values
select intermediate levels of gray.

No printer can support the full range of gray levels which the user can specify using the setgray
operator. As a result, all PAL printers translate (“map”) gray level requests to the gray levels the
printer can print. This translation process is referred to as “color realization.” Color realization
involves the conversion of a color from a “virtual” or “logical” requested color to a “real” or
“physical” color which the printer can actually print.

Different printers will perform color realization in different manners depending upon their printing
capabilities. Some printers will only support black and white printing. These printers will typically
translate gray level requests below 0.5 (50%) to black, and requests at or above 0.5 to white.

Some printers will create a pattern of black and white dots. The relative proportion of black dots to
white dots can produce the visual effect of varying levels of gray. The most advanced printers may
actually have the ability to vary the level of black applied to each dot on the page.

In general, the user can rely upon PAL printers supporting both black and white printing as a
minimum. Specifying “0 setgray” will always select black, and “1 setgray” will always select
white.