HP L 5 manual NP Number of Pens

Models: L L 5

1 286
Download 286 pages 16 Kb
Page 181
Image 181

NP (Number of Pens)

The NP command resizes the palette after the IN or ?*v#W commands.

NP [n;] or NP[;]

Parameter

Format

Functional

Parameter

 

 

Range

Default

 

 

 

 

n

clamped

2 to 32768

device-dependent*

 

integer

 

 

 

 

 

 

*The default palette size for the HP color printers is 8.

n — the parameter n denotes the size of the HP-GL/2 palette, where n is a power of two. If n is not a power of two, the next larger power of two is used. The palette is an array of virtual pens, each having an associated color value and an associated width. Pen colors are defined in terms of RGB components using the PC command. Widths are established using the PW and WU commands. A pen is selected with the SP command.

The maximum value for n is device-dependent, but is greater than or equal to the number of distinct colors the printer is able to produce. If n is larger than that maximum, the maximum-sized palette is allocated. If n < 2, error 3 is set and the command is ignored.

The “NP;” command defaults the palette size. Receipt of this command does not default pen colors and/or widths for existing pen values. For example, if the palette size is initially 8 and is decreased to 4, pen colors and widths for the new palette are retained from the colors and widths of the first 4 pens of the old palette. If the palette size is increased from 8 to 16, the colors and widths for the first 8 pens remain the same, and the colors and widths of the remaining pens are defaulted. The pens are defaulted in accordance to how the palette was created (either CID or Simple Color palettes).

EN

Color Vector Graphics (HP-GL/2) 7-17

Page 181
Image 181
HP L 5 manual NP Number of Pens