Logical Operations
With the introduction of the HP LaserJet 4ML printer the print model
was expanded to include logical operations.
The basic print model defines how a pattern, source image, and
destination image are applied to each other using the print model’s
transparent and opaque modes to produce a resulting image (refer to
the PCL 5 Printer Language Technical Reference Manual for detailed
information about the basic print model operation). The Logical
Operations (
?
*
l
#O) command can apply logical functions (e.g.,
AND, OR, XOR, NOT) to any of these operands except transparency,
which must be specified first.
The print model process consists of the following steps:
1
Specify source and/or pattern transparency modes, if desired.
2
Specify the logical operation (or use the default).
3
Define the desired operands (source, destination, pattern).
Definitions
Source: The source image may be one of the following:
• HP-GL/2 primitives
• Rules
• Characters
• Raster images (single plane mask or multiplane color)
Destination: The destination image contains whatever is currently
defined on the page. It includes any images placed through previous
operations.
Pattern or Texture: The pattern is defined by Current Pattern
(
?
*v#T). The terms pattern and texture are used interchangeably in
this section.
Transparency Modes: The white pixels of the source and/or pattern
may be made transparent (source transparency 0, pattern
transparency 0). The destination shows through these areas.
Transparency modes are set by the Source Transparency (
?
*v#N)
and Pattern Transparency (
?
*v#O) commands (refer to the PCL 5
Printer Language Technical Reference Manual).
2-14 Printer-Specific Differences
ENWW
The print model allows logical operations, such as AND, OR, XOR,
NOT, to be performed on source, texture, and destination images.
Transparency modes and Logical Operation must be specified before
printable data is sent.
Operators
• Source Transparency (specified before logical operation;
default is transparent)
• Pattern Transparency (specified before logical operation;
default is transparent)
• Logical Operators (default is Texture OR Source)
Operands
• Source objects: character cell, raster image, rule, HP-GL/2
vectors and polygons
• Texture: pattern mask
• Destination: current page definition
Assuming three bits per pixel, the following diagram shows the print
model process.
Note
The Logical Operation command (
?
*
l
#O) provides 255 possible
logical operations. All of these logic operations map directly to their
ROP3 (raster operation) counterparts (see the Microsoft Document,
Reference, Volume 2, Chapter 11, Binary and Ternary Raster
Operation Codes).
The logical operations were defined by Microsoft Windows for an
RGB color space (a “1” is white and a “0” is black).
ENWW
Printer-Specific Differences 2-15