[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
The graPHIGS Programming Interface : Subroutine Reference
GPTHPO - Three Operand Pixel Operation
GPTHPO
(tibid,
torigin,
size,
sibid1,
sorigin1,
sibid2,
sorigin2,
op,
opparm) |
Purpose
Use
GPTHPO to produce pixel data by combining two pixels
on two image boards.
The operation performed to the pixel data is specified
by an operation type and accompanied operation dependent parameters.
All specified image boards must reside on the same
nucleus.
The specified target rectangle need not be inside of the target
image board; however,
two specified source rectangles must be inside of
each image board.
When the target rectangle exceeds the target image board
boundaries, pixel data outside the boundaries is discarded.
If source and target storage have different bit depth, source pixels
are adjusted to the target bit length by removing most significant
bits or adding 0-bit to the most significant part.
Parameters
tibid -- specified by user, fullword integer
Target image board identifier
torigin -- specified by user, two fullword integers
Target rectangle origin
(x,
y) (>=0)
size -- specified by user, two fullword integers
Rectangle size
(SX,
SY) (>=1)
sibid1 -- specified by user, fullword integer
First source image board identifier.
sorigin1 -- specified by user, two fullword integers
First source rectangle origin
(x,
y) (>=0)
sibid2 -- specified by user, fullword integer
Second source image board identifier.
sorigin2 -- specified by user, two fullword integers
Second source rectangle origin
(x,
y) (>=0)
op -- specified by user, fullword integer
Operation type
(1=LOGICAL, 2=ARITHMETIC
)
opparm -- specified by user,
array of fullword quantities
Operation-dependent parameters.
The
following operation types are defined and each of them requires
specified operation dependent parameters.
1
(LOGICAL_OPERATION
)
Perform a binary logical operation.
This operation requires a fullword integer specifying one
of the following logical operations:
1: 0
2: s1 AND s2
3: s1 AND (NOT s2)
4: s1
5: (NOT s1) AND s2
6: s2
7: s1 XOR s2
8: s1 OR s2
9: NOT (s1 OR s2)
10: NOT (s1 XOR s2)
11: NOT s2
12: s1 OR (NOT s2)
13: NOT s1
14: (NOT s1) OR s2
15: NOT (s1 AND s2)
16: 1
2 (ARITHMETIC_OPERATION
Performs a binary arithmetic operation.
This operation requires a fullword integer specifying one of
the following arithmetic operations:
1: Add with saturation
to 2**
n, where
n is a bit depth of
the target image board.
2: Subtract with saturation to 0
3: Minimum of two pixels
4: Maximum of two pixels
Error Codes
- 215
- SPECIFIED RESOURCES DO NOT EXIST ON THE SAME NUCLEUS
- 232
- SPECIFIED IMAGE BOARD DOES NOT EXIST
- 236
- RECTANGLE DEFINITION IS INVALID
- 239
- SPECIFIED THREE OPERAND OPERATION IS NOT SUPPORTED
Related Subroutines
None
RCP code
201346315
(X'0C004D0B')
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]