Logical Operation Command

background image

Logical Operation Command

Specifies the logical operation to be performed in RGB color space on
the destination, source and texture to produce new destination data.

?

*

l

#O

Note

When source and/or pattern transparency modes are set opaque (not
defaulted), values specified by this command map directly to the
ROP3 (raster operation) table values on the following page. However,
when source and/or pattern transparency modes are set transparent,
the additional operations shown on the previous page must be
performed to achieve the final result.

Logical operations in the table are shown in RPN (reverse polish
notation). For example, the value 225 corresponds to TDSoxn, the
logical function of

NOT (texture XOR (source OR destination))

Note

This command is the PCL Version of the HP-GL/2 MC command.

This command sets the ROP value which affects not only PCL
operation but also the HP-GL/2 ROP value.

#

= Logical operation value (see Table 2-6)

Default

= 252 (TSo)

Range

= 0 to 255

background image

ENWW

Printer-Specific Differences 2-17

Example:

The Logical Operation default value is 252 (TSo), corresponding to a
logical function of:

(texture | source)

The result is computed below for both case 1 (source and pattern
opaque) and case 4 (source and pattern transparent) on the previous
page. Note that the ROP3 value of 252 results only with case 1, when
both source and pattern transparency modes are set to opaque.

Table 2-5. Logical Operation (ROP3)

Each column of destination, source, and texture values are the input
to the logical function. The result, 252, is the value that would be sent
to identify the logical operation (source and pattern transparency
modes are opaque). The last row, “ROP3 + Transparencies (source &
pattern are transparent)” shows the result if source and pattern
transparency modes are transparent (the default transparency mode).

Bits

7 6 5 4 3 2 1 0

Texture

1 1 1 1 0 0 0 0

Source

1 1 0 0 1 1 0 0

Destination

1 0 1 0 1 0 1 0

ROP3 (source & pattern are opaque)

1

1

1

1

1

1

0

0

(decimal 252)

ROP3 Transparencies
(source & pattern are transparent)

1

1

1

0

1

0

1

0

background image

2-18 Printer-Specific Differences

ENWW

Table of Logical Operations

Table 2-6, Logical Operations (ROP3), shows the mapping between
input values and their logical operations. Note that the logical
operations are specified as RPN (reverse polish notation) equations.
Here is a key to describe what the Boolean Function values mean;

Note

Since logical operations are interpreted in RGB space (white = 1 and
black = 0) rather than in CMY space (white = 0 and black = 1), the
results may not be intuitive. For example, ORing a white object with a
black object in RGB space yields a white object. This is the same as
ANDing the two objects in CMY space. It must be remembered that
the printer operates in something similar to a CMY space and inverts
the bits and reverses the order.

S = Source

a = AND

T = Texture

o = OR

D = Destination

n = NOT

x = EXCLUSIVE OR

background image

ENWW

Printer-Specific Differences 2-19

Table 2-6. Logical Operations (ROP3)

Input Value

Boolean Function

Input Value

Boolean Function

0

0 27

SDTSxaxn

1

DTSoon 28

TSDTaox

2

DTSona

29

DSTDxaxn

3

TSon 30

TDSox

4

SDTona 31

TDSoan

5

DTon

32

DTSnaa

6

TDSxnon

33

SDTxon

7

TDSaon 34

DSna

8

SDTnaa

35

STDnaon

9

TDSxon

36

STxDSxa

10

DTna

37

TDSTanaxn

11

TSDnaon 38

SDTSaox

12

STna

39

SDTSxnox

13

TDSnaon

40

DTSxa

14

TDSonon

41

TSDTSaoxxn

15

Tn

42

DTSana

16

TDSona

43

SSTxTDxaxn

17

DSon

44

STDSoax

18

SDTxnon

45

TSDnox

19

SDTaon

46

TSDTxox

20

DTSxnon

47

TSDnoan

21

DTSaon

48

TSna

22

TSDTSanaxx

49

SDTnaon

23

SSTxDSxaxn

50

SDTSoox

24

STxTDxa

51

Sn

25

SDTSanaxn

52

STDSaox

26

TDSTaox

53

STDSxnox

background image

2-20 Printer-Specific Differences

ENWW

Table 2-6. Logical Operations (ROP3) continued

Input Value

Boolean Function

Input Value

Boolean Function

54

SDTox

81

DSTnaon

55

SDToan

82

DTSDaox

56

TSDToax

83

STDSxaxn

57

STDnox

84

DTSonon

58

STDSxox

85

Dn

59

STDnoan

86

DTSox

60

TSx

87

DTSoan

61

STDSonox

88

TDSToax

62

STDSnaox

89

DTSnox

63

TSan

90

DTx

64

TSDnaa

91

DTSDonox

65

DTSxon

92

DTSDxox

66

SDxTDxa

93

DTSnoan

67

STDSanaxn

94

DTSDnaox

68

SDna

95

DTan

69

DTSnaon

96

TDSxa

70

DSTDaox

97

DSTDSaoxxn

71

TSDTxaxn

98

DSTDoax

72

SDTxa

99

SDTnox

73

TDSTDaoxxn

100

SDTSoax

74

DTSDoax

101

DSTnox

75

TDSnox

102

DSx

76

SDTana

103

SDTSonox

77

SSTxDSxoxn

104

DSTDSonoxxn

78

TDSTxox

105

TDSxxn

79

TDSnoan

106

DTSax

80

TDna

107

TSDTSoaxxn

background image

ENWW

Printer-Specific Differences 2-21

Table 2-6. Logical Operations (ROP3) continued

Input Value

Boolean Function

Input Value

Boolean Function

108

SDTax

135

TDSaxn

109

TDSTDoaxxn

136

DSa

110

SDTSnoax

137

SDTSnaoxn

111

TDSxnan

138

DSTnoa

112

TDSana

139

DSTDxoxn

113

SSDxTDxaxn

140

SDTnoa

114

SDTSxox 141

SDTSxoxn

115

SDTnoan

142

SSDxTDxax

116

DSTDxox

143

TDSanan

117

DSTnoan

144

TDSxna

118

SDTSnaox

145

SDTSnoaxn

119

DSan 146

DTSDToaxx

120

TDSax

147

STDaxn

121

DSTDSoaxxn 148

TSDTSoaxx

122

DTSDnoax 149

DTSaxn

123

SDTxnan

150

DTSxx

124

STDSnoax

151

TSDTSonoxx

125

DTSxnan

152

SDTSonoxn

126

STxDSxo

153

DSxn

127

DTSaan

154

DTSoaxn

128

DTSaa

155

SDTSoaxn

129

STxDSxon

156

STDnax

130

DTSxna

157

DSTDoaxn

131

STDSnoaxn

158

DSTDSaoxx

132

SDTxna

159

TDSxan

133

TDSTnoaxn

160

DTa

134

DSTDSoaxx

161

TDSTnaoxn

background image

2-22 Printer-Specific Differences

ENWW

Table 2-6. Logical Operations (ROP3) continued

Input Value

Boolean Function

Input Value

Boolean Function

162

DTSnoa 189

SDxTDxan

163

DTSDxoxn 190

DTSxo

164

TDSTonoxn

191

DTSano

165

TDxn

192

TSa

166

DSTnax

193

STDSnaoxn

167

TDSToaxn

194

STDSonoxn

168

DTSoa

195

TSxn

169

DTSoxn

196

STDnoa

170

D

197

STDSxoxn

171

DTSono

198

SDTnax

172

STDSxax

199

TSDToaxn

173

DTSDaoxn

200

SDToa

174

DSTnao 201

STDoxn

175

DTno

202

DTSDxax

176

TDSnoa

203

STDSaoxn

177

TDSTxoxn

204

S

178

SSTxDSxox

205

SDTono

179

SDTanan

206

SDTnao

180

TSDnax

207

STno

181

DTSDoaxn

208

TSDnoa

182

DTSDTaoxx 209

TSDTxoxn

183

SDTxan

210

TDSnax

184

TSDTxax

211

STDSoaxn

185

DSTDaoxn

212

SSTxTDxax

186

DTSnao

213

DTSanan

187

DSno

214

TSDTSaoxx

188

STDSanax

215

DTSxan

background image

ENWW

Printer-Specific Differences 2-23

Table 2-6. Logical Operations (ROP3) continued

Input Value

Boolean Function

Input Value

Boolean Function

216

TDSTxax

236

SDTao

217

SDTSaoxn 237

SDTxno

218

DTSDanax 238

DSo

219

STxDSxan

239

SDTnoo

220

STDnao

240

T

221

SDno

241

TDSono

222

SDTxo 242

TDSnao

223

SDTano 243

TSno

224

TDSoa

244

TSDnao

225

TDSoxn

245

TDno

226

DSTDxax

246

TDSxo

227

TSDTaoxn

247

TDSano

228

SDTSxax

248

TDSao

229

TDSTaoxn

249

TDSxno

230

SDTSanax

250

DTo

231

STxTDxan

251

DTSnoo

232

SSTxDSxax

252

TSo

233

DSTDSanaxxn

253

TSDnoo

234

DTSao

254

DTSoo

235

DTSxno

255

1

background image

2-24 Printer-Specific Differences

ENWW