A number of sets of color commands can be set up for the minidriver. To specify color commands, select Graphics Info from the Printer Data menu on the minidriver’s Printer Data window. Then select Color to display the initial Color Models dialog box.
To select an existing set of color commands, highlight the desired set of Color Models commands to edit on the minidriver’s Printer Data window. Then, double click on the selection to display the Color Models dialog box.
Most printers support one of two color methods: planar or pixel. Devices that use the pixel method send all of the RGB data for a single pixel at once, typically using at least two bytes per single pixel. RasDD does not support color on printers that require color-raster graphic data using the pixel method.
Printers that use the planar method send the color data for a single pixel in several passes (planes). The value that results from combining the data for one pixel in each plane determines the color that pixel assumes. Devices that use the planar method typically use three or four color planes. A three-plane model represents cyan data in one plane, yellow data in a second plane, and magenta data in a third plane. By combining inks from these three basic colors (cyan, yellow, and magenta), the device can render images of up to eight colors. A four-plane model is identical to the three-plane model except for the addition of a fourth plane that represents black data. (In the three-plane model, cyan, yellow, and magenta ink is combined in equal parts to create black output.)
Until recently, most color printers used planar models to represent color images. For this reason, the current version of the DMCOLOR library and the UniTool application support this model (rather than the pixel model). You can provide a callback function to convert planar color data into pixel color data. In some instances, the converted data does not take advantage of a printer’s color-output capabilities. For example, DMCOLOR allows a maximum of eight colors (cyan, blue, magenta, red, yellow, green, white, and black). This means that DMCOLOR converts any 256-color pixel image into an 8-color planar image. If a printer supports 256 colors, it can not display the original image, even if the minidriver provides the callback function. Obviously, some printers are better supported by the original Windows driver interface.
The Color Models dialog box controls specify the color capabilities of printers that render color output. For example, these controls specify values such as the number of color planes supported by printers that use a color-plane format, the number of bits per pixel supported by printers that use a bit-per-pixel format, the device commands that select colors, and so on.
Note Because neither the Diconix 150 Plus nor the HP LaserJet IIP printers provide color support, this section contains information for an additional printer, the Hewlett-Packard PaintJet.
When you finish entering data in the Color Models dialog box:
The sPlanes box specifies the number of color planes supported by the printer.
HP PaintJet: Use 3 for the sPlanes box.
The sBitsPixel box specifies the number of bits of data required for each color pixel.
HP PaintJet: Use 1 for the sBitsPixel box. One bit in each plane corresponds to a single pixel.
Click the fGeneral button to display the fGeneral dialog box. This dialog box contains boxes that specify general color capabilities for a printer as follows:
Control |
Description |
DC_PRIMARY_RGB |
If this bit is set, sPlanes must equal three with RasDD. RasDD first sends data for the red plane, followed by the blue and green planes. The printer then converts this data into an index into its color palette to obtain the eight basic colors. If this bit is not set, RasDD sends black data first (only if the DC_EXTRACT_BLACK bit is set, followed by data for the cyan, magenta and yellow planes.) |
DC_EXTRACT_BLK |
If this bit is set, sPlanes must equal four. This control specifies that the printer renders black using a separate ink or ribbon. If this control is not set, RasDD assumes that the printer renders black by mixing the other colors. |
DC_SEND_CR |
RasDD sends a carriage return to clear the output buffer before processing the next plane of color-raster data. |
DC_SEND_ALL_PLANES |
RasDD sends all color plane data to the printer; otherwise, the driver may send only non-null data. This flag applies only to color-plane devices. |
DC_SEND_PAGE_FRAME |
RasDD sends color plane data one page at a time. This flag applies only to color-plane devices. |
DC_EXPLICIT_COLOR |
RasDD sends a command to select a given color; the selection is not implied by the RES_OCD_SENDBLOCK command. This flag applies only to color-plane devices. |
DC_SEND_PALETTE |
RasDD downloads the color palette. This flag applies only to color plane devices. |
HP PaintJet: Check the DC_PRIMARY_RGB box because the printer uses the RGB color model.
The Color Planes control specifies the commands that render the color graphics output. Select a plane from the Plane # box, enter the command for rendering that plane in the Command box, and select an identifier for the plane from the Plane ID box.
HP PaintJet: The Command box for planes 1 and 2 contain the Transfer Raster Data by Plane command (ESC*bnV) where n specifies the number of bytes of raster data.
To specify the command, type the following in the Command box for planes 1 and 2:
\x1B*b%dV
The Command box for the plane 3 contains the Transfer Raster Data by Row command (ESC*bnW). This command differs from the previous command in that it moves the current active position (CAP) to the next row of data.
To specify the command, type the following in the Command box for plane 3:
\x1B*b%dW
Because the PaintJet printer uses three-plane technology, the Command box for plane 4 is empty.
The Plane ID box indicates the order in which the color plane data is sent to the printer.
HP PaintJet: Contains DC_PLANE_RED for plane 1, DC_PLANE_BLUE for plane 2 blue, and DC_PLANE_GREEN for plane 3.
Note If the DC_PRIMARY_RGB bit is set in the fGeneral dialog box, RasDD uses the device commands to send a color plane of graphics data instead of sending block commands from the resolution section when color is enabled.
The Commands controls specify commands that render the color text output. The Commands controls includes the following:
Command |
Description |
DC_OCD_TC_BLACK |
Sets the text color to black. |
DC_OCD_TC_RED |
Sets the text color to red. |
DC_OCD_TC_GREEN |
Sets the text color to green. |
DC_OCD_TC_YELLOW |
Sets the text color to yellow. |
DC_OCD_TC_BLUE |
Sets the text color to blue. |
DC_OCD_TC_MAGENTA |
Sets the text color to magenta. |
DC_OCD_TC_CYAN |
Sets the text color to cyan. |
DC_OCD_TC_WHITE |
Sets the text color to white. |
DC_OCD_SETCOLORMODE |
Selects the printer model. This command is required only for pixel color models. |
DC_OCD_PC_SELECTINDEX |
Selects the palette index to be used as the foreground color for text. |
HP PaintJet: The DC_OCD_TC_BLACK, DC_OCD_TC_RED, DC_OCD_TC_GREEN, and DC_OCD_TC_YELLOW boxes contain the corresponding Text Color command (ESC&vnS) that renders text using the specified color. If n is 0, the text color is black; if n is 1, the text color is red; if n is 2, the text color is green; if n is 3, the text color is yellow, and so on.
To select black text, type the following command in the DC_OCD_TC_BLACK box:
\x1B&v0S
To select red text, type the following command in the DC_OCD_TC_RED box:
\x1B&v1S
To select green text, type the following command in the DC_OCD_TC_GREEEN box:
\x1B&v2S
To select yellow text, type the following command in the DC_OCD_TC_YELLOW box:
\x1B&v3S
To select blue text, type the following command in the DC_OCD_TC_BLUE box:
\x1B&v4S
To select magenta text, type the following command in the DC_OCD_TC_MAGENTA box:
\x1B&v5S
To select cyan text, type the following command in the DC_OCD_TC_CYAN box:
\x1B&v6S
To select white text, type the following command in the DC_OCD_TC_WHITE box:
\x1B&v7S
The DC_OCD_SETCOLORMODE command initializes a printer to process color data.
HP PaintJet: Use the Set Number of Planes Per Row command (ESC*rnU) to initialize the printer for color data processing. The argument n specifies the number of planes of color data.
To specify the command, type the following in the DC_OCD_SETCOLORMODE box:
\x1B*r3U