[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPHR - Set Hatch Representation

GPHR (wsid, hatch, format, length, data)

Purpose

Use GPHR to change a hatch pattern associated with a specific hatch index.

Some workstations require that the hatch fill be at a fixed size. For these workstations, the graPHIGS API replicates the The fixed sizes are a power of two. Therefore, specifying a hatch pattern with sizes that are a power of two produces the best results (i.e. no seams or discontinuity in the fill operation) See the Set Interior Style Index (GPISI) subroutine for the default hatch patterns in the workstation's hatch table.

Parameters

wsid -- specified by user, fullword integer

Workstation identifier.

hatch -- specified by user, fullword integer

Hatch table index (>=1)

format -- specified by user, fullword integer

Format (1=BIT_ARRAY )

length -- specified by user, fullword integer

Length of hatch pattern definition data in bytes.

data -- specified by user, variable data

Hatch pattern definition data.

1=BIT ARRAY

     -----------------
  0  |        x-size | fullword integer (number of columns)
     |---------------|
  4  |        y-size | fullword integer (number of rows)
     |---------------|
  8  |       pattern | bit array (array of unsigned characters)
     |               |
     -----------------

Note: The bit array must be in row order with each row beginning on a byte boundary. Therefore, the size of the bit array is ((x hyphen size plus 7) slash 8 % % asterisk y hyphen size) bytes.

Error Codes

25
SPECIFIED WORKSTATION DOES NOT EXIST
35
WORKSTATION HAS ONLY INPUT CAPABILITIES
47
HATCH INDEX EXCEEDS WORKSTATION TABLE CAPACITY
61
LENGTH IS INVALID
71
FIELD IN DEFINITION DATA IS INVALID
89
HATCH INDEX < ONE
274
THIS FUNCTION IS NOT SUPPORTED BY THE WORKSTATION
276
DEFINITION DATA FORMAT IS NOT SUPPORTED
277
DEFINITION DATA EXCEEDS THE WORKSTATION TABLE CAPACITY

Related Subroutines

GPIS
Set Interior Style
GPISI
Set Interior Style Index
GPQHF
Inquire Hatch Facilities
GPQHR
Inquire Hatch Representation

RCP code

201329421 (X'0C000B0D')


[ Previous | Next | Contents | Glossary | Home | Search ]