home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
vp21beta.zip
/
OAPIINF.RAR
/
VPGPI3.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
2000-09-07
|
849KB
|
20,198 lines
ΓòÉΓòÉΓòÉ 1. Data Types ΓòÉΓòÉΓòÉ
The following data types are used in Graphics Presentation Interface. They are
listed in alphabetic order.
ΓòÉΓòÉΓòÉ 1.1. ARCPARAMS ΓòÉΓòÉΓòÉ
Arc-parameters structure.
Type
ARCPARAMS = Record
lP: Long;
lQ: Long;
lR: Long;
lS: Long;
End;
Type
PARCPARAMS = ^ARCPARAMS;
ΓòÉΓòÉΓòÉ <hidden> ARCPARAMS Field - lP ΓòÉΓòÉΓòÉ
lP (LONG)
P coefficient.
ΓòÉΓòÉΓòÉ <hidden> ARCPARAMS Field - lQ ΓòÉΓòÉΓòÉ
lQ (LONG)
Q coefficient.
ΓòÉΓòÉΓòÉ <hidden> ARCPARAMS Field - lR ΓòÉΓòÉΓòÉ
lR (LONG)
R coefficient.
ΓòÉΓòÉΓòÉ <hidden> ARCPARAMS Field - lS ΓòÉΓòÉΓòÉ
lS (LONG)
S coefficient.
ΓòÉΓòÉΓòÉ 1.2. AREABUNDLE ΓòÉΓòÉΓòÉ
Area-attributes bundle structure.
Type
AREABUNDLE = Record
lColor: Long;
lBackColor: Long;
usMixMode: SmallWord;
usBackMixMode: SmallWord;
usSet: SmallWord;
usSymbol: SmallWord;
ptlRefPoint: PointL;
End;
Type
PAREABUNDLE = ^AREABUNDLE;
ΓòÉΓòÉΓòÉ <hidden> AREABUNDLE Field - lColor ΓòÉΓòÉΓòÉ
lColor (LONG)
Area foreground color.
ΓòÉΓòÉΓòÉ <hidden> AREABUNDLE Field - lBackColor ΓòÉΓòÉΓòÉ
lBackColor (LONG)
Area background color.
ΓòÉΓòÉΓòÉ <hidden> AREABUNDLE Field - usMixMode ΓòÉΓòÉΓòÉ
usMixMode (USHORT)
Area foreground-mix mode.
ΓòÉΓòÉΓòÉ <hidden> AREABUNDLE Field - usBackMixMode ΓòÉΓòÉΓòÉ
usBackMixMode (USHORT)
Area background-mix mode.
ΓòÉΓòÉΓòÉ <hidden> AREABUNDLE Field - usSet ΓòÉΓòÉΓòÉ
usSet (USHORT)
Pattern set.
ΓòÉΓòÉΓòÉ <hidden> AREABUNDLE Field - usSymbol ΓòÉΓòÉΓòÉ
usSymbol (USHORT)
Pattern symbol.
ΓòÉΓòÉΓòÉ <hidden> AREABUNDLE Field - ptlRefPoint ΓòÉΓòÉΓòÉ
ptlRefPoint (POINTL)
Pattern reference point.
ΓòÉΓòÉΓòÉ 1.3. BITMAPINFO ΓòÉΓòÉΓòÉ
Bit-map information structure.
Each bit plane logically contains (cx * cy * cBitCount) bits, although the
actual length can be greater because of padding.
See also BITMAPINFO2, which is preferred.
Type
BITMAPINFO = Record
cbFix: ULong;
cx: SmallWord;
cy: SmallWord;
cPlanes: SmallWord;
cBitCount: SmallWord;
argbColor: array[0..0] of RGB;
End;
Type
PBITMAPINFO = ^BITMAPINFO;
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO Field - cbFix ΓòÉΓòÉΓòÉ
cbFix (ULONG)
Length of fixed portion of structure.
This length can be determined using sizeof(BITMAPINFOHEADER).
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO Field - cx ΓòÉΓòÉΓòÉ
cx (USHORT)
Bit-map width in pels.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO Field - cy ΓòÉΓòÉΓòÉ
cy (USHORT)
Bit-map height in pels.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO Field - cPlanes ΓòÉΓòÉΓòÉ
cPlanes (USHORT)
Number of bit planes.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO Field - cBitCount ΓòÉΓòÉΓòÉ
cBitCount (USHORT)
Number of bits per pel within a plane.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO Field - argbColor[1] ΓòÉΓòÉΓòÉ
argbColor[1] (RGB)
Array of RGB values.
This is a packed array of 24-bit RGB values. If there are N bits per pel
(N =cPlanes * cBitCount), the array contains 2**N RGB values. However, if
N = 24, the bit map does not need the color color array because the
standard-format bit map, with 24 bits per pel, is assumed to contain RGB
values.
ΓòÉΓòÉΓòÉ 1.4. BITMAPINFO2 ΓòÉΓòÉΓòÉ
Bit-map information structure.
Each bit plane logically contains (cx * cy * cBitCount) bits, although the
actual length can be greater because of padding.
Note: Many functions can accept either this structure or the BITMAPINFO
structure. Where possible, BITMAPINFO2 should be used.
The cbFix field is used to find the color table, if any, that goes with the
information in this structure. A color table is an array of color (RGB2)
values. If there are N bits per pel (N = cPlanes * cBitCount), the array
contains 2**N color values. However, if N = 24, the color table is not required
(because the standard-format bit map, with 24 bits per pel, is assumed to
contain RGB values), unless either cclrUsed or cclrImportant is non-zero.
Type
BITMAPINFO2 = Record
cbFix: ULong; { Length of fixed portion of structure }
cx: ULong; { Bit-map width in pels }
cy: ULong; { Bit-map height in pels }
cPlanes: SmallWord;{ Number of bit planes }
cBitCount: SmallWord;{ Number of bits per pel within a plane }
ulCompression: ULong; { Compression scheme used to store the bitmap }
cbImage: ULong; { Length of bit-map storage data in bytes}
cxResolution: ULong; { x resolution of target device }
cyResolution: ULong; { y resolution of target device }
cclrUsed: ULong; { Number of color indices used }
cclrImportant: ULong; { Number of important color indices }
usUnits: SmallWord;{ Units of measure }
usReserved: SmallWord;{ Reserved }
usRecording: SmallWord;{ Recording algorithm }
usRendering: SmallWord;{ Halftoning algorithm }
cSize1: ULong; { Size value 1 }
cSize2: ULong; { Size value 2 }
ulColorEncoding: ULong; { Color encoding }
ulIdentifier: ULong; { Reserved for application use }
argbColor: array [0..0] of RGB2; { Color definition record }
End;
Type
PBITMAPINFO2 = ^BITMAPINFO2;
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - cbFix ΓòÉΓòÉΓòÉ
cbFix (ULONG)
Length of fixed portion of structure.
The structure can be truncated after cBitCount or any subsequent field.
The length does not include the length of the color table. Where the color
table is present, it is at an offset of cbFix from the start of the
BITMAPINFO2 structure.
This length can range from 16 (BITMAPINFOHEADER through field cBitCount) up
to sizeof(BITMAPINFOHEADER2) bytes.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - cx ΓòÉΓòÉΓòÉ
cx (ULONG)
Bit-map width in pels.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - cy ΓòÉΓòÉΓòÉ
cy (ULONG)
Bit-map height in pels.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - cPlanes ΓòÉΓòÉΓòÉ
cPlanes (USHORT)
Number of bit planes.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - cBitCount ΓòÉΓòÉΓòÉ
cBitCount (USHORT)
Number of bits per pel within a plane.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - ulCompression ΓòÉΓòÉΓòÉ
ulCompression (ULONG)
Compression scheme used to store the bit map.
BCA_UNCOMP
Bit map is uncompressed.
BCA_HUFFMAN1D
The bit map is compressed by a modified Huffman encoding. This is
valid for a bi-level (one bit per pel) bit map.
BCA_RLE4
The bit map is a 4-bit per pel run-length encoded bit map. See
the following section, "Format of Compressed Data," for a
description of the format of the compressed data.
BCA_RLE8
The bit map is an 8-bit per pel run-length encoded bit map. See
the following section, "Format of Compressed Data," for a
description of the format of the compressed data.
BCA_RLE24
The bit map is a 24-bit per pel run-length encoded bit map. See
the following section, "Format of Compressed Data," for a
description of the format of the compressed data.
Format of Compressed Data
Encoding a run length:
Run-length encoded bit maps are encoded in the buffer in a controlled
format. In all cases, if the first byte is non-zero, it is the length of a
run of pels of a particular color or, in the case of a BCA_RLE4 bit map, a
run of a length of pels of alternating colors.
1st-byte pel repetition count >= 1
2nd-4th bytes (BCA_RLE24 only) RGB value of pel.
2nd-byte (BCA_RLE8) color index of pel to be repeated
(BCA_RLE4) the second byte contains 2 4-bit
color indexes. The repetition count is
completed by alternately choosing the high-order
nibble followed by the low-order nibble for the
succeeding pels until the count is exhausted.
Unencoded run:
An unencoded run is a string of pels to be placed in consecutive positions
in the destination bit map.
1st-byte 0
2nd-byte COUNT = a multiple of 3 for BCA_RLE24 bit maps, or
COUNT >= 3 (for BCA_RLE4 and BCA_RLE8 bit maps).
followed by the bytes as follows:
BCA_RLE24
A string of bytes specifying the RGB color values of succeeding
pels. If COUNT is odd, it must be padded by a zero byte for an
even length overall.
BCA_RLE8
A string of bytes specifying color indexes for succeeding pels.
If COUNT is odd, it must be padded by a zero byte for an even
length overall.
BCA_RLE4
A string of bytes, each byte providing two color indexes, with
the high-order nibble specifying the index of the pel preceding
the low-order nibble. The COUNT specifies the number of indexes.
The overall length of the string must be an even number of bytes,
and thus may be padded with a zero byte, and the low order nibble
of the last significant byte may also be zero and not used.
Delta record:
A delta record indicates a shift in position in the destination bit map
before the next record is decoded.
1st-byte 0
2nd-byte 2
3rd-byte Delta-x (unsigned)
4th-byte Delta-y (unsigned)
This is a relative jump record. It implies that the next record is to be
decoded into a position in the destination bit map at an offset from the
current position, determined by changing the horizontal and vertical
positions by Delta-x and Delta-y, respectively.
End-of-line record:
The end-of-line record signifies that the data for the current scan line is
complete and that decoding of the next record should begin at the start of
the next scan line.
1st-byte 0
2nd-byte 0
End-of-RLE record:
The end-of-RLE record signifies the end of the data in the RLE compressed
bit map.
1st-byte 0
2nd-byte 1
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - cbImage ΓòÉΓòÉΓòÉ
cbImage (ULONG)
Length of bit-map storage data, in bytes.
If the bit map is uncompressed, zero (default) can be specified for this.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - cxResolution ΓòÉΓòÉΓòÉ
cxResolution (ULONG)
Horizontal component of the resolution of target device.
The resolution of the device the bit map is intended for, in the units
specified by usUnits. This information enables an application to select
from a resource group the bit map that best matches the characteristics of
the current output device.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - cyResolution ΓòÉΓòÉΓòÉ
cyResolution (ULONG)
Vertical component of the resolution of the target device.
See the description of cxResolution.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - cclrUsed ΓòÉΓòÉΓòÉ
cclrUsed (ULONG)
Number of color indexes used.
The number of color indexes from the color table that are used by the bit
map. If it is zero (the default), all the indexes are used. If it is
non-zero, only the first cclrUsed entries in the table are accessed by the
system, and further entries can be omitted.
For the standard formats with a cBitCount of 1, 4, or 8 (and cPlanes equal
to 1), any indexes beyond cclrUsed are not valid. For example, a bit map
with 64 colors can use the 8-bitcount format without having to supply the
other 192 entries in the color table. For the 24-bitcount standard format,
cclrUsed is the number of colors used by the bit map.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - cclrImportant ΓòÉΓòÉΓòÉ
cclrImportant (ULONG)
Minimum number of color indexes for satisfactory appearance of the bit map.
More colors may be used in the bit map, but it is not necessary to assign
them to the device palette. These additional colors may be mapped to the
nearest colors available.
Zero (the default) means that all entries are important.
For a 24-bitcount standard format bit map, the cclrImportant colors are
also listed in the color table following the BITMAPINFO2 structure.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - usUnits ΓòÉΓòÉΓòÉ
usUnits (USHORT)
Units of measure.
Units of measure of the horizontal and vertical components of resolution,
cxResolution and cyResolution.
BRU_METRIC Pels per meter. This is the default value.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - usReserved ΓòÉΓòÉΓòÉ
usReserved (USHORT)
Reserved.
This is a reserved field.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - usRecording ΓòÉΓòÉΓòÉ
usRecording (USHORT)
Recording algorithm.
The format in which the bit map data is recorded.
BRA_BOTTOMUP Scan lines are recorded bottom to top. This is the
default value.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - usRendering ΓòÉΓòÉΓòÉ
usRendering (USHORT)
Halftoning algorithm.
The algorithm used to record bit map data that has been digitally
halftoned.
BRH_NOTHALFTONED Bit-map data is not halftoned. This is the
default value.
BRH_ERRORDIFFUSION Error Diffusion or Damped Error Diffusion
algorithm.
BRH_PANDA Processing Algorithm for Non-coded Document
Acquisition.
BRH_SUPERCIRCLE Super Circle algorithm.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - cSize1 ΓòÉΓòÉΓòÉ
cSize1 (ULONG)
Size value 1.
If BRH_ERRORDIFFUSION is specified in usRendering, cSize1 is the error
damping as a percentage in the range 0 through 100. A value of 100%
indicates no damping, and a value of 0% indicates that any errors are not
diffused.
If BRH_PANDA or BRH_SUPERCIRCLE is specified, cSize1 is the x dimension of
the pattern used, in pels.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - cSize2 ΓòÉΓòÉΓòÉ
cSize2 (ULONG)
Size value 2.
If BRH_ERRORDIFFUSION is specified in usRendering, this parameter is
ignored.
If BRH_PANDA or BRH_SUPERCIRCLE is specified, cSize2 is the y dimension of
the pattern used, in pels.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - ulColorEncoding ΓòÉΓòÉΓòÉ
ulColorEncoding (ULONG)
Color encoding.
BCE_RGB Each element in the color array is an RGB2 datatype.
This is the default value.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - ulIdentifier ΓòÉΓòÉΓòÉ
ulIdentifier (ULONG)
Reserved for application use.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFO2 Field - argbColor[1] ΓòÉΓòÉΓòÉ
argbColor[1] (RGB2)
Array of RGB values.
This is a packed array of 24-bit RGB values. If there are N bits per pel
(N =cPlanes * cBitCount), the array contains 2**N RGB values. However, if
N = 24, the bit map does not need the color array because the
standard-format bit map, with 24 bits per pel, is assumed to contain RGB
values.
ΓòÉΓòÉΓòÉ 1.5. BITMAPINFOHEADER ΓòÉΓòÉΓòÉ
Bit-map information header structure.
Each bit plane logically contains (cx * cy * cBitCount) bits, although the
actual length can be greater because of padding.
See also BITMAPINFOHEADER2, which is preferred.
Type
BITMAPINFOHEADER = Record
cbFix: ULong;
cx: SmallWord;
cy: SmallWord;
cPlanes: SmallWord;
cBitCount: SmallWord;
End;
Type
PBITMAPINFOHEADER = ^BITMAPINFOHEADER;
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER Field - cbFix ΓòÉΓòÉΓòÉ
cbFix (ULONG)
Length of structure.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER Field - cx ΓòÉΓòÉΓòÉ
cx (USHORT)
Bit-map width in pels.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER Field - cy ΓòÉΓòÉΓòÉ
cy (USHORT)
Bit-map height in pels.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER Field - cPlanes ΓòÉΓòÉΓòÉ
cPlanes (USHORT)
Number of bit planes.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER Field - cBitCount ΓòÉΓòÉΓòÉ
cBitCount (USHORT)
Number of bits per pel within a plane.
ΓòÉΓòÉΓòÉ 1.6. BITMAPINFOHEADER2 ΓòÉΓòÉΓòÉ
Bit-map information header structure.
Each bit plane logically contains (cx * cy * cBitCount) bits, although the
actual length can be greater because of padding.
Note: Many functions can accept either this structure or the BITMAPINFOHEADER
structure. Where possible, use BITMAPINFOHEADER2.
Type
BITMAPINFOHEADER2 = Record
cbFix: ULong; { Length of structure }
cx: ULong; { Bit-map width in pels }
cy: ULong; { Bit-map height in pels }
cPlanes: SmallWord; { Number of bit planes }
cBitCount: SmallWord; { Number of bits per pel within a plane }
ulCompression: ULong; { Compression scheme used to store the bitmap }
cbImage: ULong; { Length of bit-map storage data in bytes}
cxResolution: ULong; { x resolution of target device }
cyResolution: ULong; { y resolution of target device }
cclrUsed: ULong; { Number of color indices used }
cclrImportant: ULong; { Number of important color indices }
usUnits: SmallWord; { Units of measure }
usReserved: SmallWord; { Reserved }
usRecording: SmallWord; { Recording algorithm }
usRendering: SmallWord; { Halftoning algorithm }
cSize1: ULong; { Size value 1 }
cSize2: ULong; { Size value 2 }
ulColorEncoding: ULong; { Color encoding }
ulIdentifier: ULong; { Reserved for application use }
End;
Type
PBITMAPINFOHEADER2 = ^BITMAPINFOHEADER2;
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - cbFix ΓòÉΓòÉΓòÉ
cbFix (ULONG)
Length of structure.
The structure can be truncated after cBitCount or any subsequent field.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - cx ΓòÉΓòÉΓòÉ
cx (ULONG)
Bit-map width in pels.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - cy ΓòÉΓòÉΓòÉ
cy (ULONG)
Bit-map height in pels.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - cPlanes ΓòÉΓòÉΓòÉ
cPlanes (USHORT)
Number of bit planes.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - cBitCount ΓòÉΓòÉΓòÉ
cBitCount (USHORT)
Number of bits per pel within a plane.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - ulCompression ΓòÉΓòÉΓòÉ
ulCompression (ULONG)
Compression scheme used to store the bit map.
BCA_UNCOMP
Bit map is uncompressed.
BCA_HUFFMAN1D
The bit map is compressed by a modified Huffman encoding. This is
valid for a bi-level (one bit per pel) bit map.
BCA_RLE4
The bit map is a 4-bit per pel run-length encoded bit map. See
the following section, "Format of Compressed Data," for a
description of the format of the compressed data.
BCA_RLE8
The bit map is an 8-bit per pel run-length encoded bit map. See
the following section, "Format of Compressed Data," for a
description of the format of the compressed data.
BCA_RLE24
The bit map is a 24-bit per pel run-length encoded bit map. See
the following section, "Format of Compressed Data," for a
description of the format of the compressed data.
Format of Compressed Data
Encoding a run length:
Run length encoded bit maps are encoded in the buffer in a controlled
format. In all cases, if the first byte is non-zero, it is the length of a
run of pels of a particular color or, in the case of a BCA_RLE4 bit map, a
run of a length of pels of alternating colors.
1st-byte pel repetition count >= 1
2nd-4th bytes (BCA_RLE24 only) RGB value of pel.
2nd-byte (BCA_RLE8) color index of pel to be repeated
(BCA_RLE4) the second byte contains 2 4-bit
color indexes. The repetition count is
completed by alternately choosing the high-order
nibble followed by the low-order nibble for the
succeeding pels until the count is exhausted.
Unencoded run:
An unencoded run is a string of pels to be placed in consecutive positions
in the destination bit map.
1st-byte 0
2nd-byte COUNT = a multiple of 3 for BCA_RLE24 bit maps, or
COUNT >= 3 (for BCA_RLE4 and BCA_RLE8 bit maps).
followed by the bytes as follows:
BCA_RLE24
A string of bytes specifying the RGB color values of succeeding
pels. If COUNT is odd, it must be padded by a zero byte for an
even length overall.
BCA_RLE8
A string of bytes specifying color indexes for succeeding pels.
If COUNT is odd, it must be padded by a zero byte for an even
length overall.
BCA_RLE4
A string of bytes, each byte providing two color indexes, with
the high-order nibble specifying the index of the pel preceding
the low-order nibble. The COUNT specifies the number of indexes.
The overall length of the string must be an even number of bytes,
and thus may be padded with a zero byte, and the low order nibble
of the last significant byte may also be zero and not used.
Delta record:
A delta record indicates a shift in position in the destination bit map
before the next record is decoded.
1st-byte 0
2nd-byte 2
3rd-byte Delta-x (unsigned)
4th-byte Delta-y (unsigned)
This is a relative jump record. It implies that the next record is to be
decoded into a position in the destination bit map at an offset from the
current position, determined by changing the horizontal and vertical
positions by Delta-x and Delta-y, respectively.
End-of-line record:
The end-of-line record signifies that the data for the current scan line is
complete and that decoding of the next record should begin at the start of
the next scan line.
1st-byte 0
2nd-byte 0
End-of-RLE record:
The end-of-RLE record signifies the end of the data in the RLE compressed
bit map.
1st-byte 0
2nd-byte 1
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - cbImage ΓòÉΓòÉΓòÉ
cbImage (ULONG)
Length of bit-map storage data, in bytes.
If the bit map is uncompressed, zero (the default) can be specified for
this.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - cxResolution ΓòÉΓòÉΓòÉ
cxResolution (ULONG)
Horizontal component of the resolution of target device.
The resolution of the device the bit map is intended for, in the units
specified by usUnits. This information enables applications to select from
a resource group the bit map that best matches the characteristics of the
current output device.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - cyResolution ΓòÉΓòÉΓòÉ
cyResolution (ULONG)
Vertical component of the resolution of target device.
See the description of cxResolution.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - cclrUsed ΓòÉΓòÉΓòÉ
cclrUsed (ULONG)
Number of color indexes used.
The number of color indexes from the color table that are used by the bit
map. If this is zero (the default), all the indexes are used. If it is
non-zero, only the first cclrUsed entries in the table are accessed by the
system, and further entries can be omitted.
For the standard formats with a cBitCount of 1, 4, or 8 (and cPlanes equal
to 1), any indexes beyond cclrUsed are invalid. For example, a bit map with
64 colors can use the 8-bitcount format without having to supply the other
192 entries in the color table. For the 24-bitcount standard format,
cclrUsed is the number of colors used by the bit map.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - cclrImportant ΓòÉΓòÉΓòÉ
cclrImportant (ULONG)
Minimum number of color indexes for satisfactory appearance of the bit map.
More colors may be used in the bit map, but it is not necessary to assign
them to the device palette. These additional colors may be mapped to the
nearest colors available.
Zero (the default) means that all entries are important.
For a 24-bitcount standard format bit map, the cclrImportant colors are
also listed in the color table relating to this bit map.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - usUnits ΓòÉΓòÉΓòÉ
usUnits (USHORT)
Units of measure.
Units of measure of the horizontal and vertical resolution, cxResolution
and cyResolution.
BRU_METRIC Pels per meter. This is the default value.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - usReserved ΓòÉΓòÉΓòÉ
usReserved (USHORT)
Reserved.
This is a reserved field. If present, it must be zero.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - usRecording ΓòÉΓòÉΓòÉ
usRecording (USHORT)
Recording algorithm.
The format in which the bit-map data is recorded.
BRA_BOTTOMUP Scan lines are recorded bottom to top. This is the
default value.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - usRendering ΓòÉΓòÉΓòÉ
usRendering (USHORT)
Halftoning algorithm.
The algorithm used to record bit-map data that has been digitally
halftoned.
BRH_NOTHALFTONED Bit-map data is not halftoned. This is the default value.
BRH_ERRORDIFFUSION Error Diffusion or Damped Error Diffusion algorithm.
BRH_PANDA Processing Algorithm for Non-coded Document Acquisition.
BRH_SUPERCIRCLE Super Circle algorithm.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - cSize1 ΓòÉΓòÉΓòÉ
cSize1 (ULONG)
Size value 1.
If BRH_ERRORDIFFUSION is specified in usRendering, cSize1 is the error
damping as a percentage in the range 0 through 100. A value of 100%
indicates no damping, and a value of 0% indicates that any errors are not
diffused.
If BRH_PANDA or BRH_SUPERCIRCLE is specified, cSize1 is the x dimension of
the pattern used, in pels.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - cSize2 ΓòÉΓòÉΓòÉ
cSize2 (ULONG)
Size value 2.
If BRH_ERRORDIFFUSION is specified in usRendering, this parameter is
ignored.
If BRH_PANDA or BRH_SUPERCIRCLE is specified, cSize2 is the y dimension of
the pattern used, in pels.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - ulColorEncoding ΓòÉΓòÉΓòÉ
ulColorEncoding (ULONG)
Color encoding.
BCE_RGB Each element in the color array is an RGB2 datatype. This is
the default value.
ΓòÉΓòÉΓòÉ <hidden> BITMAPINFOHEADER2 Field - ulIdentifier ΓòÉΓòÉΓòÉ
ulIdentifier (ULONG)
Reserved for application use.
ΓòÉΓòÉΓòÉ 1.7. BOOL ΓòÉΓòÉΓòÉ
Boolean.
Valid values are FALSE, which is 0, and TRUE, which is 1.
Type
BOOL = LONGBOOL;
ΓòÉΓòÉΓòÉ 1.8. BYTE ΓòÉΓòÉΓòÉ
A byte.
Type
Char = Char;
ΓòÉΓòÉΓòÉ 1.9. CHAR ΓòÉΓòÉΓòÉ
Single-byte character.
ΓòÉΓòÉΓòÉ 1.10. CHARBUNDLE ΓòÉΓòÉΓòÉ
Character-attributes bundle structure.
Type
CHARBUNDLE = Record
lColor: Long;
lBackColor: Long;
usMixMode: SmallWord;
usBackMixMode: SmallWord;
usSet: SmallWord;
usPrecision: SmallWord;
sizfxCell: SizeF;
ptlAngle: PointL;
ptlShear: PointL;
usDirection: SmallWord;
usTextAlign: SmallWord;
fxExtra: Fixed;
fxBreakExtra: Fixed;
End;
Type
PCHARBUNDLE = ^CHARBUNDLE;
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - lColor ΓòÉΓòÉΓòÉ
lColor (LONG)
Character foreground color.
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - lBackColor ΓòÉΓòÉΓòÉ
lBackColor (LONG)
Character background color.
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - usMixMode ΓòÉΓòÉΓòÉ
usMixMode (USHORT)
Character foreground-mix mode.
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - usBackMixMode ΓòÉΓòÉΓòÉ
usBackMixMode (USHORT)
Character background-mix mode.
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - usSet ΓòÉΓòÉΓòÉ
usSet (USHORT)
Character set.
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - usPrecision ΓòÉΓòÉΓòÉ
usPrecision (USHORT)
Character precision.
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - sizfxCell ΓòÉΓòÉΓòÉ
sizfxCell (SIZEF)
Character cell size.
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - ptlAngle ΓòÉΓòÉΓòÉ
ptlAngle (POINTL)
Character angle.
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - ptlShear ΓòÉΓòÉΓòÉ
ptlShear (POINTL)
Character shear.
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - usDirection ΓòÉΓòÉΓòÉ
usDirection (USHORT)
Character direction.
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - usTextAlign ΓòÉΓòÉΓòÉ
usTextAlign (USHORT)
Text alignment.
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - fxExtra ΓòÉΓòÉΓòÉ
fxExtra (FIXED)
Character extra.
ΓòÉΓòÉΓòÉ <hidden> CHARBUNDLE Field - fxBreakExtra ΓòÉΓòÉΓòÉ
fxBreakExtra (FIXED)
Character break extra.
ΓòÉΓòÉΓòÉ 1.11. CONVCONTEXT ΓòÉΓòÉΓòÉ
Dynamic-data-exchange conversation context structure.
Type
CONVCONTEXT = Record
cb: ULong; { SizeOf(ConvContext) }
fsContext: ULong;
idCountry: ULong;
usCodepage: ULong;
usLangID: ULong;
usSubLangID: ULong;
End;
Type
PCONVCONTEXT = ^CONVCONTEXT;
ΓòÉΓòÉΓòÉ <hidden> CONVCONTEXT Field - cb ΓòÉΓòÉΓòÉ
cb (ULONG)
Length of structure.
This must be set to the length of the CONVCONTEXT structure.
ΓòÉΓòÉΓòÉ <hidden> CONVCONTEXT Field - fsContext ΓòÉΓòÉΓòÉ
fsContext (ULONG)
Options.
DDECTXT_CASESENSITIVE
All strings in this conversation are case sensitive.
ΓòÉΓòÉΓòÉ <hidden> CONVCONTEXT Field - idCountry ΓòÉΓòÉΓòÉ
idCountry (ULONG)
Country code.
ΓòÉΓòÉΓòÉ <hidden> CONVCONTEXT Field - usCodepage ΓòÉΓòÉΓòÉ
usCodepage (ULONG)
Code-page identity.
ΓòÉΓòÉΓòÉ <hidden> CONVCONTEXT Field - usLangID ΓòÉΓòÉΓòÉ
usLangID (ULONG)
Language.
Zero is valid and means no language information.
ΓòÉΓòÉΓòÉ <hidden> CONVCONTEXT Field - usSubLangID ΓòÉΓòÉΓòÉ
usSubLangID (ULONG)
Sub-language.
Zero is valid and means no sub-language information.
ΓòÉΓòÉΓòÉ 1.12. DDEINIT ΓòÉΓòÉΓòÉ
Dynamic-data-exchange initiation structure.
Type
DDEINIT = Record
cb: ULong; { SizeOf(DdeInit) }
pszAppName: PChar;
pszTopic: PChar;
offConvContext: ULong;
End;
Type
PDDEINIT = ^DDEINIT;
ΓòÉΓòÉΓòÉ <hidden> DDEINIT Field - cb ΓòÉΓòÉΓòÉ
cb (ULONG)
Length of structure.
This must be set to the length of the DDEINIT structure.
ΓòÉΓòÉΓòÉ <hidden> DDEINIT Field - pszAppName ΓòÉΓòÉΓòÉ
pszAppName (PSZ)
Application name.
Pointer to name of the server application.
Application names must not contain slashes or backslashes. These characters
are reserved for future use in network implementations.
ΓòÉΓòÉΓòÉ <hidden> DDEINIT Field - pszTopic ΓòÉΓòÉΓòÉ
pszTopic (PSZ)
Topic.
Pointer to name of the topic.
ΓòÉΓòÉΓòÉ <hidden> DDEINIT Field - offConvContext ΓòÉΓòÉΓòÉ
offConvContext (ULONG)
Conversation context.
Offset to a CONVCONTEXT structure.
ΓòÉΓòÉΓòÉ 1.13. DDESTRUCT ΓòÉΓòÉΓòÉ
Dynamic-data-exchange control structure.
Type
DDESTRUCT = Record
cbData: ULong;
fsStatus: SmallWord;
usFormat: SmallWord;
offszItemName: SmallWord;
offabData: SmallWord;
End;
Type
PDDESTRUCT = ^DDESTRUCT;
DDE formats, specified in the usFormat parameter, are registered with the atom
manager, using the system atom table. The predefined DDE formats are
guaranteed not to conflict with the values returned by the atom manager.
Applications can define their own data formats; however, each nonstandard DDE
format must have a unique identification number. To receive an identification
number for a nonstardard format, the application must register the name of the
format in the system atom table. Other applications that have the name of the
format can then query the system atom table for the format's identification
number. This method ensures that all applications use the same atom to identify
a format.
ΓòÉΓòÉΓòÉ <hidden> DDESTRUCT Field - cbData ΓòÉΓòÉΓòÉ
cbData (ULONG)
Length of the data.
This is the length of data that occurs after the offabData parameter. If no
data exists, this field should contain a zero (0).
ΓòÉΓòÉΓòÉ <hidden> DDESTRUCT Field - fsStatus ΓòÉΓòÉΓòÉ
fsStatus (USHORT)
Status of the data exchange.
DDE_FACK
Positive acknowledgement
DDE_FBUSY
Application is busy
DDE_FNODATA
No data transfer for advise
DDE_FACKREQ
Acknowledgements are requested
DDE_FRESPONSE
Response to WM_DDE_REQUEST
DDE_NOTPROCESSED
DDE message not understood
DDE_FAPPSTATUS
A 1-byte field of bits that are reserved for application-specific
returns.
ΓòÉΓòÉΓòÉ <hidden> DDESTRUCT Field - usFormat ΓòÉΓòÉΓòÉ
usFormat (USHORT)
DDE data format.
This parameter can be set to one of the following values:
DDEFMT_TEXT
System-defined standard format for exchanging text data.
SZFMT_BITMAP
Specifies that the data is a bit map.
SZFMT_CPTEXT
Specifies text whose format is defined by a CPTEXT data structure.
Applications can use this format to pass multiple-language strings
without changing the conversation context.
SZFMT_DIF
Specifies that the data is in Data Image Format (DIF).
SZFMT_DSPBITMAP
Specifies that the data is a bit-map representation of a private
data format.
SZFMT_DSPMETAFILE
Specifies that the data is a metafile representation of a private
data format.
SZFMT_DSPMETAFILEPICT
Specifies that the data is a metafile picture representation of a
private data format.
SZFMT_DSPTEXT
Specifies that the data is a text representation of a private data
format.
SZFMT_LINK
Specifies that the data is in link-file format.
SZFMT_METAFILE
Specifies that the data is a metafile.
SZFMT_METAFILEPICT
Specifies that the data is a metafile picture defined by an MFP
data structure.
SZFMT_OEMTEXT
Specifies that the data is in OEM Text format.
SZFMT_PALETTE
Specifies that the data is in palette format.
SZFMT_SYLK
Specifies that the data is in Synchronous Link format.
SZFMT_TEXT
Specifies that the data is an array of text characters. These
characters can include new-line characters to indicate linebreaks.
The zero-length character indicates the end of the text data.
SZFMT_TIFF
Specifies that the data is in Tag Image File Format (TIFF).
ΓòÉΓòÉΓòÉ <hidden> DDESTRUCT Field - offszItemName ΓòÉΓòÉΓòÉ
offszItemName (USHORT)
Offset to item name.
This is the offset to the item name from the start of this structure. Item
name is a null (0x00) terminated string. If no item name exists, there must
be a single null (0x00) character in this position. (That is, ItemName is
ALWAYS a null terminated string.)
ΓòÉΓòÉΓòÉ <hidden> DDESTRUCT Field - offabData ΓòÉΓòÉΓòÉ
offabData (USHORT)
Offset to beginning of data.
This is the offset to the data, from the start of this structure. This
field should be calculated regardless of the presence of data. If no data
exists, cbData must be zero (0).
For compatibility reasons, this data should not contain embedded pointers.
Offsets should be used instead.
ΓòÉΓòÉΓòÉ 1.14. DEVOPENSTRUC ΓòÉΓòÉΓòÉ
Open-device data structure.
Type
DEVOPENSTRUC = Record
pszLogAddress: PChar;
pszDriverName: PChar;
pDriv: PDrivData;
pszDataType: PChar;
pszComment: PChar;
pszQueueProcName: PChar;
pszQueueProcParams: PChar;
pszSpoolerParams: PChar;
pszNetworkParams: PChar;
End;
Type
PDEVOPENSTRUC = ^DEVOPENSTRUC;
ΓòÉΓòÉΓòÉ <hidden> DEVOPENSTRUC Field - pszLogAddress ΓòÉΓòÉΓòÉ
pszLogAddress (PSZ)
Logical address.
This is required for an OD_DIRECT device being opened with DevOpenDC; it is
the logical device address, such as "LPT1" on OS/2. Some drivers may accept
a file name for this parameter or even a named pipe.
Where output is to be queued (for an OD_QUEUED device), this is the name of
the queue for the output device. The queue name can be a UNC name.
Note: This parameter can be a port name for a printer device context.
ΓòÉΓòÉΓòÉ <hidden> DEVOPENSTRUC Field - pszDriverName ΓòÉΓòÉΓòÉ
pszDriverName (PSZ)
Driver name.
Character string identifying the printer driver, for example, LASERJET. The
Default Device Driver field of the PRQINFO3 structure, associated with the
required print queue, gives the driver and device name, separated by a
period, for example LASERJET.HP LaserJet IIID. It can contain only the name
up to the period, for example LASERJET.
ΓòÉΓòÉΓòÉ <hidden> DEVOPENSTRUC Field - pdriv ΓòÉΓòÉΓòÉ
pdriv (PDRIVDATA)
Driver data.
Data that is to be passed directly to the PM device driver. Whether any of
this is required depends upon the device driver.
For printer device context, this is a pointer to the job properties data.
ΓòÉΓòÉΓòÉ <hidden> DEVOPENSTRUC Field - pszDataType ΓòÉΓòÉΓòÉ
pszDataType (PSZ)
Data type.
For an OD_QUEUED or OD_DIRECT device, this parameter defines the type of
data that is to be queued as follows:
PM_Q_STD Standard format
PM_Q_RAW Raw format
Note that a device driver can define other data types.
For OD_QUEUED or OD_DIRECT defice types, the default is supplied by the
device driver if pszDataType is not specified. For any other device type,
pszDataType is ignored.
ΓòÉΓòÉΓòÉ <hidden> DEVOPENSTRUC Field - pszComment ΓòÉΓòÉΓòÉ
pszComment (PSZ)
Comment.
Optional character string that the printer object displays to the user in a
job settings notebook. It is recommended that the application include its
own name in this comment string.
Note: The job title text is derived from the document name passed to
DevEscape (DEVESC_STARTDOC).
ΓòÉΓòÉΓòÉ <hidden> DEVOPENSTRUC Field - pszQueueProcName ΓòÉΓòÉΓòÉ
pszQueueProcName (PSZ)
Queue-processor name.
This is the name of the queue processor, for queued output, and is usually
the default.
ΓòÉΓòÉΓòÉ <hidden> DEVOPENSTRUC Field - pszQueueProcParams ΓòÉΓòÉΓòÉ
pszQueueProcParams (PSZ)
Queue-processor parameters.
Queue processor parameters (optional). They can include information such as
the number of copies you want to print and the size of the output area on
the printed page.
The first parameter (COP) is used for all spool-file formats. The remaining
parameters are valid for PM_Q_STD spool files only. Because PM_Q_STD data
are used mainly for graphic data, these parameters are described in
relation to the printing of picture files.
The PMPRINT/PMPLOT queue-processor parameters are separated by spaces and
are:
COP=n
The COP parameter specifies the number of copies of the spool file
that you want printed. The value of n must be an integer in the
range of 1 through 999.
The default is COP=1.
ARE=C | w,h,l,t
The ARE parameter determines the size and position of the output
area. This is the area of the physical page to which printing is
restricted.
The default value of ARE=C means that the output area is the whole
page. Note, however, that the printer cannot print outside its own
device clip limits.
To size and position the output area at a specific point on the
page, use ARE=w,h,l,t, where:
w, h are the width and height of the desired output
area.
l, t are the offsets of the upper-left corner of
the output area from the left (l) and from the
top (t) of the maximum output area.
These four values must be given as percentages of the maximum
output dimensions. The maximum output area is the area within the
device clip limits.
FIT=S | l,t
The FIT parameter determines which part of the picture is to be
printed. You can request the whole of the picture, scaled to fit
the output area; or you can position the picture (actual size)
anywhere within the output area. This could mean that the picture
is clipped at the boundaries of the output area.
The default value of FIT=S causes the output to be scaled until
the larger of the height or width just fits within the defined
output area. The aspect ratio of the picture is maintained.
To print the picture in actual size, use FIT=l,t, where l,t are
the coordinates of the point in the picture that you want
positioned at the center of the output area: l is measured from
the left edge of the picture; and t is measured from the top edge.
The coordinates must be given as percentages of the actual
dimensions of the picture.
XFM=0 | 1
The XFM parameter enables you to override the picture-positioning
and clipping instructions that are provided by the ARE and FIT
parameters, including their defaults.
The default value of XFM=1 allows the appearance of the output to
be determined by the settings of the ARE and FIT parameters.
A value of XFM=0 yields output as specified in the picture file.
For example, applications that use many different forms can define
different positions on each form for their output.
COL=M | C
The COL parameter enables you to specify color output if you have
a color printer.
A value of COL=M creates monochrome output (black foreground with
no background color). This is supported by all devices.
A value of COL=C creates color output. If you request color output
on a monochrome device, the printer presentation driver tries to
satisfy your request, which can cause problems because the only
color available is black. For example, if the picture file
specifies a red line on a blue background, both are drawn in
black.
The default is COL=M when you are addressing a monochrome printer
and COL=C when you are addressing a color printer.
MAP=N | A
The MAP parameter enables you to decide how the neutral colors
(those that are not specified in the picture file) are printed.
The default value of MAP=N yields a normal representation of the
screen picture on a printed page, which means that the page
background is white and the foreground is black.
A value of MAP=A provides the reverse of the normal
representation: the background is black and the foreground is
white on the printed page.
CDP=codepage
The CDP parameter overrides the codepage to being used for
PM_Q_RAW print jobs. The print queue driver uses DEVESC_SETMODE to
set the codepage, but not all printer drivers support this device
escape.
XLT=0 | 1
The XLT parameter can eliminate the translation component when
printing a metafile if XLT=1.
When the resolution of the device is higher than that of the world
coordinate space, a small translation of world coordinate point
(0,0) occurs on the device to preserve the accuracy of the mapping
from world to device coordinate units. For example, (0,0) becomes
(1,1) if there are 3 pels to every world coordinate.
Normally, this is not noticeable, but it can be a problem with
some devices. For example, in order to draw a complete row of 80
characters using a device font, a device may require the text to
start at device coordinate position zero. Starting at a position
other than zero may cause one or more characters at the end of the
row to be clipped. In such cases, elimination of the translation
is important and can be accomplished by specifying XLT=1.
The default is XLT=0.
ΓòÉΓòÉΓòÉ <hidden> DEVOPENSTRUC Field - pszSpoolerParams ΓòÉΓòÉΓòÉ
pszSpoolerParams (PSZ)
Spooler parameters.
Spooler parameters (optional) are separated by spaces. They are used for
scheduling print jobs and are as follows:
The form names that identify the paper to be used, for example,
FORM=A4,A5,ENV. The form names are optional; but if they are provided,
the spooler is able to hold off printing the jobs until the required
form is installed in the printer. If the form name is not provided,
the spooler attempts to print the job. The printer driver recognizes
that there is a forms problem and displays a FORMS MISMATCH message
box.
Priority of the print job, for example, PRTY=60. The priority is
specified as an integer in the range 1 through 99; 99 is the highest.
The default priority value is 50. The application can use the spooler
priority parameter to prioritize its own jobs; however, it is not good
practice for an application always to use priority 99 in an attempt to
get its jobs printed first.
ΓòÉΓòÉΓòÉ <hidden> DEVOPENSTRUC Field - pszNetworkParams ΓòÉΓòÉΓòÉ
pszNetworkParams (PSZ)
Network parameters.
Optional parameter that can be used to specify network options; for
example, USER=JOESMITH.
ΓòÉΓòÉΓòÉ 1.15. DRIVDATA ΓòÉΓòÉΓòÉ
Driver-data structure.
Type
DRIVDATA = Record
cb: Long;
lVersion: Long;
szDeviceName: array[0..31] of Char;
abGeneralData: Char;
End;
Type
PDRIVDATA = ^DRIVDATA;
ΓòÉΓòÉΓòÉ <hidden> DRIVDATA Field - cb ΓòÉΓòÉΓòÉ
cb (LONG)
Length.
The length of the structure.
ΓòÉΓòÉΓòÉ <hidden> DRIVDATA Field - lVersion ΓòÉΓòÉΓòÉ
lVersion (LONG)
Version.
The version number of the data. Version numbers are defined by particular
PM device drivers.
ΓòÉΓòÉΓòÉ <hidden> DRIVDATA Field - szDeviceName[32] ΓòÉΓòÉΓòÉ
szDeviceName[32] (CHAR)
Device name.
A string in a 32-byte field identifying the particular device (model
number, and so on). Again, valid values are defined by PM device drivers.
ΓòÉΓòÉΓòÉ <hidden> DRIVDATA Field - abGeneralData[1] ΓòÉΓòÉΓòÉ
abGeneralData[1] (CHAR)
General data.
Data as defined by the Presentation Manager device driver.
The data type of this field is defined by the Presentation Manager device
driver. It does not contain pointers, as these are not necessarily valid
when passed to the device driver.
ΓòÉΓòÉΓòÉ 1.16. ERRORID ΓòÉΓòÉΓòÉ
Error identity.
Type
ERRORID = ULONG;
ΓòÉΓòÉΓòÉ 1.17. ERRINFO ΓòÉΓòÉΓòÉ
Error-information structure.
Type
ERRINFO = Record
cbFixedErrInfo: ULong;
idError: ErrorId;
cDetailLevel: ULong;
offaoffszMsg: ULong;
offBinaryData: ULong;
End;
Type
PERRINFO = ^ERRINFO;
ΓòÉΓòÉΓòÉ <hidden> ERRINFO Field - cbFixedErrInfo ΓòÉΓòÉΓòÉ
cbFixedErrInfo (ULONG)
Length of fixed data to this structure.
ΓòÉΓòÉΓòÉ <hidden> ERRINFO Field - idError ΓòÉΓòÉΓòÉ
idError (ERRORID)
Error identity.
This is identical to the value returned by WinGetLastError.
ΓòÉΓòÉΓòÉ <hidden> ERRINFO Field - cDetailLevel ΓòÉΓòÉΓòÉ
cDetailLevel (ULONG)
Number of levels of detail.
This is the number of entries in the array of words pointed to by the
following field. One level of detail is provided.
ΓòÉΓòÉΓòÉ <hidden> ERRINFO Field - offaoffszMsg ΓòÉΓòÉΓòÉ
offaoffszMsg (ULONG)
Offset to the array of message offsets.
This is an offset to an array of 16-bit offsets to null-terminated strings.
Each string is a printable message that offers varying levels of
information. The first level is the least amount of detail, and the
remaining levels offer more and more detail.
The first level of detail is always an error message string, in the
following format:
xxxnnnns
where xxx is the product identifier
nnnn is the message number
s is the message severity letter
W = warning
E = error
S = severe error
U = unrecoverable
ΓòÉΓòÉΓòÉ <hidden> ERRINFO Field - offBinaryData ΓòÉΓòÉΓòÉ
offBinaryData (ULONG)
Offset to the binary data.
This can contain additional information relating to the error.
ΓòÉΓòÉΓòÉ 1.18. FACENAMEDESC ΓòÉΓòÉΓòÉ
Face-name description structure. See GpiQueryFaceString.
Type
FACENAMEDESC = Record
usSize: SmallWord;
usWeightClass: SmallWord;
usWidthClass: SmallWord;
usReserved: SmallWord;
flOptions: ULong;
End;
Type
PFACENAMEDESC = ^FACENAMEDESC;
ΓòÉΓòÉΓòÉ <hidden> FACENAMEDESC Field - usSize ΓòÉΓòÉΓòÉ
usSize (USHORT)
Length of structure.
ΓòÉΓòÉΓòÉ <hidden> FACENAMEDESC Field - usWeightClass ΓòÉΓòÉΓòÉ
usWeightClass (USHORT)
Weight class.
Indicates the visual weight (thickness of strokes) of the characters in the
font:
FWEIGHT_DONT_CARE
Any font weight satisfies the request.
FWEIGHT_ULTRA_LIGHT
Ultra-light.
FWEIGHT_EXTRA_LIGHT
Extra-light.
FWEIGHT_LIGHT
Light.
FWEIGHT_SEMI_LIGHT
Semi-light.
FWEIGHT_NORMAL
Medium (normal) weight.
FWEIGHT_SEMI_BOLD
Semi-bold.
FWEIGHT_BOLD
Bold.
FWEIGHT_EXTRA_BOLD
Extra-bold.
FWEIGHT_ULTRA_BOLD
Ultra-bold.
ΓòÉΓòÉΓòÉ <hidden> FACENAMEDESC Field - usWidthClass ΓòÉΓòÉΓòÉ
usWidthClass (USHORT)
Width class.
Indicates the relative aspect ratio of the characters of the font in
relation to the normal aspect ratio for this type of font:
FWIDTH_DONT_CARE
Any font width satisfies the request.
FWIDTH_ULTRA_CONDENSED
Ultra-condensed (50% of normal).
FWIDTH_EXTRA_CONDENSED
Extra-condensed (62.5% of normal).
FWIDTH_CONDENSED
Condensed (75% of normal).
FWIDTH_SEMI_CONDENSED
Semi-condensed (87.5% of normal).
FWIDTH_NORMAL
Medium (normal).
FWIDTH_SEMI_EXPANDED
Semi-expanded (112.5% of normal).
FWIDTH_EXPANDED
Expanded (125% of normal).
FWIDTH_EXTRA_EXPANDED
Extra-expanded (150% of normal).
FWIDTH_ULTRA_EXPANDED
Ultra-expanded (200% of normal).
ΓòÉΓòÉΓòÉ <hidden> FACENAMEDESC Field - usReserved ΓòÉΓòÉΓòÉ
usReserved (USHORT)
Reserved.
ΓòÉΓòÉΓòÉ <hidden> FACENAMEDESC Field - flOptions ΓòÉΓòÉΓòÉ
flOptions (ULONG)
Other characteristics of the font.
FTYPE_ITALIC
Italic font required. If not specified,
non-italic font required.
FTYPE_ITALIC_DONT_CARE
Italic and non-italic fonts can satisfy the
request. If this option is specified,
FTYPE_ITALIC is ignored.
FTYPE_OBLIQUE
Oblique font required. If not specified,
non-oblique font required.
FTYPE_OBLIQUE_DONT_CARE
Oblique and non-oblique fonts can satisfy
the request. If this option is specified,
FTYPE_OBLIQUE is ignored.
FTYPE_ROUNDED
Rounded font required. If not specified,
non-rounded font required.
FTYPE_ROUNDED_DONT_CARE
Rounded and non-rounded fonts can satisfy
the request. If this option is specified,
FTYPE_ROUNDED is ignored.
ΓòÉΓòÉΓòÉ 1.19. FATTRS ΓòÉΓòÉΓòÉ
Font-attributes structure.
Type
FATTRS = Record
usRecordLength: Word;
fsSelection: Word;
lMatch: Long;
szFacename: array [0..FACESIZE-1] of Char;
idRegistry: Word;
usCodePage: Word;
lMaxBaselineExt: Long;
lAveCharWidth: Long;
fsType: Word;
fsFontUse: Word;
End;
Type
PFATTRS = ^FATTRS;
ΓòÉΓòÉΓòÉ <hidden> FATTRS Field - usRecordLength ΓòÉΓòÉΓòÉ
usRecordLength (USHORT)
Length of record.
ΓòÉΓòÉΓòÉ <hidden> FATTRS Field - fsSelection ΓòÉΓòÉΓòÉ
fsSelection (USHORT)
Selection indicators.
Flags causing the following features to be simulated by the system.
Note: If an italic flag is applied to a font that is itself defined as
italic, the font is slanted further by italic simulation.
Underscore or strikeout lines are drawn using the appropriate attributes
(for example, color) from the character bundle (see the CHARBUNDLE
datatype), not the line bundle (see LINEBUNDLE). The width of the line, and
the vertical position of the line in font space, are determined by the
font. Horizontally, the line starts from a point in font space directly
above or below the start point of each character, and extends to a point
directly above or below the escapement point for that character.
For this purpose, the start and escapement points are those applicable to
left-to-right or right-to-left character directions (see
GpiSetCharDirection in Graphics Programming Interface Programming
Reference), even if the string is currently being drawn in a top-to-bottom
or bottom-to-top direction.
For left-to-right or right-to-left directions, any white space generated by
the character extra and character break extra attributes (see
GpiSetCharExtra and GpiSetCharBreakExtra in Graphics Programming Interface
Programming Reference), as well as increments provided by the vector of
increments on GpiCharStringPos and GpiCharStringPosAt, are also
underlined/overstruck, so that in these cases the line is continuous for
the string.
FATTR_SEL_ITALIC Generate italic font.
FATTR_SEL_UNDERSCORE Generate underscored font.
FATTR_SEL_BOLD Generate bold font. (Note that the
resulting characters are wider than
those in the original font.)
FATTR_SEL_STRIKEOUT Generate font with overstruck
characters.
FATTR_SEL_OUTLINE Use an outline font with hollow
characters. If this flag is not set,
outline font characters are filled.
Setting this flag normally gives better
performance, and for sufficiently small
characters (depending on device
resolution) there may be little visual
difference.
ΓòÉΓòÉΓòÉ <hidden> FATTRS Field - lMatch ΓòÉΓòÉΓòÉ
lMatch (LONG)
Matched-font identity.
ΓòÉΓòÉΓòÉ <hidden> FATTRS Field - szFacename[FACESIZE] ΓòÉΓòÉΓòÉ
szFacename[FACESIZE] (CHAR)
Typeface name.
The typeface name of the font, for example, Tms Rmn.
ΓòÉΓòÉΓòÉ <hidden> FATTRS Field - idRegistry ΓòÉΓòÉΓòÉ
idRegistry (USHORT)
Registry identifier.
Font registry identifier (zero if unknown).
ΓòÉΓòÉΓòÉ <hidden> FATTRS Field - usCodePage ΓòÉΓòÉΓòÉ
usCodePage (USHORT)
Code page.
If zero, the current Gpi code page (see GpiSetCp in Graphics Programming
Interface Programming Reference) is used. A subsequent GpiSetCp function
changes the code page used for this logical font.
ΓòÉΓòÉΓòÉ <hidden> FATTRS Field - lMaxBaselineExt ΓòÉΓòÉΓòÉ
lMaxBaselineExt (LONG)
Maximum baseline extension.
For raster fonts, this should be the height of the required font, in world
coordinates.
For outline fonts, this should be zero.
ΓòÉΓòÉΓòÉ <hidden> FATTRS Field - lAveCharWidth ΓòÉΓòÉΓòÉ
lAveCharWidth (LONG)
Average character width.
For raster fonts, this should be the width of the required font, in world
coordinates.
For outline fonts, this should be zero.
ΓòÉΓòÉΓòÉ <hidden> FATTRS Field - fsType ΓòÉΓòÉΓòÉ
fsType (USHORT)
Type indicators.
FATTR_TYPE_KERNING Enable kerning (PostScript only).
FATTR_TYPE_MBCS Font for mixed single- and double-byte
code pages.
FATTR_TYPE_DBCS Font for double-byte code pages.
FATTR_TYPE_ANTIALIASED Antialiased font required. Only valid if
supported by the device driver.
ΓòÉΓòÉΓòÉ <hidden> FATTRS Field - fsFontUse ΓòÉΓòÉΓòÉ
fsFontUse (USHORT)
Font-use indicators.
These flags indicate how the font is to be used. They affect presentation
speed and font quality.
FATTR_FONTUSE_NOMIX
Text is not mixed with graphics and can be
written without regard to any interaction
with graphics objects.
FATTR_FONTUSE_OUTLINE
Select an outline (vector) font. The font
characters can be used as part of a path
definition. If this flag is not set, an
outline font might or might not be selected.
If an outline font is selected, however,
character widths are rounded to an integral
number of pels.
FATTR_FONTUSE_TRANSFORMABLE
Characters can be transformed (for example,
scaled, rotated, or sheared).
ΓòÉΓòÉΓòÉ 1.20. FIXED ΓòÉΓòÉΓòÉ
Signed-integer fraction (16:16). This can be treated as a LONG where the value
has been multiplied by 65 536.
Type
FIXED = LONG;
ΓòÉΓòÉΓòÉ 1.21. FFDESCS ΓòÉΓòÉΓòÉ
Font-file descriptor.
Not defined.
ΓòÉΓòÉΓòÉ 1.22. FFDESCS2 ΓòÉΓòÉΓòÉ
Font-file descriptor.
Type
FFDESCS2 = Record
cbLength: ULong;
cbFacenameOffset: ULong;
abFamilyName: array[0..0] of Byte;
End;
Type ^FFDESCS2 - Not defined.
ΓòÉΓòÉΓòÉ <hidden> FFDESCS2 Field - cbLength ΓòÉΓòÉΓòÉ
cbLength (ULONG)
Structure length.
cbLength is the overall length of the FFDESCS2 structure. It is always
rounded up to a multiple of four.
ΓòÉΓòÉΓòÉ <hidden> FFDESCS2 Field - cbFacenameOffset ΓòÉΓòÉΓòÉ
cbFacenameOffset (ULONG)
Offset of Facename in the structure.
The facename is a null terminated string. It starts at cbFacenameOffset
bytes offset into FFDESCS2.
ΓòÉΓòÉΓòÉ <hidden> FFDESCS2 Field - abFamilyName[1] ΓòÉΓòÉΓòÉ
abFamilyName[1] (BYTE)
Family name.
abFamilyName is a null terminated string.
ΓòÉΓòÉΓòÉ 1.23. FOCAMETRICS ΓòÉΓòÉΓòÉ
FOCAMETRICS data structure.
This structure is returned to applications on the GPIQueryFonts and
GPIQueryFontMetrics calls and conveys information from the font creator to the
application.
FOCAMETRICS - Not defined.
^PFOCAMETRICS - Not defined.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - ulIdentity ΓòÉΓòÉΓòÉ
ulIdentity (ULONG)
Structure identity code.
Value must be one (1). This field is not part of the FONTMETRICS structure.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - ulSize ΓòÉΓòÉΓòÉ
ulSize (ULONG)
Structure size in bytes.
This must be set to the size of the FOCAMETRICS structure. This field is
not part of the FONTMETRICS structure.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - szFamilyname[32] ΓòÉΓòÉΓòÉ
szFamilyname[32] (CHAR)
Font family name.
The family name defines the basic appearance of the font; for example,
"Times New Roman."** This string is null terminated and is, therefore,
limited to 32 characters in length.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - szFacename[32] ΓòÉΓòÉΓòÉ
szFacename[32] (CHAR)
Face name. The typeface name defines the particular font; for example,
"Times New Roman Bold Italic."** This string is null terminated and is,
therefore, limited to 32 characters in length.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usRegistryId ΓòÉΓòÉΓòÉ
usRegistryId (SHORT)
Registry identifier.
The IBM registered number (or zero).
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usCodePage ΓòÉΓòÉΓòÉ
usCodePage (USHORT)
Code page supported by the font.
Defines the registered code page supported by the font. A value of zero (0)
implies that the font may be used with any of the code pages supported by
OS/2.
When a font contains special symbols for which there is no registered code
page, then code page 65400 is used.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yEmHeight ΓòÉΓòÉΓòÉ
yEmHeight (SHORT)
Em height.
The height of the Em square in world coordinate units. This height
corresponds to the point size for the font.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yXHeight ΓòÉΓòÉΓòÉ
yXHeight (SHORT)
X height.
The nominal height above the baseline for lowercase characters (ignoring
ascenders), in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yMaxAscender ΓòÉΓòÉΓòÉ
yMaxAscender (SHORT)
Maximum ascender.
The maximum height above the baseline reached by any part of any symbol in
the font, in world coordinate units. This field may exceed yEmHeight.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yMaxDescender ΓòÉΓòÉΓòÉ
yMaxDescender (SHORT)
Maximum descender.
The maximum depth below the baseline reached by any part of any symbol in
the font, in world coordinate units. This field may exceed yEmHeight.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yLowerCaseAscent ΓòÉΓòÉΓòÉ
yLowerCaseAscent (SHORT)
Lowercase ascent.
The maximum height above the baseline reached by any part of any lowercase
(Latin unaccented ' a ' through ' z ') symbol in the font, in world
coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yLowerCaseDescent ΓòÉΓòÉΓòÉ
yLowerCaseDescent (SHORT)
Lowercase descent.
The maximum depth below the baseline reached by any part of any lowercase
(Latin unaccented ' a ' through ' z ') symbol in the font, in world
coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yInternalLeading ΓòÉΓòÉΓòÉ
yInternalLeading (SHORT)
Internal leading.
The amount of space which, when subtracted from yMaxAscender, gives a
measure of the distance above the baseline that characters extend. This
measure is font-design dependent, but glyph-set independent. Therefore,
this calculation approximates the visual top to a row of characters without
actually looking at the characters in the row.
It is recommended that applications use this field to position the first
line of a block of text by subtracting yInternalLeading from yMaxAscender.
Then position the baseline that distance below the preceding information
(text or graphic element).
Note: This use does not guarantee that characters will not overwrite those
above them; it does give a font designer's view of where to place
the text. Collision should be tested for and additional space
allocated if necessary.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yExternalLeading ΓòÉΓòÉΓòÉ
yExternalLeading (SHORT)
External leading.
The amount of guaranteed white space advised by the font designer to appear
between adjacent rows of text. This value may be zero (0).
Note: The fonts built into Presentation Manager have zero (0) in this
field.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - xAveCharWidth ΓòÉΓòÉΓòÉ
xAveCharWidth (SHORT)
Average character width.
This is determined by multiplying the width of each lowercase character by
a constant, adding the products, and then dividing by 1000. The letters,
plus their constants, are listed below:
Letter Constant
a 64
b 14
c 27
d 35
e 100
f 20
g 14
h 42
i 63
j 3
k 6
l 35
m 20
n 56
o 56
p 17
q 4
r 49
s 56
t 71
u 31
v 10
w 18
x 3
y 18
z 2
space 166
Note: For fixed pitch fonts, this value will be the same as
the (A width + B width + C width) escapement of each
character.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - xMaxCharInc ΓòÉΓòÉΓòÉ
xMaxCharInc (SHORT)
Maximum character increment.
The maximum character increment for the font, in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - xEmInc ΓòÉΓòÉΓòÉ
xEmInc (SHORT)
Em increment.
The width of the Em square in world coordinate units. This width
corresponds to the point size of the font. When the horizontal device
resolution equals the vertical device resolution, width is equal to the em
height.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yMaxBaselineExt ΓòÉΓòÉΓòÉ
yMaxBaselineExt (SHORT)
Maximum baseline extent.
The maximum vertical space occupied by the font, in world coordinate units.
This space is the sum of yMaxAscender and yMaxDescender if both are
positive. It is also the sum of yInternalLeading and yEmHeight.
One possible line spacing can be computed by adding yMaxBaselineExt to
yInternalLeading. Such a line spacing, however, would be dependent on the
glyph set included in the font. If a new version of the font is made
available with new glyphs, then it is possible that this value will change
because one of the new glyphs has gone above the previous yMaxAscender or
below the previous yMaxDescender. More sophisticated applications will base
their line spacing on the point size (yEmHeight) of the font, which is an
invariant of the font, multiplied by some factor (for example, 120%), plus
any external leading.
yMaxBaselineExt may exceed yEmHeight.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - sCharSlope ΓòÉΓòÉΓòÉ
sCharSlope (SHORT)
Character slope.
Defines the nominal slope of the characters of a font. The slope is defined
in degrees, increasing clockwise from the vertical. An italic font is an
example of a font with a nonzero slope.
Note: The units for this metric are degrees and minutes, encoded as shown
in the following example.
180 degrees 59 minutes would be represented as:
Γöé < byte 1 > Γöé < byte 2 > Γöé
Γöé Γöé < Minutes > Γöé < Degrees > Γöé
Γöé0Γöé1 1 1 0 1 1 Γöé0 1 0 1 1 0 1 0 0Γöé
Γöé 59 min Γöé 180 degrees Γöé
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - sInlineDir ΓòÉΓòÉΓòÉ
sInlineDir (SHORT)
Inline direction.
The direction in which the characters in the font are designed for viewing.
Shown in degrees, increasing clockwise from the horizontal (left-to-right).
Characters are added to a line of text in the inline direction.
Note: The units for this metric are degrees and minutes, encoded as shown
in sCharSlope.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - sCharRot ΓòÉΓòÉΓòÉ
sCharRot (SHORT)
Character rotation.
The rotation of the character glyphs with respect to the baseline, the
angle increasing counterclockwise. This is the angle assigned by the font
designer.
Note: The units for this metric are degrees and minutes, encoded as shown
in sCharSlope.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usWeightClass ΓòÉΓòÉΓòÉ
usWeightClass (USHORT)
Weight class.
Indicates the visual weight (thickness of strokes) of the characters in the
font:
Value Description
1000 Ultra-light
2000 Extra-light
3000 Light
4000 Semi-light
5000 Medium (normal)
6000 Semi-bold
7000 Bold
8000 Extra-bold
9000 Ultra-bold
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usWidthClass ΓòÉΓòÉΓòÉ
usWidthClass (USHORT)
Width class.
Indicates the relative aspect ratio of the font characters in relation to
the normal aspect ratio for this type of font:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéValue ΓöéDescription Γöé% of Normal Γöé
Γöé Γöé ΓöéWidth Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé1000 ΓöéUltra-condensed Γöé50 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé2000 ΓöéExtra-condensed Γöé62.5 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé3000 ΓöéCondensed Γöé75 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé4000 ΓöéSemi-condensed Γöé87.5 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé5000 ΓöéMedium (normal) Γöé100 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé6000 ΓöéSemi-expanded Γöé112.5 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé7000 ΓöéExpanded Γöé125 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé8000 ΓöéExtra-expanded Γöé150 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé9000 ΓöéUltra-expanded Γöé200 Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - xDeviceRes ΓòÉΓòÉΓòÉ
xDeviceRes (SHORT)
X-device resolution.
For bit-map fonts, this is the resolution in the X direction of the
intended target device, measured in pels per inch.
For outline fonts, this is the number of notional units in the X direction
of the Em square, measured in notional units per Em. (Notional units are
the units in which the outline is defined.)
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yDeviceRes ΓòÉΓòÉΓòÉ
yDeviceRes (SHORT)
Y-device resolution.
For bit-map fonts, this is the resolution in the Y direction of the
intended target device, measured in pels per inch.
For outline fonts, this is the number of notional units in the Y direction
of the Em square, measured in notional units per Em. (Notional units are
the units in which the outline is defined.)
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usFirstChar ΓòÉΓòÉΓòÉ
usFirstChar (SHORT)
First character.
The code point of the first character in the font.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usLastChar ΓòÉΓòÉΓòÉ
usLastChar (SHORT)
Last character.
The code point of the last character in the font, expressed as an offset
from usFirstChar.
All code points between the first and last character specified must be
supported by the font.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usDefaultChar ΓòÉΓòÉΓòÉ
usDefaultChar (SHORT)
Default character.
The code point that is used if a code point outside the range supported by
the font is used, expressed as an offset from usFirstChar.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usBreakChar ΓòÉΓòÉΓòÉ
usBreakChar (SHORT)
Break character.
The code point that represents the "space" or "break" character for this
font, expressed as an offset from usFirstChar. For example, if the first
character is the space in code page 850, usFirstChar = 32, and usBreakChar
= 0.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usNominalPointSize ΓòÉΓòÉΓòÉ
usNominalPointSize (SHORT)
Nominal point size.
For a bit-map font, this field contains the height of the font.
For an outline font, this field contains the height that the font designer
intended for this font. For example, some fonts are designed for text use,
in which case a value of 120 (12 point) would probably be placed in this
field. Other fonts are designed for "display" use ("display" is a
typographer's term for larger point sizes). This is not the only size at
which the font can be used.
Measured in decipoints (a decipoint is 1/720th of an inch).
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usMinimumPointSize ΓòÉΓòÉΓòÉ
usMinimumPointSize (SHORT)
Minimum point size.
For a bit-map font, this field is not applicable.
For an outline font, this field contains the minimum height that the font
designer intended for this font. Note that this is not a restriction on the
size at which the font can be used.
Measured in decipoints (a decipoint is 1/720th of an inch).
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usMaximumPointSize ΓòÉΓòÉΓòÉ
usMaximumPointSize (SHORT)
Maximum point size.
For a bit-map font, this field is not applicable.
For an outline font, this field contains the maximum height that the font
designer intended for this font. Note that this is not a restriction on the
size at which the font can be used.
Measured in decipoints (a decipoint is 1/720th of an inch).
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usTypeFlags ΓòÉΓòÉΓòÉ
usTypeFlags (SHORT)
Type indicators.
These flags contain the following information:
FM_TYPE_FIXED Characters in the font have the same fixed
width.
FM_TYPE_LICENSED Licensed (protected) font.
FM_TYPE_KERNING Font contains kerning information.
FM_TYPE_64K Font is larger than 64KB (KB equals 1024
bytes) in size. Only one of the following
bits (FM_TYPE_DBCS or FM_TYPE_MCBS) may be
set. If both of those bits are false (not
set), the font is for single-byte code pages.
FM_TYPE_DBCS Font is for double-byte code pages.
FM_TYPE_MBCS Font is for mixed single- and double-byte
code pages.
FM_TYPE_FACETRUNC Font szFacename[32] has been truncated.
FM_TYPE_FAMTRUNC Font szFamilyname[32] has been truncated.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - fsDefn ΓòÉΓòÉΓòÉ
fsDefn (SHORT)
Definition indicators.
These indicators contain the following font definition data:
FM_DEFN_OUTLINE Font is a vector (outline) font; otherwise,
it is a bit map font.
FM_DEFN_GENERIC Font is in a format that can be used by the
GPI; otherwise, it is a device font.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - fsSelectionFlags ΓòÉΓòÉΓòÉ
fsSelectionFlags (SHORT)
Selection indicators.
These indicators contain information about the font patterns in the
physical font.
Note: The flags do not reflect simulations applied to the physical font.
FM_SEL_ITALIC TRUE indicates that this font is designed as
an italic font.
FM_SEL_UNDERSCORE TRUE indicates that this font is designed
with underscores included in each character.
FM_SEL_NEGATIVE TRUE indicates that this font is designed
with the background and foreground reversed.
FM_SEL_OUTLINE TRUE indicates that this font is designed
with outline (hollow) characters.
FM_SEL_STRIKEOUT TRUE indicates that this font is designed
with an overstrike through each character.
FM_SEL_BOLD TRUE indicates that this font is designed
with bold characters.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - fsCapabilities ΓòÉΓòÉΓòÉ
fsCapabilities (SHORT)
Capabilities.
This attribute applies only to device fonts.
FM_CAP_NOMIX Characters may not be mixed with graphics.
QUALITY The most significant byte may contain the following
numeric value:
0 Undefined
1 DP quality
2 DP draft
3 Near Letter Quality
4 Letter Quality
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - ySubscriptXSize ΓòÉΓòÉΓòÉ
ySubscriptXSize (SHORT)
Subscript X-size.
The recommended horizontal point size for subscripts for this font, in
world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - ySubscriptYSize ΓòÉΓòÉΓòÉ
ySubscriptYSize (SHORT)
Subscript Y-size.
The recommended vertical point size for subscripts for this font, in world
coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - ySubscriptXOffset ΓòÉΓòÉΓòÉ
ySubscriptXOffset (SHORT)
Subscript X-offset.
The recommended baseline X-offset for subscripts for this font, in world
coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - ySubscriptYOffset ΓòÉΓòÉΓòÉ
ySubscriptYOffset (SHORT)
Subscript Y-offset.
The recommended baseline Y-offset for subscripts for this font, in world
coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - ySuperscriptXSize ΓòÉΓòÉΓòÉ
ySuperscriptXSize (SHORT)
Superscript X-size.
The recommended horizontal point size for superscripts for this font, in
world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - ySuperscriptYSize ΓòÉΓòÉΓòÉ
ySuperscriptYSize (SHORT)
Superscript Y-size.
The recommended vertical point size for superscripts for this font, in
world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - ySuperscriptXOffset ΓòÉΓòÉΓòÉ
ySuperscriptXOffset (SHORT)
Superscript X-offset.
The recommended baseline X-offset for superscripts for this font, in world
coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - ySuperscriptYOffset ΓòÉΓòÉΓòÉ
ySuperscriptYOffset (SHORT)
Superscript Y-offset.
The recommended baseline Y-offset for superscripts for this font, in world
coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yUnderscoreSize ΓòÉΓòÉΓòÉ
yUnderscoreSize (SHORT)
Underscore size.
The width (thickness) of the underscore stroke, in world coordinate units.
This describes the actual underscore in the font if FM_SEL_UNDERSCORE is
also set. Otherwise, it describes what the graphics engine will simulate if
underscore is requested in GpiCreateLogFont.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yUnderscorePosition ΓòÉΓòÉΓòÉ
yUnderscorePosition (SHORT)
Underscore position.
The position of the underscore stroke from the baseline, in world
coordinate units. This value describes the actual underscore in the font if
FM_SEL_UNDERSCORE is also set. Otherwise, it describes what the graphics
engine will simulate if underscore is requested in GpiCreateLogFont.
Note: Positive values mean below the baseline.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yStrikeoutSize ΓòÉΓòÉΓòÉ
yStrikeoutSize (SHORT)
Strikeout size.
The width of the strikeout stroke, in world coordinate units. This value
describes the actual strikeout in the font if FM_SEL_STRIKEOUT is also set.
Otherwise, it describes what the graphics engine will simulate if
overstrike is requested in GpiCreateLogFont.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yStrikeoutPosition ΓòÉΓòÉΓòÉ
yStrikeoutPosition (SHORT)
Strikeout position.
The position of the strikeout stroke relative to the baseline, in world
coordinate units. This value describes the actual strikeout in the font if
FM_SEL_STRIKEOUT is also set. Otherwise, it describes what the graphics
engine will simulate if overstrike is requested in GpiCreateLogFont.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usKerningPairs ΓòÉΓòÉΓòÉ
usKerningPairs (SHORT)
Kerning pairs.
The number of kerning pairs in the kerning pair table.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - sFamilyClass ΓòÉΓòÉΓòÉ
sFamilyClass (SHORT)
Font family design classification.
This value contains a font class and its subclass.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - pszDeviceNameOffset ΓòÉΓòÉΓòÉ
pszDeviceNameOffset (PSZ)
Address where device name is stored.
ΓòÉΓòÉΓòÉ 1.24. FONTMETRICS ΓòÉΓòÉΓòÉ
Font-metrics structure.
This structure is returned to applications on the GpiQueryFonts and
GpiQueryFontMetrics calls and conveys information from the font creator to the
application.
Type
FONTMETRICS = Record
szFamilyname: array[0..FACESIZE-1] of Char;
szFacename: array[0..FACESIZE-1] of Char;
idRegistry: Word;
usCodePage: Word;
lEmHeight: Long;
lXHeight: Long;
lMaxAscender: Long;
lMaxDescender: Long;
lLowerCaseAscent: Long;
lLowerCaseDescent: Long;
lInternalLeading: Long;
lExternalLeading: Long;
lAveCharWidth: Long;
lMaxCharInc: Long;
lEmInc: Long;
lMaxBaselineExt: Long;
sCharSlope: Integer;
sInlineDir: Integer;
sCharRot: Integer;
usWeightClass: Word;
usWidthClass: Word;
sXDeviceRes: Integer;
sYDeviceRes: Integer;
sFirstChar: Integer;
sLastChar: Integer;
sDefaultChar: Integer;
sBreakChar: Integer;
sNominalPointSize: Integer;
sMinimumPointSize: Integer;
sMaximumPointSize: Integer;
fsType: Word;
fsDefn: Word;
fsSelection: Word;
fsCapabilities: Word;
lSubscriptXSize: Long;
lSubscriptYSize: Long;
lSubscriptXOffset: Long;
lSubscriptYOffset: Long;
lSuperscriptXSize: Long;
lSuperscriptYSize: Long;
lSuperscriptXOffset: Long;
lSuperscriptYOffset: Long;
lUnderscoreSize: Long;
lUnderscorePosition: Long;
lStrikeoutSize: Long;
lStrikeoutPosition: Long;
sKerningPairs: Integer;
sFamilyClass: Integer;
lMatch: Long;
FamilyNameAtom: Long;
FaceNameAtom: Long;
FmPanose: Panose;
End;
Type
PFONTMETRICS = ^FONTMETRICS;
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - szFamilyname[FACESIZE] ΓòÉΓòÉΓòÉ
szFamilyname[FACESIZE] (CHAR)
Family name.
The family name of the font that describes the basic appearance of the
font, for example, Times New Roman** This string is null terminated, and
therefore is limited to 31 characters in length. Longer names may be
retrieved by using the FamilyNameAtom field to retrieve the full name from
the System Atom table.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - szFacename[FACESIZE] ΓòÉΓòÉΓòÉ
szFacename[FACESIZE] (CHAR)
Face name.
The typeface name that defines the particular font, for example, Times New
Roman Bold Italic. This string is null terminated, and therefore is limited
to 31 characters in length. Longer names may be retrieved by using the
FaceNameAtom field to retrieve the full name from the System Atom table.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - idRegistry ΓòÉΓòÉΓòÉ
idRegistry (USHORT)
Registry identifier.
The IBM registered number (or zero).
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - usCodePage ΓòÉΓòÉΓòÉ
usCodePage (USHORT)
Code page.
Defines the registered code page supported by the font. For example, the
original IBM PC code page is 437. A value of 0 implies that the font may be
used with any of the OS/2 supported code pages.
Where a font contains special symbols for which there is no registered code
page, then code page 65400 is used.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lEmHeight ΓòÉΓòÉΓòÉ
lEmHeight (LONG)
Em height.
The height of the Em square in world coordinate units. This corresponds to
the point size for the font.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lXHeight ΓòÉΓòÉΓòÉ
lXHeight (LONG)
X height.
The nominal height above the baseline for lowercase characters (ignoring
ascenders) in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lMaxAscender ΓòÉΓòÉΓòÉ
lMaxAscender (LONG)
Maximum ascender.
The maximum height above the baseline reached by any part of any symbol in
the font in world coordinate units. This field may exceed lEmHeight.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lMaxDescender ΓòÉΓòÉΓòÉ
lMaxDescender (LONG)
Maximum descender.
The maximum depth below the baseline reached by any part of any symbol in
the font in world coordinate units. This field may exceed lEmHeight.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lLowerCaseAscent ΓòÉΓòÉΓòÉ
lLowerCaseAscent (LONG)
Lowercase ascent.
The maximum height above the baseline reached by any part of any lowercase
(Latin unaccented "a" through "z") symbol in the font in world coordinate
units.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lLowerCaseDescent ΓòÉΓòÉΓòÉ
lLowerCaseDescent (LONG)
Lowercase descent.
The maximum depth below the baseline reached by any part of any lowercase
(Latin unaccented "a" through "z") symbol in the font in world coordinate
units.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lInternalLeading ΓòÉΓòÉΓòÉ
lInternalLeading (LONG)
Internal leading.
The amount of space which, when subtracted from lMaxAscender, gives a
font-design dependent, but glyph-set independent, measure of the distance
above the baseline that characters extend. This calculation approximates
the visual top to a row of characters without actually looking at the
characters in the row.
For optimum results, this field should be used by applications to position
the first line of a block of text by subtracting it from lMaxAscender and
positioning the baseline that distance below whatever is above the text.
Note: This does not guarantee that characters will not overwrite
information above them, but does give a font designer's view of
where to place the text. Collision should be tested for, and
additional space allocated if necessary.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lExternalLeading ΓòÉΓòÉΓòÉ
lExternalLeading (LONG)
External leading.
The amount of guaranteed white space advised by the font designer to appear
between adjacent rows of text. This value may be zero.
Note: The fonts built in to Presentation Manager have zero in this field.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lAveCharWidth ΓòÉΓòÉΓòÉ
lAveCharWidth (LONG)
Average character width.
This is determined by multiplying the width of each lowercase character by
a constant, adding the products, and then dividing by 1000. The letters
involved in this, plus their constants, are as follows:
Letter Constant
a 64
b 14
c 27
d 35
e 100
f 20
g 14
h 42
i 63
j 3
k 6
l 35
m 20
n 56
o 56
p 17
q 4
r 49
s 56
t 71
u 31
v 10
w 18
x 3
y 18
z 2
space 166
Note: For fixed pitch fonts, this value will be the same as the (A width +
B width + C width) escapement of each character.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lMaxCharInc ΓòÉΓòÉΓòÉ
lMaxCharInc (LONG)
Maximum character increment.
The maximum character increment for the font in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lEmInc ΓòÉΓòÉΓòÉ
lEmInc (LONG)
Em increment.
The width of the Em square in world coordinate units. This corresponds to
the point size of the font. When the horizontal device resolution equals
the vertical device resolution this is equal to the em height.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lMaxBaselineExt ΓòÉΓòÉΓòÉ
lMaxBaselineExt (LONG)
Maximum baseline extent.
The maximum vertical space occupied by the font, in world coordinate units.
This is the sum of lMaxAscender and lMaxDescender if both are positive. It
is also the sum of lInternalLeading and lEmHeight.
One possible type of line spacing can be computed by adding lMaxBaselineExt
to lExternalLeading. Such a line spacing, however, would be dependent on
the glyph set included in the font. If a new version of the font should be
made available, with new glyphs, then it is possible that this value will
change because one of the new glyphs has gone above the previous
lMaxAscender or below the previous lMaxDescender. More sophisticated
applications will base line spacing on the point size (lEmHeight) of the
font, which is an invariant of the font, multiplied by some factor (for
example, 120%) plus any external leading.
This field may exceed lEmHeight.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sCharSlope ΓòÉΓòÉΓòÉ
sCharSlope (SHORT)
Character slope.
Defines the nominal slope for the characters of a font. The slope is
defined in degrees increasing clockwise from the vertical. An italic font
is an example of a font with a nonzero slope.
Note: The units for this metric are degrees and minutes, encoded as shown
in the following example:
180 degrees 59 minutes would be represented as :
Γöé < byte 1 > Γöé < byte 2 > Γöé
Γöé Γöé < Minutes > Γöé < Degrees > Γöé
Γöé0Γöé1 1 1 0 1 1 Γöé0 1 0 1 1 0 1 0 0Γöé
Γöé 59 min Γöé 180 degrees Γöé
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sInlineDir ΓòÉΓòÉΓòÉ
sInlineDir (SHORT)
Inline direction.
The direction in which the characters in the font are designed for viewing.
The direction is defined in degrees increasing clockwise from the
horizontal (left-to-right). Characters are added to a line of text in the
inline direction.
Note: The units for this metric are degrees and minutes, encoded as shown
in sCharSlope.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sCharRot ΓòÉΓòÉΓòÉ
sCharRot (SHORT)
Character rotation.
The rotation of the character glyphs with respect to the baseline, the
angle increasing counter clockwise. This is the angle assigned by the font
designer.
Note: The units for this metric are degrees and minutes, encoded as shown
in sCharSlope.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - usWeightClass ΓòÉΓòÉΓòÉ
usWeightClass (USHORT)
Weight class.
Indicates the visual weight (thickness of strokes) of the characters in the
font:
Value Description
1 Ultra-light
2 Extra-light
3 Light
4 Semi-light
5 Medium (normal)
6 Semi-bold
7 Bold
8 Extra-bold
9 Ultra-bold
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - usWidthClass ΓòÉΓòÉΓòÉ
usWidthClass (USHORT)
Width class.
Indicates the relative aspect ratio of the characters of the font in
relation to the normal aspect ratio for this type of font:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéValueΓöéDescription Γöé% of normal width Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé1 ΓöéUltra-condensedΓöé50 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé2 ΓöéExtra-condensedΓöé62.5 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé3 ΓöéCondensed Γöé75 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé4 ΓöéSemi-condensed Γöé87.5 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé5 ΓöéMedium (normal)Γöé100 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé6 ΓöéSemi-expanded Γöé112.5 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé7 ΓöéExpanded Γöé125 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé8 ΓöéExtra-expanded Γöé150 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé9 ΓöéUltra-expanded Γöé200 Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sXDeviceRes ΓòÉΓòÉΓòÉ
sXDeviceRes (SHORT)
X-device resolution.
For bit-map fonts this is the resolution in the X direction of the intended
target device, measured in pels per inch.
For outline fonts this is the number of notional units in the X direction
of the Em square, measured in notional units per Em. (Notional units are
the units in which the outline is defined.)
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sYDeviceRes ΓòÉΓòÉΓòÉ
sYDeviceRes (SHORT)
Y-device resolution.
For bit-map fonts this is the resolution in the Y direction of the intended
target device, measured in pels per inch.
For outline fonts this is the number of notional units in the Y direction
of the Em square, measured in notional units per Em. (Notional units are
the units in which the outline is defined.)
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sFirstChar ΓòÉΓòÉΓòÉ
sFirstChar (SHORT)
First character.
The code point of the first character in the font.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sLastChar ΓòÉΓòÉΓòÉ
sLastChar (SHORT)
Last character.
The code point of the last character in the font, expressed as an offset
from sFirstChar.
All code points between the first and last character specified must be
supported by the font.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sDefaultChar ΓòÉΓòÉΓòÉ
sDefaultChar (SHORT)
Default character.
The code point that is used if a code point outside the range supported by
the font is used, expressed as an offset from sFirstChar.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sBreakChar ΓòÉΓòÉΓòÉ
sBreakChar (SHORT)
Break character.
The code point that represents the "space" or "break" character for this
font, expressed as an offset from sFirstChar. For example, if the first
character is the space in code page 850, sFirstChar = 32, and sBreakChar =
0.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sNominalPointSize ΓòÉΓòÉΓòÉ
sNominalPointSize (SHORT)
Nominal point size.
For a bit-map font, this field contains the height of the font.
For an outline font, this field contains the height intended by the font
designer. For example, some fonts are designed for text use in which case a
value of 120 (12 point) would probably be placed in this field, whereas
other fonts are designed for "display" use ("display" is typographer's
terminology for larger sizes). This is not the only size at which the font
can be used.
Measured in decipoints (a decipoint is 1/720th of an inch).
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sMinimumPointSize ΓòÉΓòÉΓòÉ
sMinimumPointSize (SHORT)
Minimum point size.
For a bit-map font, this field does not apply. For an outline font, this
field contains the minimum height intended by the font designer. Note that
this is not a restriction of the size at which the font can be used.
Measured in decipoints (a decipoint is 1/720th of an inch).
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sMaximumPointSize ΓòÉΓòÉΓòÉ
sMaximumPointSize (SHORT)
Maximum point size.
For a bit-map font, this field does not apply.
For an outline font, this field contains the maximum height intended by the
font designer. Note that this is not a restriction of the size at which the
font can be used.
Measured in decipoints (a decipoint is 1/720th of an inch).
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - fsType ΓòÉΓòÉΓòÉ
fsType (USHORT)
Type indicators.
This field contains the following information:
FM_TYPE_FIXED Characters in the font have the same fixed
width.
FM_TYPE_LICENSED Licensed (protected) font.
FM_TYPE_KERNING Font contains kerning information.
FM_TYPE_64K Font is larger than 64KB (KB equals 1024
bytes) in size. If the following two bits are
false, the font is for single-byte code
pages. One of the bits may be set.
FM_TYPE_DBCS Font is for double-byte code pages.
FM_TYPE_MBCS Font is for mixed single- or double-byte code
pages.
FM_TYPE_FACETRUNC
Font szFacename has been truncated.
FM_TYPE_FAMTRUNC
Font szFamilyname has been truncated.
FM_TYPE_ATOMS
The System Atom table atom values in FamilyNameAtom and in
FaceNameAtom are valid.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - fsDefn ΓòÉΓòÉΓòÉ
fsDefn (USHORT)
Definition indicators.
Contains the following font definition data:
FM_DEFN_OUTLINE Font is a vector (outline) font; otherwise,
it is a bit-map font.
FM_DEFN_GENERIC Font is in a format that can be used by the
GPI; otherwise, it is a device font.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - fsSelection ΓòÉΓòÉΓòÉ
fsSelection (USHORT)
Selection indicators.
Contains information about the font patterns in the physical font.
Note: The flags do not reflect simulations applied to the physical font.
Possible values are:
FM_SEL_ITALIC True indicates that this font is designed as
an italic font.
FM_SEL_UNDERSCORE TRUE indicates that this font is designed
with underscores included in each character.
FM_SEL_NEGATIVE TRUE indicates that this font is designed
with the background and foreground reversed.
FM_SEL_OUTLINE TRUE indicates that this font is designed
with outline (hollow) characters.
FM_SEL_STRIKEOUT TRUE indicates that this font is designed
with an overstrike through each character.
FM_SEL_BOLD TRUE indicates that this font is designed
with bold characters.
FM_SEL_ISO9241_TESTED This flag indicates that the font has been
tested for compliance to ISO 9241. The
presence of this flag doesn't indicate
whether the font passed or failed, only that
it was tested.
Note: While the fonts were primarily tested
for meeting the ISO standard, they
have also been designed to meet the
German standard DIN 66 234. Where the
two standards differ, the fonts have
been designed to meet the more
stringent requirement.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - fsCapabilities ΓòÉΓòÉΓòÉ
fsCapabilities (USHORT)
Font capabilities.
This attribute applies only to device fonts.
FM_CAP_NOMIX Characters may not be mixed with graphics.
QUALITY The most significant byte may contain the
following numeric value:
0 Undefined
1 DP quality
2 DP draft
3 Near Letter Quality
4 Letter Quality
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lSubscriptXSize ΓòÉΓòÉΓòÉ
lSubscriptXSize (LONG)
Subscript x-size.
The horizontal size recommended by the font designer for subscripts for
this font in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lSubscriptYSize ΓòÉΓòÉΓòÉ
lSubscriptYSize (LONG)
Subscript y-size.
The vertical size recommended by the font designer for subscripts for this
font in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lSubscriptXOffset ΓòÉΓòÉΓòÉ
lSubscriptXOffset (LONG)
Subscript x-offset.
The baseline x-offset recommended by the font designer for subscripts for
this font in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lSubscriptYOffset ΓòÉΓòÉΓòÉ
lSubscriptYOffset (LONG)
Subscript y-offset.
The baseline y-offset recommended by the font designer for subscripts for
this font in world coordinate units.
Note: Positive numbers indicate an offset below the baseline.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lSuperscriptXSize ΓòÉΓòÉΓòÉ
lSuperscriptXSize (LONG)
Superscript x-size.
The horizontal size recommended by the font designer for superscripts for
this font in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lSuperscriptYSize ΓòÉΓòÉΓòÉ
lSuperscriptYSize (LONG)
Superscript y-size.
The vertical point size recommended by the font designer for superscripts
for this font in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lSuperscriptXOffset ΓòÉΓòÉΓòÉ
lSuperscriptXOffset (LONG)
Superscript x-offset.
The baseline x-offset recommended by the font designer for superscripts for
this font in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lSuperscriptYOffset ΓòÉΓòÉΓòÉ
lSuperscriptYOffset (LONG)
Superscript y-offset.
The baseline y-offset recommended by the font designer for superscripts for
this font in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lUnderscoreSize ΓòÉΓòÉΓòÉ
lUnderscoreSize (LONG)
Underscore size.
The width (thickness) of the underscore stroke in world coordinate units.
This describes the actual underscore in the font if FM_SEL_UNDERSCORE is
also set. Otherwise it describes what the engine will simulate if
underscore is requested in GpiCreateLogFont.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lUnderscorePosition ΓòÉΓòÉΓòÉ
lUnderscorePosition (LONG)
Underscore position.
The position of the underscore stroke from the baseline in world coordinate
units. This describes the actual underscore in the font if
FM_SEL_UNDERSCORE is also set. Otherwise it describes what the engine will
simulate if underscore is requested in GpiCreateLogFont.
Note: Positive values indicate an offset below the baseline.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lStrikeoutSize ΓòÉΓòÉΓòÉ
lStrikeoutSize (LONG)
Strikeout size.
The width of the strikeout stroke in world coordinate units. This describes
the actual underscore in the font if FM_SEL_STRIKEOUT is also set.
Otherwise it describes what the engine will simulate if overstrike is
requested in GpiCreateLogFont.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lStrikeoutPosition ΓòÉΓòÉΓòÉ
lStrikeoutPosition (LONG)
Strikeout position.
The position of the strikeout stroke relative to the baseline in world
coordinate units. This describes the actual underscore in the font if
FM_SEL_STRIKEOUT is also set. Otherwise it describes what the engine will
simulate if overstrike is requested in GpiCreateLogFont.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sKerningPairs ΓòÉΓòÉΓòÉ
sKerningPairs (SHORT)
Kerning pairs.
The number of kerning pairs in the kerning pair table.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - sFamilyClass ΓòÉΓòÉΓòÉ
sFamilyClass (SHORT)
Font family design classification.
This value contains a font class and its subclass.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - lMatch ΓòÉΓòÉΓòÉ
lMatch (LONG)
Matched font identity.
This uniquely identifies the font for a given device and device driver
combination. A positive match number signifies that the font is a generic
(engine) font while a negative number indicates a device font (a native or
downloadable font). This value should not be used to identify a font across
system boundaries.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - FamilyNameAtom ΓòÉΓòÉΓòÉ
FamilyNameAtom (LONG)
Font family name atom.
This value contains the atom identifier for the font family name in the
System Atom Table.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - FaceNameAtom ΓòÉΓòÉΓòÉ
FaceNameAtom (LONG)
Font facename atom.
This value contains the atom identifier for the font face name in the
System Atom Table.
ΓòÉΓòÉΓòÉ <hidden> FONTMETRICS Field - panose ΓòÉΓòÉΓòÉ
panose (PANOSE)
Panose font descriptor.
This is the Panose descriptor identifying the visual characteristics of the
font.
ΓòÉΓòÉΓòÉ 1.25. GRADIENTL ΓòÉΓòÉΓòÉ
Direction-vector structure.
Type
GRADIENTL = Record
x: Long;
y: Long;
End;
Type
PGRADIENTL = ^GRADIENTL;
ΓòÉΓòÉΓòÉ <hidden> GRADIENTL Field - x ΓòÉΓòÉΓòÉ
x (LONG)
X-component of direction.
ΓòÉΓòÉΓòÉ <hidden> GRADIENTL Field - y ΓòÉΓòÉΓòÉ
y (LONG)
Y-component of direction.
ΓòÉΓòÉΓòÉ 1.26. HAB ΓòÉΓòÉΓòÉ
Anchor-block handle.
Type
HAB = LHANDLE;
ΓòÉΓòÉΓòÉ 1.27. HBITMAP ΓòÉΓòÉΓòÉ
Bit-map handle.
Type
HBITMAP = LHANDLE;
ΓòÉΓòÉΓòÉ 1.28. HCINFO ΓòÉΓòÉΓòÉ
Hardcopy-capabilities structure.
Type
HCINFO = Record
szFormname: array [0..31] of Char;
cx: Long;
cy: Long;
xLeftClip: Long;
yBottomClip: Long;
xRightClip: Long;
yTopClip: Long;
xPels: Long;
yPels: Long;
flAttributes: Long;
End;
Type
PHCINFO = ^HCINFO;
ΓòÉΓòÉΓòÉ <hidden> HCINFO Field - szFormname[32] ΓòÉΓòÉΓòÉ
szFormname[32] (CHAR)
Form name.
ΓòÉΓòÉΓòÉ <hidden> HCINFO Field - cx ΓòÉΓòÉΓòÉ
cx (LONG)
Width (left-to-right) in millimeters.
ΓòÉΓòÉΓòÉ <hidden> HCINFO Field - cy ΓòÉΓòÉΓòÉ
cy (LONG)
Height (top-to-bottom) in millimeters.
ΓòÉΓòÉΓòÉ <hidden> HCINFO Field - xLeftClip ΓòÉΓòÉΓòÉ
xLeftClip (LONG)
Left-clip limit in millimeters.
ΓòÉΓòÉΓòÉ <hidden> HCINFO Field - yBottomClip ΓòÉΓòÉΓòÉ
yBottomClip (LONG)
Bottom-clip limit in millimeters.
ΓòÉΓòÉΓòÉ <hidden> HCINFO Field - xRightClip ΓòÉΓòÉΓòÉ
xRightClip (LONG)
Right-clip limit in millimeters.
ΓòÉΓòÉΓòÉ <hidden> HCINFO Field - yTopClip ΓòÉΓòÉΓòÉ
yTopClip (LONG)
Top-clip limit in millimeters.
ΓòÉΓòÉΓòÉ <hidden> HCINFO Field - xPels ΓòÉΓòÉΓòÉ
xPels (LONG)
Number of pels between left-clip and right-clip limits.
ΓòÉΓòÉΓòÉ <hidden> HCINFO Field - yPels ΓòÉΓòÉΓòÉ
yPels (LONG)
Number of pels between bottom-clip and top-clip limits.
ΓòÉΓòÉΓòÉ <hidden> HCINFO Field - flAttributes ΓòÉΓòÉΓòÉ
flAttributes (LONG)
Attributes of the form identifier.
HCAPS_SELECTABLE
The form is installed on the printer as given by
the printer properties dialog. It is available
from an alternate form source without operator
intervention. If the form does not have this bit
set and is used (if the user selects it), a "forms
mismatch" error is generated by the printer
object.
HCAPS_CURRENT
The form is the one currently selected by the
DevOpenDC DEVOPENSTRUC pdriv field (the job
properties).
ΓòÉΓòÉΓòÉ 1.29. HDC ΓòÉΓòÉΓòÉ
Device-context handle.
Type
HDC = LHANDLE;
ΓòÉΓòÉΓòÉ 1.30. HMF ΓòÉΓòÉΓòÉ
Metafile handle.
Type
HMF = LHANDLE;
ΓòÉΓòÉΓòÉ 1.31. HMODULE ΓòÉΓòÉΓòÉ
Module handle.
Type
HMODULE = LHANDLE;
ΓòÉΓòÉΓòÉ 1.32. HPAL ΓòÉΓòÉΓòÉ
Palette handle.
Type
HPAL = LHANDLE;
ΓòÉΓòÉΓòÉ 1.33. HPS ΓòÉΓòÉΓòÉ
Presentation-space handle.
Type
HPS = LHANDLE;
ΓòÉΓòÉΓòÉ 1.34. HRGN ΓòÉΓòÉΓòÉ
Region handle.
Type
HRGN = LHANDLE;
ΓòÉΓòÉΓòÉ 1.35. IMAGEBUNDLE ΓòÉΓòÉΓòÉ
Image-attributes bundle structure.
Type
IMAGEBUNDLE = Record
lColor: Long;
lBackColor: Long;
usMixMode: SmallWord;
usBackMixMode: SmallWord;
End;
Type
PIMAGEBUNDLE = ^IMAGEBUNDLE;
ΓòÉΓòÉΓòÉ <hidden> IMAGEBUNDLE Field - lColor ΓòÉΓòÉΓòÉ
lColor (LONG)
Image foreground color.
ΓòÉΓòÉΓòÉ <hidden> IMAGEBUNDLE Field - lBackColor ΓòÉΓòÉΓòÉ
lBackColor (LONG)
Image background color.
ΓòÉΓòÉΓòÉ <hidden> IMAGEBUNDLE Field - usMixMode ΓòÉΓòÉΓòÉ
usMixMode (USHORT)
Image foreground-mix mode.
ΓòÉΓòÉΓòÉ <hidden> IMAGEBUNDLE Field - usBackMixMode ΓòÉΓòÉΓòÉ
usBackMixMode (USHORT)
Image background-mix mode.
ΓòÉΓòÉΓòÉ 1.36. KERNINGPAIRS ΓòÉΓòÉΓòÉ
[Need description.]
Type
KERNINGPAIRS = Record
sFirstChar: SmallWord;
sSecondChar: SmallWord;
lKerningAmount: Long;
End;
Type
PKERNINGPAIRS = ^KERNINGPAIRS;
ΓòÉΓòÉΓòÉ <hidden> KERNINGPAIRS Field - sFirstChar ΓòÉΓòÉΓòÉ
sFirstChar (SHORT)
[Need definition.]
ΓòÉΓòÉΓòÉ <hidden> KERNINGPAIRS Field - sSecondChar ΓòÉΓòÉΓòÉ
sSecondChar (SHORT)
[Need definition.]
ΓòÉΓòÉΓòÉ <hidden> KERNINGPAIRS Field - lKerningAmount ΓòÉΓòÉΓòÉ
lKerningAmount (LONG)
[Need definition.]
ΓòÉΓòÉΓòÉ 1.37. LINEBUNDLE ΓòÉΓòÉΓòÉ
Line-attributes bundle structure.
Type
LINEBUNDLE = Record
lColor: Long;
lBackColor: Long;
usMixMode: SmallWord;
usBackMixMode: SmallWord;
fxWidth: Fixed;
lGeomWidth: Long;
usType: SmallWord;
usEnd: SmallWord;
usJoin: SmallWord;
usReserved: SmallWord;
End;
Type
PLINEBUNDLE = ^LINEBUNDLE;
ΓòÉΓòÉΓòÉ <hidden> LINEBUNDLE Field - lColor ΓòÉΓòÉΓòÉ
lColor (LONG)
Line foreground color.
ΓòÉΓòÉΓòÉ <hidden> LINEBUNDLE Field - lBackColor ΓòÉΓòÉΓòÉ
lBackColor (LONG)
Line background color.
ΓòÉΓòÉΓòÉ <hidden> LINEBUNDLE Field - usMixMode ΓòÉΓòÉΓòÉ
usMixMode (USHORT)
Line foreground-mix mode.
ΓòÉΓòÉΓòÉ <hidden> LINEBUNDLE Field - usBackMixMode ΓòÉΓòÉΓòÉ
usBackMixMode (USHORT)
Line background-mix mode.
ΓòÉΓòÉΓòÉ <hidden> LINEBUNDLE Field - fxWidth ΓòÉΓòÉΓòÉ
fxWidth (FIXED)
Line width.
ΓòÉΓòÉΓòÉ <hidden> LINEBUNDLE Field - lGeomWidth ΓòÉΓòÉΓòÉ
lGeomWidth (LONG)
Geometric line width.
ΓòÉΓòÉΓòÉ <hidden> LINEBUNDLE Field - usType ΓòÉΓòÉΓòÉ
usType (USHORT)
Line type.
ΓòÉΓòÉΓòÉ <hidden> LINEBUNDLE Field - usEnd ΓòÉΓòÉΓòÉ
usEnd (USHORT)
Line end.
ΓòÉΓòÉΓòÉ <hidden> LINEBUNDLE Field - usJoin ΓòÉΓòÉΓòÉ
usJoin (USHORT)
Line join.
ΓòÉΓòÉΓòÉ <hidden> LINEBUNDLE Field - usReserved ΓòÉΓòÉΓòÉ
usReserved (USHORT)
Reserved.
ΓòÉΓòÉΓòÉ 1.38. LONG ΓòÉΓòÉΓòÉ
Signed integer in the range -2 147 483 648 through 2 147 483 647.
Note: Where this data type represents a graphic coordinate in world or model
space, its value is restricted to -134 217 728 through 134 217 727.
A graphic coordinate in device or screen coordinates is restricted to -32 768
through 32 767.
The value of a graphic coordinate may be further restricted by any transforms
currently in force, including the positioning of the origin of the window on
the screen. In particular, coordinates in world or model space must not
generate coordinate values after transformation (that is, in device or screen
space) outside the range -32 768 through 32 767.
ΓòÉΓòÉΓòÉ 1.39. MARKERBUNDLE ΓòÉΓòÉΓòÉ
Marker-attributes bundle structure.
Type
MARKERBUNDLE = Record
lColor: Long;
lBackColor: Long;
usMixMode: SmallWord;
usBackMixMode: SmallWord;
usSet: SmallWord;
usSymbol: SmallWord;
sizfxCell: SizeF;
End;
Type
PMARKERBUNDLE = ^MARKERBUNDLE;
ΓòÉΓòÉΓòÉ <hidden> MARKERBUNDLE Field - lColor ΓòÉΓòÉΓòÉ
lColor (LONG)
Marker foreground color.
ΓòÉΓòÉΓòÉ <hidden> MARKERBUNDLE Field - lBackColor ΓòÉΓòÉΓòÉ
lBackColor (LONG)
Marker background color.
ΓòÉΓòÉΓòÉ <hidden> MARKERBUNDLE Field - usMixMode ΓòÉΓòÉΓòÉ
usMixMode (USHORT)
Marker foreground-mix mode.
ΓòÉΓòÉΓòÉ <hidden> MARKERBUNDLE Field - usBackMixMode ΓòÉΓòÉΓòÉ
usBackMixMode (USHORT)
Marker background-mix mode.
ΓòÉΓòÉΓòÉ <hidden> MARKERBUNDLE Field - usSet ΓòÉΓòÉΓòÉ
usSet (USHORT)
Marker set.
ΓòÉΓòÉΓòÉ <hidden> MARKERBUNDLE Field - usSymbol ΓòÉΓòÉΓòÉ
usSymbol (USHORT)
Marker symbol.
ΓòÉΓòÉΓòÉ <hidden> MARKERBUNDLE Field - sizfxCell ΓòÉΓòÉΓòÉ
sizfxCell (SIZEF)
Marker cell.
ΓòÉΓòÉΓòÉ 1.40. MATRIXLF ΓòÉΓòÉΓòÉ
Matrix-elements structure.
Type
MATRIXLF = Record
fxM11: Fixed;
fxM12: Fixed;
lM13: Long;
fxM21: Fixed;
fxM22: Fixed;
lM23: Long;
lM31: Long;
lM32: Long;
lM33: Long;
End;
Type
PMATRIXLF = ^MATRIXLF;
ΓòÉΓòÉΓòÉ <hidden> MATRIXLF Field - fxM11 ΓòÉΓòÉΓòÉ
fxM11 (FIXED)
First element of first row.
ΓòÉΓòÉΓòÉ <hidden> MATRIXLF Field - fxM12 ΓòÉΓòÉΓòÉ
fxM12 (FIXED)
Second element of first row.
ΓòÉΓòÉΓòÉ <hidden> MATRIXLF Field - lM13 ΓòÉΓòÉΓòÉ
lM13 (LONG)
Third element of first row.
ΓòÉΓòÉΓòÉ <hidden> MATRIXLF Field - fxM21 ΓòÉΓòÉΓòÉ
fxM21 (FIXED)
First element of second row.
ΓòÉΓòÉΓòÉ <hidden> MATRIXLF Field - fxM22 ΓòÉΓòÉΓòÉ
fxM22 (FIXED)
Second element of second row.
ΓòÉΓòÉΓòÉ <hidden> MATRIXLF Field - lM23 ΓòÉΓòÉΓòÉ
lM23 (LONG)
Third element of second row.
ΓòÉΓòÉΓòÉ <hidden> MATRIXLF Field - lM31 ΓòÉΓòÉΓòÉ
lM31 (LONG)
First element of third row.
ΓòÉΓòÉΓòÉ <hidden> MATRIXLF Field - lM32 ΓòÉΓòÉΓòÉ
lM32 (LONG)
Second element of third row.
ΓòÉΓòÉΓòÉ <hidden> MATRIXLF Field - lM33 ΓòÉΓòÉΓòÉ
lM33 (LONG)
Third element of third row.
ΓòÉΓòÉΓòÉ 1.41. MPARAM ΓòÉΓòÉΓòÉ
A 4-byte message-dependent parameter structure.
Type
MPARAM = LONGINT;
Certain elements of information, placed into the parameters of a message, have
data types that do not use all four bytes of this data type. The rules
governing these cases are:
BOOL The value is contained in the low word and the high word is 0.
SHORT The value is contained in the low word and its sign is extended into
the high word.
USHORT The value is contained in the low word and the high word is 0.
NULL The entire four bytes are 0.
The structure of this data type depends on the message. For details, see the
description of the particular message.
ΓòÉΓòÉΓòÉ 1.42. MRESULT ΓòÉΓòÉΓòÉ
A 4-byte message-dependent reply parameter structure.
Type
MRESULT = LONGINT;
Certain elements of information, placed into the parameters of a message, have
data types that do not use all four bytes of this data type. The rules
governing these cases are:
BOOL The value is contained in the low word and the high word is 0.
SHORT The value is contained in the low word and its sign is extended into
the high word.
USHORT The value is contained in the low word and the high word is 0.
NULL The entire four bytes are 0.
The structure of this data type depends on the message. For details, see the
description of the particular message.
ΓòÉΓòÉΓòÉ 1.43. PANOSE ΓòÉΓòÉΓòÉ
The Panose field in the font metrics will allow for quantitative descriptions
of the visual properties of font faces. The PANOSE definition contains ten
digits, each of which currently describes up to sixteen variations.
Type
PANOSE = Record
bFamilyType: Byte;
bSerifStyle: Byte;
bWeight: Byte;
bProportion: Byte;
bContrast: Byte;
bStrokeVariation: Byte;
bArmStyle: Byte;
bLetterform: Byte;
bMidline: Byte;
bXHeight: Byte;
abReserved: array[0..1] of Byte;
End;
Type ^PANOSE - Not defined.
ΓòÉΓòÉΓòÉ <hidden> PANOSE Field - bFamilyType ΓòÉΓòÉΓòÉ
bFamilyType (BYTE)
Family kind.
0 Any
1 No Fit
2 Text and Display
3 Script
4 Decorative
5 Pictorial
ΓòÉΓòÉΓòÉ <hidden> PANOSE Field - bSerifStyle ΓòÉΓòÉΓòÉ
bSerifStyle (BYTE)
Serif style.
0 Any
1 No Fit
2 Cove
3 Obtuse Cove
4 Square Cove
5 Obtuse Square Cove
6 Square
7 Thin
8 Bone
9 Exaggerated
10 Triangle
11 Normal Sans
12 Obtuse Sans
13 Perp Sans
14 Flared
15 Rounded
ΓòÉΓòÉΓòÉ <hidden> PANOSE Field - bWeight ΓòÉΓòÉΓòÉ
bWeight (BYTE)
Weight.
0 Any
1 No Fit
2 Very Light
3 Light
4 Thin
5 Book
6 Medium
7 Demi
8 Bold
9 Heavy
10 Black
11 Nord
ΓòÉΓòÉΓòÉ <hidden> PANOSE Field - bProportion ΓòÉΓòÉΓòÉ
bProportion (BYTE)
Proportion.
0 Any
1 No Fit
2 Old Style
3 Modern
4 Even Width
5 Expanded
6 Condensed
7 Very Expanded
8 Very Condensed
9 Monospaced
ΓòÉΓòÉΓòÉ <hidden> PANOSE Field - bContrast ΓòÉΓòÉΓòÉ
bContrast (BYTE)
Contrast.
0 Any
1 No Fit
2 None
3 Very Low
4 Low
5 Medium Low
6 Medium
7 Medium High
8 High
9 Very High
ΓòÉΓòÉΓòÉ <hidden> PANOSE Field - bStrokeVariation ΓòÉΓòÉΓòÉ
bStrokeVariation (BYTE)
Stroke Variation.
0 Any
1 No Fit
2 Gradual/Diagonal
3 Gradual/Transitional
4 Gradual/Vertical
5 Gradual/Horizontal
6 Rapid/Vertical
7 Rapid/Horizontal
8 Instant/Vertical
ΓòÉΓòÉΓòÉ <hidden> PANOSE Field - bArmStyle ΓòÉΓòÉΓòÉ
bArmStyle (BYTE)
Arm Style.
0 Any
1 No Fit
2 Straight Arms/Horizontal
3 Straight Arms/Wedge
4 Straight Arms/Vertical
5 Straight Arms/Single Serif
6 Straight Arms/Double Serif
7 Non-Straight Arms/Horizontal
8 Non-Straight Arms/Wedge
9 Non-Straight Arms/Vertical
10 Non-Straight Arms/Single Serif
11 Non-Straight Arms/Double Serif
ΓòÉΓòÉΓòÉ <hidden> PANOSE Field - bLetterform ΓòÉΓòÉΓòÉ
bLetterform (BYTE)
Letterform.
0 Any
1 No Fit
2 Normal/Contact
3 ONormal/Weighted
4 ONormal/Boxed
5 ONormal/Flattened
6 ONormal/Rounded
7 ONormal/Off Center
8 ONormal/Square
9 Oblique/Contact
10 Oblique/Weighted
11 Oblique/Boxed
12 Oblique/Flattened
13 Oblique/Rounded
14 Oblique/Off Center
15 Oblique/Square
ΓòÉΓòÉΓòÉ <hidden> PANOSE Field - bMidline ΓòÉΓòÉΓòÉ
bMidline (BYTE)
Midline.
0 Any
1 No Fit
2 Standard/Trimmed
3 Standard/Pointed
4 Standard/Serifed
5 High/Trimmed
6 High/Pointed
7 High/Serifed
8 Constant/Trimmed
9 Constant/Pointed
10 Constant/Serifed
11 Low/Trimmed
12 Low/Pointed
13 Low/Serifed
ΓòÉΓòÉΓòÉ <hidden> PANOSE Field - bXHeight ΓòÉΓòÉΓòÉ
bXHeight (BYTE)
X-Height.
0 Any
1 No Fit
2 Constant/Small
3 Constant/Standard
4 Constant/Large
5 Ducking/Small
6 Ducking/Standard
7 Ducking/Large
ΓòÉΓòÉΓòÉ <hidden> PANOSE Field - fbPassedISO ΓòÉΓòÉΓòÉ
fbPassedISO (BYTE)
Font passed ISO test.
The following flags indicate those displays and resolutions at which the
font complied with ISO 9241:
FM_ISO_9518_640
FM_ISO_9515_640
FM_ISO_9515_1024
FM_ISO_9517_640
FM_ISO_9517_1024
ΓòÉΓòÉΓòÉ <hidden> PANOSE Field - fbFailedISO ΓòÉΓòÉΓòÉ
fbFailedISO (BYTE)
Font failed ISO test.
The following flags indicate those displays and resolutions at which the
font did not comply with ISO 9241:
FM_ISO_9518_640
FM_ISO_9515_640
FM_ISO_9515_1024
FM_ISO_9517_640
FM_ISO_9517_1024
ΓòÉΓòÉΓòÉ 1.44. PBUNDLE ΓòÉΓòÉΓòÉ
Points to a bundle data area.
Type
PBUNDLE = POINTER;
ΓòÉΓòÉΓòÉ 1.45. PCH ΓòÉΓòÉΓòÉ
Pointer to a character string.
Not defined.
ΓòÉΓòÉΓòÉ 1.46. POLYGON ΓòÉΓòÉΓòÉ
Polygon structure.
Type
POLYGON = Record
ulPoints: ULong;
aPointl: PPointL;
End;
Type
PPOLYGON = ^POLYGON;
ΓòÉΓòÉΓòÉ <hidden> POLYGON Field - ulPoints ΓòÉΓòÉΓòÉ
ulPoints (ULONG)
Number of points in array.
ΓòÉΓòÉΓòÉ <hidden> POLYGON Field - aPointl ΓòÉΓòÉΓòÉ
aPointl (PPOINTL)
Array of points.
ΓòÉΓòÉΓòÉ 1.47. POINTL ΓòÉΓòÉΓòÉ
Point structure (long integers).
Type
POINTL = Record
X: Long;
Y: Long;
End;
Type
PPOINTL = ^POINTL;
ΓòÉΓòÉΓòÉ <hidden> POINTL Field - x ΓòÉΓòÉΓòÉ
x (LONG)
X-coordinate.
ΓòÉΓòÉΓòÉ <hidden> POINTL Field - y ΓòÉΓòÉΓòÉ
y (LONG)
Y-coordinate.
ΓòÉΓòÉΓòÉ 1.48. PCSZ ΓòÉΓòÉΓòÉ
Pointer to a constant null-terminated string.
Not defined.
ΓòÉΓòÉΓòÉ 1.49. PSZ ΓòÉΓòÉΓòÉ
Pointer to a null-terminated string.
If you are using C++ **, you may need to use PCSZ.
Not defined.
ΓòÉΓòÉΓòÉ 1.50. PRQINFO3 ΓòÉΓòÉΓòÉ
Print-queue information structure.
This structure is used at information levels 3 and 4.
Type
PRQINFO3 = Record
pszName: PChar;
uPriority: UShort;
uStartTime: UShort;
uUntilTime: UShort;
fsType: UShort;
pszSepFile: PChar;
pszPrProc: PChar;
pszParms: PChar;
pszComment: PChar;
fsStatus: UShort;
cJobs: UShort;
pszPrinters: PChar;
pszDriverName: PChar;
pDriverData: PDrivData;
End;
Type
PPRQINFO3 = ^PRQINFO3;
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - pszName ΓòÉΓòÉΓòÉ
pszName (PSZ)
Queue name.
The maximum length of the name in the network case is 256 (including one
byte for zero termination).
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - uPriority ΓòÉΓòÉΓòÉ
uPriority (USHORT)
Queue priority.
The range is 1 through 9, with 1 being the highest queue priority.
The default job priority (DefJobPrio) is determined from:
DefJobPrio=100-(10* uPriority).
If a job is added with PRJ_NO_PRIORITY specified, DefJobPrio is used. If a
default priority higher than the default job priority is specified, the
default job priority is used. If a default priority lower than the default
is specified, the specified job priority is used.
PRQ_DEF_PRIORITY
Default priority
PRQ_MAX_PRIORITY
Highest priority
PRQ_MIN_PRIORITY
Minimum priority
PRQ_NO_PRIORITY
No priority.
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - uStartTime ΓòÉΓòÉΓòÉ
uStartTime (USHORT)
Minutes after midnight when queue becomes active.
For example, the value 75 represents 1:15 a.m.
If uStartTime and uUntilTime are both 0, the print queue is always
available.
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - uUntilTime ΓòÉΓòÉΓòÉ
uUntilTime (USHORT)
Minutes after midnight. when queue ceases to be active.
For example, the value 1200 represents 8 p.m.
If uUntilTime and uStartTime are both 0, the print queue is always
available.
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - fsType ΓòÉΓòÉΓòÉ
fsType (USHORT)
Queue type.
PRQ3_TYPE_RAW
Data is always enqueued in the device specific format.
PRQ3_TYPE_BYPASS
Allows the spooler to bypass the queue processor and send data
directly to the Printer Driver. Setting this bit allows the spooler
to print jobs of type PM_Q_RAW while they are still being spooled.
PRQ3_TYPE_APPDEFAULT
This bit is set for the application default queue only.
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - pszSepFile ΓòÉΓòÉΓòÉ
pszSepFile (PSZ)
Separator-page file.
The path and file name of a separator-page file on the target computer.
This file contains formatting information for the page or pages to be used
between print jobs. A relative path name is taken as relative to the
current spool directory. A NULL string indicates no separator page.
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - pszPrProc ΓòÉΓòÉΓòÉ
pszPrProc (PSZ)
Default queue-processor.
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - pszParms ΓòÉΓòÉΓòÉ
pszParms (PSZ)
Queue parameters.
This can be any text string or a NULL string.
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - pszComment ΓòÉΓòÉΓòÉ
pszComment (PSZ)
Queue description.
A NULL string results in no comment. The maximum length is 48 characters
(including one byte for the null terminator).
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - fsStatus ΓòÉΓòÉΓòÉ
fsStatus (USHORT)
Queue status.
PRQ3_PAUSED
Queue is paused (held).
PRQ3_PENDING
Queue is pending deletion.
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - cJobs ΓòÉΓòÉΓòÉ
cJobs (USHORT)
Number of jobs in queue.
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - pszPrinters ΓòÉΓòÉΓòÉ
pszPrinters (PSZ)
Print devices connected to queue.
This cannot be NULL.
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - pszDriverName ΓòÉΓòÉΓòÉ
pszDriverName (PSZ)
Default device driver.
ΓòÉΓòÉΓòÉ <hidden> PRQINFO3 Field - pDriverData ΓòÉΓòÉΓòÉ
pDriverData (PDRIVDATA)
Default queue job properties.
Note: An application can use pszDriverName, pDriverData, pszPrProc, and
pszParms to construct a valid DevOpenDC call based only on the queue
name.
ΓòÉΓòÉΓòÉ 1.51. PVOID ΓòÉΓòÉΓòÉ
Pointer to a data type of undefined format.
Not defined.
ΓòÉΓòÉΓòÉ 1.52. RECTL ΓòÉΓòÉΓòÉ
Rectangle structure.
Type
RECTL = Record
xLeft: Long;
yBottom: Long;
xRight: Long;
yTop: Long;
End;
Type
PRECTL = ^RECTL;
ΓòÉΓòÉΓòÉ <hidden> RECTL Field - xLeft ΓòÉΓòÉΓòÉ
xLeft (LONG)
X-coordinate of left-hand edge of rectangle.
ΓòÉΓòÉΓòÉ <hidden> RECTL Field - yBottom ΓòÉΓòÉΓòÉ
yBottom (LONG)
Y-coordinate of bottom edge of rectangle.
ΓòÉΓòÉΓòÉ <hidden> RECTL Field - xRight ΓòÉΓòÉΓòÉ
xRight (LONG)
X-coordinate of right-hand edge of rectangle.
ΓòÉΓòÉΓòÉ <hidden> RECTL Field - yTop ΓòÉΓòÉΓòÉ
yTop (LONG)
Y-coordinate of top edge of rectangle.
ΓòÉΓòÉΓòÉ 1.53. RGNRECT ΓòÉΓòÉΓòÉ
Region-rectangle structure.
Type
RGNRECT = Record
ircStart: ULong;
crc: ULong;
crcReturned: ULong;
ulDirection: ULong;
End;
Type
PRGNRECT = ^RGNRECT;
ΓòÉΓòÉΓòÉ <hidden> RGNRECT Field - ircStart ΓòÉΓòÉΓòÉ
ircStart (ULONG)
Rectangle number from which to start enumerating.
Numbering starts from 1.
ΓòÉΓòÉΓòÉ <hidden> RGNRECT Field - crc ΓòÉΓòÉΓòÉ
crc (ULONG)
Number of rectangles that can be returned.
This must be 1 or greater.
ΓòÉΓòÉΓòÉ <hidden> RGNRECT Field - crcReturned ΓòÉΓòÉΓòÉ
crcReturned (ULONG)
Number of rectangles returned.
A value of less than crc indicates that there are no more rectangles to
enumerate.
ΓòÉΓòÉΓòÉ <hidden> RGNRECT Field - ulDirection ΓòÉΓòÉΓòÉ
ulDirection (ULONG)
Direction in which the returned rectangles are to be ordered.
This ordering uses the leading edge of a rectangle:
RECTDIR_LFRT_TOPBOT Left-to-right, top-to-bottom
RECTDIR_RTLF_TOPBOT Right-to-left, top-to-bottom
RECTDIR_LFRT_BOTTOP Left-to-right, bottom-to-top
RECTDIR_RTLF_BOTTOP Right-to-left, bottom-to-top
ΓòÉΓòÉΓòÉ 1.54. RGB ΓòÉΓòÉΓòÉ
RGB color value.
Type
RGB = Record
bBlue: Byte;
bGreen: Byte;
bRed: Byte;
End;
Not defined.
ΓòÉΓòÉΓòÉ <hidden> RGB Field - bBlue ΓòÉΓòÉΓòÉ
bBlue (BYTE)
Blue component of the color definition.
ΓòÉΓòÉΓòÉ <hidden> RGB Field - bGreen ΓòÉΓòÉΓòÉ
bGreen (BYTE)
Green component of the color definition.
ΓòÉΓòÉΓòÉ <hidden> RGB Field - bRed ΓòÉΓòÉΓòÉ
bRed (BYTE)
Red component of the color definition.
ΓòÉΓòÉΓòÉ 1.55. RGB2 ΓòÉΓòÉΓòÉ
RGB color value.
Type
RGB2 = Record
bBlue: Byte; { Blue component of the color definition }
bGreen: Byte; { Green component of the color definition}
bRed: Byte; { Red component of the color definition }
fcOptions: Byte; { Reserved, must be zero }
End;
Type
PRGB2 = ^RGB2;
ΓòÉΓòÉΓòÉ <hidden> RGB2 Field - bBlue ΓòÉΓòÉΓòÉ
bBlue (BYTE)
Blue component of the color definition.
ΓòÉΓòÉΓòÉ <hidden> RGB2 Field - bGreen ΓòÉΓòÉΓòÉ
bGreen (BYTE)
Green component of the color definition.
ΓòÉΓòÉΓòÉ <hidden> RGB2 Field - bRed ΓòÉΓòÉΓòÉ
bRed (BYTE)
Red component of the color definition.
ΓòÉΓòÉΓòÉ <hidden> RGB2 Field - fcOptions ΓòÉΓòÉΓòÉ
fcOptions (BYTE)
Entry options.
These can be ORed together if required:
PC_RESERVED The color entry is reserved for animating color with
the palette manager.
PC_EXPLICIT The low-order word of the color table entry designates
a physical palette slot. This allows an application to
show the actual contents of the device palette as
realized for other logical palettes. This does not
prevent the color in the slot from being changed for
any reason.
ΓòÉΓòÉΓòÉ 1.56. SIZEF ΓòÉΓòÉΓòÉ
Size structure (FIXED values).
Type
SIZEF = Record
cx: Fixed;
cy: Fixed;
End;
Type
PSIZEF = ^SIZEF;
ΓòÉΓòÉΓòÉ <hidden> SIZEF Field - cx ΓòÉΓòÉΓòÉ
cx (FIXED)
Width.
ΓòÉΓòÉΓòÉ <hidden> SIZEF Field - cy ΓòÉΓòÉΓòÉ
cy (FIXED)
Height.
ΓòÉΓòÉΓòÉ 1.57. SIZEL ΓòÉΓòÉΓòÉ
Size structure (LONG values).
Type
SIZEL = Record
cx: Long;
cy: Long;
End;
Type
PSIZEL = ^SIZEL;
ΓòÉΓòÉΓòÉ <hidden> SIZEL Field - cx ΓòÉΓòÉΓòÉ
cx (LONG)
Width.
ΓòÉΓòÉΓòÉ <hidden> SIZEL Field - cy ΓòÉΓòÉΓòÉ
cy (LONG)
Height.
ΓòÉΓòÉΓòÉ 1.58. SHORT ΓòÉΓòÉΓòÉ
Signed integer in the range -32 768 through 32 767.
ΓòÉΓòÉΓòÉ 1.59. STR8 ΓòÉΓòÉΓòÉ
String of 8 characters.
Not defined.
ΓòÉΓòÉΓòÉ 1.60. ULONG ΓòÉΓòÉΓòÉ
Unsigned integer in the range 0 through 4 294 967 295.
Type
ULONG = LONGINT;
ΓòÉΓòÉΓòÉ 1.61. USHORT ΓòÉΓòÉΓòÉ
Unsigned integer in the range 0 through 65 535.
Type
USHORT = WORD;
ΓòÉΓòÉΓòÉ 2. Graphics Orders ΓòÉΓòÉΓòÉ
This section describes the format of the graphics orders.
Graphics orders are used in the following circumstances:
Using GpiGetData or GpiPutData functions for bulk transfer of part or all
of graphics segment data (unless this is simply being copied without
being changed).
Editing segments with GpiQueryElement and GpiElement.
Generating metafiles (other than through the Presentation Manager API),
or examining their contents. The data part of Graphics Data structured
fields within the metafile (see "Metafile Data Format" in the
Presentation Manager Programming Reference) consists of graphics orders.
When primitive or attribute functions (plus certain other functions) are
specified at the programming interface, and the drawing mode (see
GpiSetDrawingMode) is set to drawandretain, graphics orders are constructed
and placed in the current graphics segment. One API call often causes a single
order to be generated. Sometimes, however, several orders are necessary: an
example of this is where a GpiPolyLine call is issued, which specifies more
strokes than there is room for, in a single order.
In either case, the order or orders generated by a single API call comprise a
single element, unless the application specifically starts an element using
the GpiBeginElement function. In this case the element consists of all of the
orders generated between this and the following GpiEndElement function. A
GpiQueryElement function returns the orders that comprise an element; the
application may edit these, and return them to the segment with GpiElement.
The Begin Element - End Element orders that surround a multi-order element in
the segment are never passed between the application and the system on
GpiQueryElement and GpiElement functions.
No double word or word alignment can be assumed for orders either within
segments or during editing.
ΓòÉΓòÉΓòÉ 2.1. Introduction to Graphics Orders ΓòÉΓòÉΓòÉ
In the retain and draw-and-retain drawing modes, specific GPI functions
(primitive-drawing and attribute-setting functions, plus some others) cause
graphics orders to be stored in the current segment. A graphics order is a
sequence of one or more bytes of data that describe a graphics function. There
is typically a one-to-one correspondence between a GPI function and a graphics
order. You do not need to understand the various formats and contents of the
graphics orders, unless:
You are using GpiGetData or GpiPutData for bulk transfer of data that you
want to edit.
You are simply copying data from one segment to another.
You are using GpiElement to add data to a segment, or GpiQueryElement to
retrieve data from a segment.
You are examining the contents of a metafile.
Both the graphics orders and the metafile structure are described in the
Presentation Manager. This appendix describes the header file PMORD.H, which
has been provided to allow you to manipulate the graphics orders more easily.
ΓòÉΓòÉΓòÉ 2.1.1. The Graphics-Orders Header File (PMORD.H) ΓòÉΓòÉΓòÉ
A set of helper constants, macros, and structures has been provided to help you
decode and encode graphics orders. These items are defined in the header file
PMORD.H.
There are four types of graphics orders. The first byte of each order,
regardless of the graphics-order type, is the order code itself, which either
partially or completely describes what follows. Depending on the order type,
the graphics order can contain further information.
The four types of graphics order are:
1-Byte Order
The 1-byte order comprises a single byte:
BYTE 1 : order code.
2-Byte Order
The 2-byte order consists of two bytes:
BYTE 1 : order code
BYTE 2 : associated value.
Long Order
The long order can comprise up to 257 bytes of information:
BYTE 1 : order code
BYTE 2 : length of order (0 to 255)
BYTE 3 -257 : associated value bytes
depending on the order code.
There is a special long order (Escape) where:
BYTE 3 : escape type
BYTE 4 : escape identifier
BYTE 5 -257 : associated value bytes
depending on the escape
identifier.
Very Long Order
The very long order can comprise up to 65537 bytes of information:
BYTE 1 : order code
BYTE 2 : order qualifier
BYTE 3 : length of order
(most significant byte)
BYTE 4 : length of order
(least significant byte -
length of order is 0 to 65535)
BYTE 5 -65537 : associated value bytes
depending on the order
qualifier.
There is a special very long order (Escape) where :
BYTE 5 : escape type
BYTE 6 : escape identifier
BYTE 7 -65537 : associated value bytes
depending on the escape
identifier.
Decoding Graphics Orders
The recommended way of decoding a buffer of graphics orders (in C language) is
to use a pointer to address the first byte of the buffer, and then retrieve
the graphics order it contains. To discover which of the four types of order
you have, use the following macros:
BYTE_ORDER (1-byte order)
SHORT_ORDER (2-byte order)
LONG_ORDER (long order)
VLONG_ORDER (very long order).
These macros are defined in the header file PMORD.H. Each macro processes a
single byte of data and returns a Boolean value (zero or nonzero). A zero
value means that the order is not of that type. When you know the
graphics-order type, you can establish the length of the order, and add the
length to the pointer. You can then retrieve the next order in the buffer, and
repeat the process until all data has been retrieved.
You can decode the graphics-order data itself by providing a routine for each
of the order types, or a routine for each individual order:
For a 1-byte graphic order, the decoding routine should simply return a
length of 1.
For a 2-byte graphic order, the decoding routine can use the overlay
structure ORDER to decode the data. The routine should return a length of
2.
For a long order, the decoding routine can use the overlay structure
LORDER to decode the data. The length of the data is a variable value.
For a very long order, the decoding routine can use the overlay structure
VORDER to decode the data. The length of the data is a variable value.
The overlay structures ORDER, LORDER, and VORDER are defined in the header
file PMORD.H.
You can build graphics orders using the same structures and order types that
are used for decoding graphics orders.
Naming Conventions
The names of the graphics-order codes are in the form OCODE_Gxxx. The Gxxx
abbreviation is the name of the individual order, and can be used for types,
structures, and constants directly related to that order. In the header file,
there is a comment on the same line as each of the orders that describes the
order. For example, the Begin Area order (GBAR) is described in the header
file as follows:
Note:
In some structures, an S or an L is added to the name to differentiate between
the short-coordinate form (16-bit) and the long-coordinate form (32-bit). For
example, the Set Arc Parameters order (GSAP) is as follows:
typedef struct _ORDERS_GSAP {
SHORT p;
SHORT q;
SHORT r;
SHORT s;
} ORDERS_GSAP;
typedef struct _ORDERL_GSAP {
LONG p;
LONG q;
LONG r;
LONG s;
} ORDERL_GSAP;
In this example, the structures ORDERS_GSAP and ORDERL_GSAP are shared by GSAP
(set arc parameters) and GPSAP (push and set arc parameters). As a rule, there
is structure sharing between the set and push-and-set forms of graphics
orders.
There is structure-sharing between the current-position and the given-position
forms of some orders. For example, the orders GCARC (arc at current position)
and GARC (arc at given position) share a structure.
ΓòÉΓòÉΓòÉ 2.2. Arc at a Given Position/Arc at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Arc at a Given Position/Arc at Current Position - Syntax ΓòÉΓòÉΓòÉ
This order constructs an arc starting at a given position.
Arc at a Given Position (GARC)
X'C6' (LEN, P0, P1, P2)
Arc at Current Position (GCARC)
X'86' (LEN, P1, P2)
ΓòÉΓòÉΓòÉ <hidden> GARC/GCARC Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GARC/GCARC Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Coordinate data of start point.
This parameter is only present in a Arc at a Given Position order.
ΓòÉΓòÉΓòÉ <hidden> GARC/GCARC Parameter - P1 ΓòÉΓòÉΓòÉ
P1 (GPOINT)
Coordinate data of intermediate point.
ΓòÉΓòÉΓòÉ <hidden> GARC/GCARC Parameter - P2 ΓòÉΓòÉΓòÉ
P2 (GPOINT)
Coordinate data of end point.
ΓòÉΓòÉΓòÉ <hidden> Arc at a Given Position/Arc at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P0 (GPOINT)
Coordinate data of start point.
This parameter is only present in a Arc at a Given Position order.
P1 (GPOINT)
Coordinate data of intermediate point.
P2 (GPOINT)
Coordinate data of end point.
ΓòÉΓòÉΓòÉ <hidden> Arc at a Given Position/Arc at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.3. Begin Area ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Begin Area - Syntax ΓòÉΓòÉΓòÉ
This order indicates the start of a set of primitives that define an area
boundary.
Begin Area (GBAR)
X'68' (FLAGS)
ΓòÉΓòÉΓòÉ <hidden> GBAR Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Internal flags.
RES1 (GBIT1)
Reserved for migration:
1 Only valid value.
BOUNDARY (GBIT1)
Boundary-line draw indicator:
0 Do not draw boundary lines
1 Draw boundary lines.
INSIDE (GBIT1)
Mode shading:
0 Alternate mode
1 Winding mode.
RES2 (GBIT5)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> Begin Area - Parameters ΓòÉΓòÉΓòÉ
FLAGS
Internal flags.
RES1 (GBIT1)
Reserved for migration:
1 Only valid value.
BOUNDARY (GBIT1)
Boundary-line draw indicator:
0 Do not draw boundary lines
1 Draw boundary lines.
INSIDE (GBIT1)
Mode shading:
0 Alternate mode
1 Winding mode.
RES2 (GBIT5)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> Begin Area - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.4. Begin Element ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Begin Element - Syntax ΓòÉΓòÉΓòÉ
This order indicates the beginning of a set of primitives that define an
element.
Begin Element (GBEL)
X'D2' (LEN, TYPE, DESCR)
ΓòÉΓòÉΓòÉ <hidden> GBEL Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GBEL Parameter - TYPE ΓòÉΓòÉΓòÉ
TYPE (GLONG)
Element type code.
Possible values are described in the following list:
0x0000FD01 Line bundle
0x0000FD02 Character bundle
0x0000FD03 Marker bundle
0x0000FD04 Area bundle
0x0000FD05 Image bundle
0x00000007 Call segment
0x00000081 Polyline
0x00000085 Polyfillet
0x000000A4 Polyfillet sharp
0x000000A5 Polyspline
0x00000082 Polymarker
0x00000087 Full arc
0x00000091 Image
0x000000B1 Character string at current position
0x000000F1 Character string at given position
0x81xxxxxx-0xFFxxxxxx Indicates user defined elements
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> GBEL Parameter - DESCR ΓòÉΓòÉΓòÉ
DESCR (GUNDF)
Element description data.
This is optional.
ΓòÉΓòÉΓòÉ <hidden> Begin Element - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
TYPE (GLONG)
Element type code.
Possible values are described in the following list:
0x0000FD01 Line bundle
0x0000FD02 Character bundle
0x0000FD03 Marker bundle
0x0000FD04 Area bundle
0x0000FD05 Image bundle
0x00000007 Call segment
0x00000081 Polyline
0x00000085 Polyfillet
0x000000A4 Polyfillet sharp
0x000000A5 Polyspline
0x00000082 Polymarker
0x00000087 Full arc
0x00000091 Image
0x000000B1 Character string at current position
0x000000F1 Character string at given position
0x81xxxxxx-0xFFxxxxxx Indicates user defined elements
Other Reserved values.
DESCR (GUNDF)
Element description data.
This is optional.
ΓòÉΓòÉΓòÉ <hidden> Begin Element - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.5. Begin Image at Given Position/Begin Image at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Begin Image at Given Position/Begin Image at Current Position - Syntax ΓòÉΓòÉΓòÉ
These orders identify the start of an image definition at a given position or
at the current position.
Begin Image at Given Position (GBIMG)
X'D1' (LEN, P0, FORMAT, RES, WIDTH, HEIGHT)
Begin Image at Current Position (GCBIMG)
X'91' (LEN, FORMAT, RES, WIDTH, HEIGHT)
ΓòÉΓòÉΓòÉ <hidden> GBIMG/GCBIMG Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x06 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GBIMG/GCBIMG Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Point at which the image is to be placed.
This parameter is only present in a Begin Image at Given Position order.
ΓòÉΓòÉΓòÉ <hidden> GBIMG/GCBIMG Parameter - FORMAT ΓòÉΓòÉΓòÉ
FORMAT (GBIT8)
Format of the image data.
0x00 One bit in the data represents one image point on the usable
area.
ΓòÉΓòÉΓòÉ <hidden> GBIMG/GCBIMG Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved.
0x00 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GBIMG/GCBIMG Parameter - WIDTH ΓòÉΓòÉΓòÉ
WIDTH (GUSHORT370)
Width of the image data.
This is the width in pels.
0x00-0x07 Valid range of values.
ΓòÉΓòÉΓòÉ <hidden> GBIMG/GCBIMG Parameter - HEIGHT ΓòÉΓòÉΓòÉ
HEIGHT (GUSHORT370)
Height of the image data.
This is the height in pels.
ΓòÉΓòÉΓòÉ <hidden> Begin Image at Given Position/Begin Image at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x06 Only valid value.
P0 (GPOINT)
Point at which the image is to be placed.
This parameter is only present in a Begin Image at Given Position order.
FORMAT (GBIT8)
Format of the image data.
0x00 One bit in the data represents one image point on the usable
area.
RES (GBIT8)
Reserved.
0x00 Only valid value.
WIDTH (GUSHORT370)
Width of the image data.
This is the width in pels.
0x00-0x07 Valid range of values.
HEIGHT (GUSHORT370)
Height of the image data.
This is the height in pels.
ΓòÉΓòÉΓòÉ <hidden> Begin Image at Given Position/Begin Image at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.6. Begin Path ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Begin Path - Syntax ΓòÉΓòÉΓòÉ
This order sets the drawing process into path state.
Begin Path (GBPTH)
X'D0' (LEN, RES, PTHID)
ΓòÉΓòÉΓòÉ <hidden> GBPTH Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x06 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GBPTH Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT16)
Reserved.
0x0000 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GBPTH Parameter - PTHID ΓòÉΓòÉΓòÉ
PTHID (GLONG)
Path identifier.
0x00000001-0xFFFFFFFF Valid path identifiers.
ΓòÉΓòÉΓòÉ <hidden> Begin Path - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x06 Only valid value.
RES (GBIT16)
Reserved.
0x0000 Only valid value.
PTHID (GLONG)
Path identifier.
0x00000001-0xFFFFFFFF Valid path identifiers.
ΓòÉΓòÉΓòÉ <hidden> Begin Path - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.7. Bezier Curve at Given Position/Bezier Curve at Current Poition ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Bezier Curve at Given Position/Bezier Curve at Current Poition - Syntax ΓòÉΓòÉΓòÉ
This order generates a curve that starts at a given position.
Bezier Curve at Given Position (GBEZ)
X'E5' (LEN, P0, P1, P2, P3, P4, P5, P6, PN-2, PN-1, PN)
Bezier Curve at Current Poition (GCBEZ)
X'A5' (LEN, P1, P2, P3, P4, P5, P6, PN-2, PN-1, PN)
ΓòÉΓòÉΓòÉ <hidden> GBEZ/GCBEZ Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GBEZ/GCBEZ Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Coordinate data of first curve start.
This parameter is only present in a Bezier Curve at Given Position order.
ΓòÉΓòÉΓòÉ <hidden> GBEZ/GCBEZ Parameter - P1 ΓòÉΓòÉΓòÉ
P1 (GPOINT)
Coordinate data of first curve, first control point.
ΓòÉΓòÉΓòÉ <hidden> GBEZ/GCBEZ Parameter - P2 ΓòÉΓòÉΓòÉ
P2 (GPOINT)
Coordinate data of first curve, second control point.
ΓòÉΓòÉΓòÉ <hidden> GBEZ/GCBEZ Parameter - P3 ΓòÉΓòÉΓòÉ
P3 (GPOINT)
Coordinate data of first curve end.
ΓòÉΓòÉΓòÉ <hidden> GBEZ/GCBEZ Parameter - P4 ΓòÉΓòÉΓòÉ
P4 (GPOINT)
Coordinate data of second curve, first control point
ΓòÉΓòÉΓòÉ <hidden> GBEZ/GCBEZ Parameter - P5 ΓòÉΓòÉΓòÉ
P5 (GPOINT)
Coordinate data of second curve, second control point
ΓòÉΓòÉΓòÉ <hidden> GBEZ/GCBEZ Parameter - P6 ΓòÉΓòÉΓòÉ
P6 (GPOINT)
Coordinate data of second curve end.
ΓòÉΓòÉΓòÉ <hidden> GBEZ/GCBEZ Parameter - PN-2 ΓòÉΓòÉΓòÉ
PN-2 (GPOINT)
Coordinate data of final curve, first control point
ΓòÉΓòÉΓòÉ <hidden> GBEZ/GCBEZ Parameter - PN-1 ΓòÉΓòÉΓòÉ
PN-1 (GPOINT)
Coordinate data of final curve, second control point
ΓòÉΓòÉΓòÉ <hidden> GBEZ/GCBEZ Parameter - PN ΓòÉΓòÉΓòÉ
PN (GPOINT)
Coordinate data of final curve end.
ΓòÉΓòÉΓòÉ <hidden> Bezier Curve at Given Position/Bezier Curve at Current Poition - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P0 (GPOINT)
Coordinate data of first curve start.
This parameter is only present in a Bezier Curve at Given Position order.
P1 (GPOINT)
Coordinate data of first curve, first control point.
P2 (GPOINT)
Coordinate data of first curve, second control point.
P3 (GPOINT)
Coordinate data of first curve end.
P4 (GPOINT)
Coordinate data of second curve, first control point
P5 (GPOINT)
Coordinate data of second curve, second control point
P6 (GPOINT)
Coordinate data of second curve end.
PN-2 (GPOINT)
Coordinate data of final curve, first control point
PN-1 (GPOINT)
Coordinate data of final curve, second control point
PN (GPOINT)
Coordinate data of final curve end.
ΓòÉΓòÉΓòÉ <hidden> Bezier Curve at Given Position/Bezier Curve at Current Poition - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.8. Bitblt ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Bitblt - Syntax ΓòÉΓòÉΓòÉ
This order copies a rectangle of a bit map into DOCS.
Bitblt (GBBLT)
X'D6' (LEN, FLAGS, MIX, BMID, TRANS, P1, P2, SOURCE1X, SOURCE1Y, SOURCE2X,
SOURCE2Y)
ΓòÉΓòÉΓòÉ <hidden> GBBLT Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GBBLT Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS (GBIT16)
Reserved.
0x0000 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GBBLT Parameter - MIX ΓòÉΓòÉΓòÉ
MIX (GBIT16)
Mix mode.
Values are:
0x00CC Source.
0x00C0 Source and pattern.
0x00CA Source where pattern1
0x000C Source where pattern0
0x00E2 Pattern where source1
0x00B8 Pattern where source0
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> GBBLT Parameter - BMID ΓòÉΓòÉΓòÉ
BMID (GHBITMAP)
Bit-map identifier.
ΓòÉΓòÉΓòÉ <hidden> GBBLT Parameter - TRANS ΓòÉΓòÉΓòÉ
TRANS (GBIT32)
Transfer mode.
Values are:
0x00000000 OR
0x01000000 AND
0x02000000 Ignore
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> GBBLT Parameter - P1 ΓòÉΓòÉΓòÉ
P1 (GPOINT)
Target rectangle bottom-left corner.
ΓòÉΓòÉΓòÉ <hidden> GBBLT Parameter - P2 ΓòÉΓòÉΓòÉ
P2 (GPOINT)
Target rectangle top-right corner.
ΓòÉΓòÉΓòÉ <hidden> GBBLT Parameter - SOURCE1X ΓòÉΓòÉΓòÉ
SOURCE1X (GLONG)
Source rectangle bottom-left corner, x-coordinate.
ΓòÉΓòÉΓòÉ <hidden> GBBLT Parameter - SOURCE1Y ΓòÉΓòÉΓòÉ
SOURCE1Y (GLONG)
Source rectangle bottom-left corner, y-coordinate.
ΓòÉΓòÉΓòÉ <hidden> GBBLT Parameter - SOURCE2X ΓòÉΓòÉΓòÉ
SOURCE2X (GLONG)
Source rectangle top-right corner, x-coordinate.
ΓòÉΓòÉΓòÉ <hidden> GBBLT Parameter - SOURCE2Y ΓòÉΓòÉΓòÉ
SOURCE2Y (GLONG)
Source rectangle top-right corner, y-coordinate.
ΓòÉΓòÉΓòÉ <hidden> Bitblt - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
FLAGS (GBIT16)
Reserved.
0x0000 Only valid value.
MIX (GBIT16)
Mix mode.
Values are:
0x00CC Source.
0x00C0 Source and pattern.
0x00CA Source where pattern1
0x000C Source where pattern0
0x00E2 Pattern where source1
0x00B8 Pattern where source0
Other Reserved values.
BMID (GHBITMAP)
Bit-map identifier.
TRANS (GBIT32)
Transfer mode.
Values are:
0x00000000 OR
0x01000000 AND
0x02000000 Ignore
Other Reserved values.
P1 (GPOINT)
Target rectangle bottom-left corner.
P2 (GPOINT)
Target rectangle top-right corner.
SOURCE1X (GLONG)
Source rectangle bottom-left corner, x-coordinate.
SOURCE1Y (GLONG)
Source rectangle bottom-left corner, y-coordinate.
SOURCE2X (GLONG)
Source rectangle top-right corner, x-coordinate.
SOURCE2Y (GLONG)
Source rectangle top-right corner, y-coordinate.
ΓòÉΓòÉΓòÉ <hidden> Bitblt - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.9. Box at Given Position/Box at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Box at Given Position/Box at Current Position - Syntax ΓòÉΓòÉΓòÉ
This order defines a box with square or round corners, drawn with its first
corner at a given position.
Box at Given Position (GBOX)
X'C0' (LEN, CONTROL, RES, P0, P1, HAXIS, VAXIS)
Box at Current Position (GCBOX)
X'80' (LEN, CONTROL, RES, P1, HAXIS, VAXIS)
ΓòÉΓòÉΓòÉ <hidden> GBOX/GCBOX Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GBOX/GCBOX Parameter - CONTROL ΓòÉΓòÉΓòÉ
CONTROL
Internal flags.
RES1 (GBIT1)
Reserved value, must be 0.
FILL (GBIT1)
Values:
0 No fill
1 Fill.
BOUNDARY (GBIT1)
Values:
0 No boundary
1 Boundary.
RES2 (GBIT5)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GBOX/GCBOX Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GBOX/GCBOX Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Coordinate data of box origin.
This parameter is only present in a Box at Given Position order.
ΓòÉΓòÉΓòÉ <hidden> GBOX/GCBOX Parameter - P1 ΓòÉΓòÉΓòÉ
P1 (GPOINT)
Coordinate data of box corner.
ΓòÉΓòÉΓòÉ <hidden> GBOX/GCBOX Parameter - HAXIS ΓòÉΓòÉΓòÉ
HAXIS (GROSOL)
Length of horizontal axis of ellipse.
ΓòÉΓòÉΓòÉ <hidden> GBOX/GCBOX Parameter - VAXIS ΓòÉΓòÉΓòÉ
VAXIS (GROSOL)
Length of vertical axis of ellipse.
ΓòÉΓòÉΓòÉ <hidden> Box at Given Position/Box at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
CONTROL
Internal flags.
RES1 (GBIT1)
Reserved value, must be 0.
FILL (GBIT1)
Values:
0 No fill
1 Fill.
BOUNDARY (GBIT1)
Values:
0 No boundary
1 Boundary.
RES2 (GBIT5)
Reserved value, must be 0.
RES (GBIT8)
Reserved value, must be 0.
P0 (GPOINT)
Coordinate data of box origin.
This parameter is only present in a Box at Given Position order.
P1 (GPOINT)
Coordinate data of box corner.
HAXIS (GROSOL)
Length of horizontal axis of ellipse.
VAXIS (GROSOL)
Length of vertical axis of ellipse.
ΓòÉΓòÉΓòÉ <hidden> Box at Given Position/Box at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.10. Call Segment ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Call Segment - Syntax ΓòÉΓòÉΓòÉ
This order calls one segment from another.
Call Segment (GCALLS)
X'07' (LEN, RES, SEGNAME)
ΓòÉΓòÉΓòÉ <hidden> GCALLS Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x06 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GCALLS Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT16)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GCALLS Parameter - SEGNAME ΓòÉΓòÉΓòÉ
SEGNAME (GLONG)
Name of segment that is to be called.
The name cannot be 0.
ΓòÉΓòÉΓòÉ <hidden> Call Segment - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x06 Only valid value.
RES (GBIT16)
Reserved value, must be 0.
SEGNAME (GLONG)
Name of segment that is to be called.
The name cannot be 0.
ΓòÉΓòÉΓòÉ <hidden> Call Segment - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.11. Character String at Given Position/Character String at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Character String at Given Position/Character String at Current Position - Syntax ΓòÉΓòÉΓòÉ
These orders draw a character string at a given position or at the current
position.
Character String at Given Position (GCHST)
X'C3' (LEN, P0, CP)
Character String at Current Position (GCCHST)
X'83' (LEN, CP)
ΓòÉΓòÉΓòÉ <hidden> GCHST/GCCHST Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GCHST/GCCHST Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Point at which the character string is to be placed.
This parameter is only present in a Character String at Given Position
order.
ΓòÉΓòÉΓòÉ <hidden> GCHST/GCCHST Parameter - CP ΓòÉΓòÉΓòÉ
CP (GSTR)
Code points of each character in the string.
ΓòÉΓòÉΓòÉ <hidden> Character String at Given Position/Character String at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P0 (GPOINT)
Point at which the character string is to be placed.
This parameter is only present in a Character String at Given Position
order.
CP (GSTR)
Code points of each character in the string.
ΓòÉΓòÉΓòÉ <hidden> Character String at Given Position/Character String at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.12. Character String Extended at Given Position/Character String Extended at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Character String Extended at Given Position/Character String Extended at Current Position - Syntax ΓòÉΓòÉΓòÉ
This order defines a character string to be drawn at a given position.
Character String Extended at Given Position (GCHSTE)
X'FEF0' (LEN1, P0, FLAGS, RES, P1, P2, LEN2, CP, PAD, VECT)
Character String Extended at Current Position (GCCHSTE)
X'FEB0' (LEN1, FLAGS, RES, P1, P2, LEN2, CP, PAD, VECT)
ΓòÉΓòÉΓòÉ <hidden> GCHSTE/GCCHSTE Parameter - LEN1 ΓòÉΓòÉΓòÉ
LEN1 (GLENGTH2)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GCHSTE/GCCHSTE Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Point at which the character string is to be placed.
This parameter is only present in a Character String Extended at Given
Position order.
ΓòÉΓòÉΓòÉ <hidden> GCHSTE/GCCHSTE Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Extra functions:
RECT (GBIT1)
Values:
0 Do not draw background rectangle
1 Draw background rectangle.
CLIP (GBIT1)
Values:
0 Do not clip to rectangle
1 Clip to rectangle.
RES1 (GBIT1)
Reserved value, must be 0.
LVCP (GBIT1)
Values:
0 Move current position
1 Leave current position.
RES2 (GBIT4)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GCHSTE/GCCHSTE Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GCHSTE/GCCHSTE Parameter - P1 ΓòÉΓòÉΓòÉ
P1 (GPOINT)
Coordinate data of rectangle corner.
ΓòÉΓòÉΓòÉ <hidden> GCHSTE/GCCHSTE Parameter - P2 ΓòÉΓòÉΓòÉ
P2 (GPOINT)
Coordinate data of rectangle corner.
ΓòÉΓòÉΓòÉ <hidden> GCHSTE/GCCHSTE Parameter - LEN2 ΓòÉΓòÉΓòÉ
LEN2 (GLENGTH2)
Length of code-point data.
ΓòÉΓòÉΓòÉ <hidden> GCHSTE/GCCHSTE Parameter - CP ΓòÉΓòÉΓòÉ
CP (GSTR)
Code-point data.
ΓòÉΓòÉΓòÉ <hidden> GCHSTE/GCCHSTE Parameter - PAD ΓòÉΓòÉΓòÉ
PAD (GBIT8)
Pad byte.
Only needs to be included if CP is an odd number of bytes.
ΓòÉΓòÉΓòÉ <hidden> GCHSTE/GCCHSTE Parameter - VECT ΓòÉΓòÉΓòÉ
VECT (GROSOL)
IN (0) Vector of character increments.
VECT is a vector of n elements, where n is the number of code points
present in the CP parameter.
ΓòÉΓòÉΓòÉ <hidden> Character String Extended at Given Position/Character String Extended at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN1 (GLENGTH2)
Length of following data.
P0 (GPOINT)
Point at which the character string is to be placed.
This parameter is only present in a Character String Extended at Given
Position order.
FLAGS
Extra functions:
RECT (GBIT1)
Values:
0 Do not draw background rectangle
1 Draw background rectangle.
CLIP (GBIT1)
Values:
0 Do not clip to rectangle
1 Clip to rectangle.
RES1 (GBIT1)
Reserved value, must be 0.
LVCP (GBIT1)
Values:
0 Move current position
1 Leave current position.
RES2 (GBIT4)
Reserved value, must be 0.
RES (GBIT8)
Reserved value, must be 0.
P1 (GPOINT)
Coordinate data of rectangle corner.
P2 (GPOINT)
Coordinate data of rectangle corner.
LEN2 (GLENGTH2)
Length of code-point data.
CP (GSTR)
Code-point data.
PAD (GBIT8)
Pad byte.
Only needs to be included if CP is an odd number of bytes.
VECT (GROSOL)
IN (0) Vector of character increments.
VECT is a vector of n elements, where n is the number of code points
present in the CP parameter.
ΓòÉΓòÉΓòÉ <hidden> Character String Extended at Given Position/Character String Extended at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.13. Character String Move at Given Position/Character String Move at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Character String Move at Given Position/Character String Move at Current Position - Syntax ΓòÉΓòÉΓòÉ
This order draws a character string starting from a given position and moves
the current position to the end of the string.
Character String Move at Given Position (GCHSTM)
X'F1' (LEN, P0, CP)
Character String Move at Current Position (GCCHSTM)
X'B1' (LEN, CP)
ΓòÉΓòÉΓòÉ <hidden> GCHSTM/GCCHSTM Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GCHSTM/GCCHSTM Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Point at which the character string is to be placed.
This parameter is only present in a Character String Move at Given Position
order.
ΓòÉΓòÉΓòÉ <hidden> GCHSTM/GCCHSTM Parameter - CP ΓòÉΓòÉΓòÉ
CP (GSTR)
Code points of each character in the string.
ΓòÉΓòÉΓòÉ <hidden> Character String Move at Given Position/Character String Move at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P0 (GPOINT)
Point at which the character string is to be placed.
This parameter is only present in a Character String Move at Given Position
order.
CP (GSTR)
Code points of each character in the string.
ΓòÉΓòÉΓòÉ <hidden> Character String Move at Given Position/Character String Move at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.14. Close Figure ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Close Figure - Syntax ΓòÉΓòÉΓòÉ
This order delimits the end of a closed figure.
Close Figure (GCLFIG)
X'7D' (RES)
ΓòÉΓòÉΓòÉ <hidden> GCLFIG Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> Close Figure - Parameters ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> Close Figure - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.15. Comment ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Comment - Syntax ΓòÉΓòÉΓòÉ
This order enables data to be stored within a segment.
Comment (GCOMT)
X'01' (LEN, DATA[LEN])
ΓòÉΓòÉΓòÉ <hidden> GCOMT Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GCOMT Parameter - DATA[LEN] ΓòÉΓòÉΓòÉ
DATA[LEN] (GBIT8)
Comment data.
ΓòÉΓòÉΓòÉ <hidden> Comment - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
DATA[LEN] (GBIT8)
Comment data.
ΓòÉΓòÉΓòÉ <hidden> Comment - Remarks ΓòÉΓòÉΓòÉ
This order is treated as a no-operation.
ΓòÉΓòÉΓòÉ <hidden> Comment - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.16. End Area ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> End Area - Syntax ΓòÉΓòÉΓòÉ
This order indicates the end of a set of primitives that define an area
boundary.
End Area (GEAR)
X'60' (LEN, DATA[LEN])
ΓòÉΓòÉΓòÉ <hidden> GEAR Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data. It is normally 0.
ΓòÉΓòÉΓòÉ <hidden> GEAR Parameter - DATA[LEN] ΓòÉΓòÉΓòÉ
DATA[LEN] (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> End Area - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data. It is normally 0.
DATA[LEN] (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> End Area - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.17. End Element ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> End Element - Syntax ΓòÉΓòÉΓòÉ
This order identifies the end of a set of primitives that define an element.
End Element (GEEL)
X'49' (RES)
ΓòÉΓòÉΓòÉ <hidden> GEEL Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> End Element - Parameters ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> End Element - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.18. End Image ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> End Image - Syntax ΓòÉΓòÉΓòÉ
This order identifies the end of an image definition.
End Image (GEIMG)
X'93' (LEN, DATA[LEN])
ΓòÉΓòÉΓòÉ <hidden> GEIMG Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data. It is normally 0.
ΓòÉΓòÉΓòÉ <hidden> GEIMG Parameter - DATA[LEN] ΓòÉΓòÉΓòÉ
DATA[LEN] (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> End Image - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data. It is normally 0.
DATA[LEN] (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> End Image - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.19. End of Symbol Definition ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> End of Symbol Definition - Syntax ΓòÉΓòÉΓòÉ
This order indicates the end of a set of orders defining a graphics symbol.
End of Symbol Definition (GESD)
X'FF'
ΓòÉΓòÉΓòÉ <hidden> End of Symbol Definition - Remarks ΓòÉΓòÉΓòÉ
This order is only valid in the context of symbol definitions.
ΓòÉΓòÉΓòÉ <hidden> End of Symbol Definition - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.20. End Path ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> End Path - Syntax ΓòÉΓòÉΓòÉ
This order ends the definition of a path.
End Path (GEPTH)
X'7F' (RES)
ΓòÉΓòÉΓòÉ <hidden> GEPTH Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> End Path - Parameters ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> End Path - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.21. End Prolog ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> End Prolog - Syntax ΓòÉΓòÉΓòÉ
This order indicates the end of the prolog of a segment.
End Prolog (GEPROL)
X'3E' (RES)
ΓòÉΓòÉΓòÉ <hidden> GEPROL Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> End Prolog - Parameters ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> End Prolog - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.22. Escape ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Escape - Syntax ΓòÉΓòÉΓòÉ
This order provides facilities for registered and unregistered escape
functions.
Escape (GESCP)
X'D5' (LEN, TYPE, RID, PARMS)
ΓòÉΓòÉΓòÉ <hidden> GESCP Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GESCP Parameter - TYPE ΓòÉΓòÉΓòÉ
TYPE (GBIT8)
Type identifier:
80 Registered value
Other All other values are unregistered.
ΓòÉΓòÉΓòÉ <hidden> GESCP Parameter - RID ΓòÉΓòÉΓòÉ
RID (GBIT8)
Registered identifier:
01 Set pel.
02 BITBLT function.
03 Flood fill function.
04 Draw bits function.
ΓòÉΓòÉΓòÉ <hidden> GESCP Parameter - PARMS ΓòÉΓòÉΓòÉ
PARMS (GSTR)
Parameters of escape.
ΓòÉΓòÉΓòÉ <hidden> Escape - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
TYPE (GBIT8)
Type identifier:
80 Registered value
Other All other values are unregistered.
RID (GBIT8)
Registered identifier:
01 Set pel.
02 BITBLT function.
03 Flood fill function.
04 Draw bits function.
PARMS (GSTR)
Parameters of escape.
ΓòÉΓòÉΓòÉ <hidden> Escape - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.23. Extended Escape ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Extended Escape - Syntax ΓòÉΓòÉΓòÉ
This order provides facilities for registered and unregistered escape
functions.
Extended Escape (GEESCP)
X'FED5' (LEN, TYPE, RID, PARMS)
ΓòÉΓòÉΓòÉ <hidden> GEESCP Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH2)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GEESCP Parameter - TYPE ΓòÉΓòÉΓòÉ
TYPE (GBIT8)
Type identifier:
0x80 Registered value
Other All other values are unregistered.
ΓòÉΓòÉΓòÉ <hidden> GEESCP Parameter - RID ΓòÉΓòÉΓòÉ
RID (GUCHAR)
Registered identifier.
No registered extended escapes are used by the OS/2* operating system.
ΓòÉΓòÉΓòÉ <hidden> GEESCP Parameter - PARMS ΓòÉΓòÉΓòÉ
PARMS (GSTR)
Parameters of escape.
ΓòÉΓòÉΓòÉ <hidden> Extended Escape - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH2)
Length of following data.
TYPE (GBIT8)
Type identifier:
0x80 Registered value
Other All other values are unregistered.
RID (GUCHAR)
Registered identifier.
No registered extended escapes are used by the OS/2* operating system.
PARMS (GSTR)
Parameters of escape.
ΓòÉΓòÉΓòÉ <hidden> Extended Escape - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.24. Fill Path ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Fill Path - Syntax ΓòÉΓòÉΓòÉ
This order fills the interior of the specified path.
Fill Path (GFPTH)
X'D7' (LEN, FLAGS, RES, PTHID)
ΓòÉΓòÉΓòÉ <hidden> GFPTH Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x06 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GFPTH Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Extra functions:
RES1 (GBIT1)
Reserved value, must be 0.
INSIDE (GBIT1)
Values:
0 Alternate mode
1 Winding mode.
MOD (GBIT1)
Values:
0 Do not modify before filling
1 Modify path before filling.
RES2 (GBIT5)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GFPTH Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GFPTH Parameter - PTHID ΓòÉΓòÉΓòÉ
PTHID (GLONG)
Path identifier.
0x00000001-0xFFFFFFFF Valid path identifiers.
ΓòÉΓòÉΓòÉ <hidden> Fill Path - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x06 Only valid value.
FLAGS
Extra functions:
RES1 (GBIT1)
Reserved value, must be 0.
INSIDE (GBIT1)
Values:
0 Alternate mode
1 Winding mode.
MOD (GBIT1)
Values:
0 Do not modify before filling
1 Modify path before filling.
RES2 (GBIT5)
Reserved value, must be 0.
RES (GBIT8)
Reserved value, must be 0.
PTHID (GLONG)
Path identifier.
0x00000001-0xFFFFFFFF Valid path identifiers.
ΓòÉΓòÉΓòÉ <hidden> Fill Path - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.25. Fillet at Given Position/Fillet at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Fillet at Given Position/Fillet at Current Position - Syntax ΓòÉΓòÉΓòÉ
These orders draw a curved line tangential to a specified set of straight
lines, at the given position or at the current position.
Fillet at Given Position (GFLT)
X'C5' (LEN, P0, P1, P2, PN)
Fillet at Current Position (GCFLT)
X'85' (LEN, P1, P2, PN)
ΓòÉΓòÉΓòÉ <hidden> GFLT/GCFLT Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GFLT/GCFLT Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Coordinate data of line start.
This parameter is only present in a Fillet at Given Position order.
ΓòÉΓòÉΓòÉ <hidden> GFLT/GCFLT Parameter - P1 ΓòÉΓòÉΓòÉ
P1 (GPOINT)
Coordinate data of first line end.
ΓòÉΓòÉΓòÉ <hidden> GFLT/GCFLT Parameter - P2 ΓòÉΓòÉΓòÉ
P2 (GPOINT)
Coordinate data of second line end.
ΓòÉΓòÉΓòÉ <hidden> GFLT/GCFLT Parameter - PN ΓòÉΓòÉΓòÉ
PN (GPOINT)
Coordinate data of final line end.
ΓòÉΓòÉΓòÉ <hidden> Fillet at Given Position/Fillet at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P0 (GPOINT)
Coordinate data of line start.
This parameter is only present in a Fillet at Given Position order.
P1 (GPOINT)
Coordinate data of first line end.
P2 (GPOINT)
Coordinate data of second line end.
PN (GPOINT)
Coordinate data of final line end.
ΓòÉΓòÉΓòÉ <hidden> Fillet at Given Position/Fillet at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.26. Full Arc at Given Position/Full Arc at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Full Arc at Given Position/Full Arc at Current Position - Syntax ΓòÉΓòÉΓòÉ
This order constructs a full circle or an ellipse, with the center at a given
position.
Full Arc at Given Position (GFARC)
X'C7' (LEN, P0, M)
Full Arc at Current Position (GCFARC)
X'87' (LEN, M)
ΓòÉΓòÉΓòÉ <hidden> GFARC/GCFARC Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GFARC/GCFARC Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Coordinate data of the center of the circle/ellipse.
This parameter is only present in a Full Arc at Given Position order.
ΓòÉΓòÉΓòÉ <hidden> GFARC/GCFARC Parameter - M ΓòÉΓòÉΓòÉ
M (GROFUFS)
Multiplier.
ΓòÉΓòÉΓòÉ <hidden> Full Arc at Given Position/Full Arc at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P0 (GPOINT)
Coordinate data of the center of the circle/ellipse.
This parameter is only present in a Full Arc at Given Position order.
M (GROFUFS)
Multiplier.
ΓòÉΓòÉΓòÉ <hidden> Full Arc at Given Position/Full Arc at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.27. Image Data ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Image Data - Syntax ΓòÉΓòÉΓòÉ
This order provides bit data for an image.
Image Data (GIMD)
X'92' (LEN, DATA[LEN])
ΓòÉΓòÉΓòÉ <hidden> GIMD Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GIMD Parameter - DATA[LEN] ΓòÉΓòÉΓòÉ
DATA[LEN] (GBIT8)
Image data.
ΓòÉΓòÉΓòÉ <hidden> Image Data - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
DATA[LEN] (GBIT8)
Image data.
ΓòÉΓòÉΓòÉ <hidden> Image Data - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.28. Label ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Label - Syntax ΓòÉΓòÉΓòÉ
This order is used to label an element within a segment.
Label (GLBL)
X'D3' (LEN, LDATA)
ΓòÉΓòÉΓòÉ <hidden> GLBL Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x04 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GLBL Parameter - LDATA ΓòÉΓòÉΓòÉ
LDATA (GLONG)
Label value.
ΓòÉΓòÉΓòÉ <hidden> Label - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x04 Only valid value.
LDATA (GLONG)
Label value.
ΓòÉΓòÉΓòÉ <hidden> Label - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.29. Line at Given Position/Line at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Line at Given Position/Line at Current Position - Syntax ΓòÉΓòÉΓòÉ
This order defines one or more connected straight lines, drawn from the given
position.
Line at Given Position (GLINE)
X'C1' (LEN, P0, P1, PN)
Line at Current Position (GCLINE)
X'81' (LEN, P1, PN)
ΓòÉΓòÉΓòÉ <hidden> GLINE/GCLINE Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GLINE/GCLINE Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Coordinate data of line start.
This parameter is only present in a Line at Given Position order.
ΓòÉΓòÉΓòÉ <hidden> GLINE/GCLINE Parameter - P1 ΓòÉΓòÉΓòÉ
P1 (GPOINT)
Coordinate data of first line end.
ΓòÉΓòÉΓòÉ <hidden> GLINE/GCLINE Parameter - PN ΓòÉΓòÉΓòÉ
PN (GPOINT)
Coordinate data of final line end.
ΓòÉΓòÉΓòÉ <hidden> Line at Given Position/Line at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P0 (GPOINT)
Coordinate data of line start.
This parameter is only present in a Line at Given Position order.
P1 (GPOINT)
Coordinate data of first line end.
PN (GPOINT)
Coordinate data of final line end.
ΓòÉΓòÉΓòÉ <hidden> Line at Given Position/Line at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.30. Marker at Given Position/Marker at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Marker at Given Position/Marker at Current Position - Syntax ΓòÉΓòÉΓòÉ
This order draws the current marker symbol at one or more positions starting
from a given position.
Marker at Given Position (GMRK)
X'C2' (LEN, P0, P1, PN)
Marker at Current Position (GCMRK)
X'82' (LEN, P1, PN)
ΓòÉΓòÉΓòÉ <hidden> GMRK/GCMRK Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GMRK/GCMRK Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Coordinate data of first marker.
ΓòÉΓòÉΓòÉ <hidden> GMRK/GCMRK Parameter - P1 ΓòÉΓòÉΓòÉ
P1 (GPOINT)
Coordinate data of second marker.
ΓòÉΓòÉΓòÉ <hidden> GMRK/GCMRK Parameter - PN ΓòÉΓòÉΓòÉ
PN (GPOINT)
Coordinate data of final marker.
ΓòÉΓòÉΓòÉ <hidden> Marker at Given Position/Marker at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P0 (GPOINT)
Coordinate data of first marker.
P1 (GPOINT)
Coordinate data of second marker.
PN (GPOINT)
Coordinate data of final marker.
ΓòÉΓòÉΓòÉ <hidden> Marker at Given Position/Marker at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.31. Modify Path ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Modify Path - Syntax ΓòÉΓòÉΓòÉ
This order modifies the path according to the value of the mode.
Modify Path (GMPTH)
X'D8' (LEN, MODE, RES, PTHID)
ΓòÉΓòÉΓòÉ <hidden> GMPTH Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x06 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GMPTH Parameter - MODE ΓòÉΓòÉΓòÉ
MODE (GBIT8)
Mode of path modification:
0x06 Stroke the path
Other All other values are reserved.
ΓòÉΓòÉΓòÉ <hidden> GMPTH Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GMPTH Parameter - PTHID ΓòÉΓòÉΓòÉ
PTHID (GLONG)
Path identifier.
0x00000001-0xFFFFFFFF Valid path identifiers.
ΓòÉΓòÉΓòÉ <hidden> Modify Path - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x06 Only valid value.
MODE (GBIT8)
Mode of path modification:
0x06 Stroke the path
Other All other values are reserved.
RES (GBIT8)
Reserved value, must be 0.
PTHID (GLONG)
Path identifier.
0x00000001-0xFFFFFFFF Valid path identifiers.
ΓòÉΓòÉΓòÉ <hidden> Modify Path - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.32. No-Operation ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> No-Operation - Syntax ΓòÉΓòÉΓòÉ
This order is a no-operation.
No-Operation (GNOP1)
X'00'
ΓòÉΓòÉΓòÉ <hidden> No-Operation - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Glossary
ΓòÉΓòÉΓòÉ 2.33. Outline Path ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Outline Path - Syntax ΓòÉΓòÉΓòÉ
This order draws the outline of the specified path.
Outline Path (GOPTH)
X'D4' (LEN, FLAGS, RES, PTHID)
ΓòÉΓòÉΓòÉ <hidden> GOPTH Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GOPTH Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS (GBIT8)
Function flags:
0x00 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GOPTH Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GOPTH Parameter - PTHID ΓòÉΓòÉΓòÉ
PTHID (GLONG)
Path identifier.
1 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> Outline Path - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
FLAGS (GBIT8)
Function flags:
0x00 Only valid value.
RES (GBIT8)
Reserved value, must be 0.
PTHID (GLONG)
Path identifier.
1 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> Outline Path - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.34. Partial Arc at Given Position/Partial Arc at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Partial Arc at Given Position/Partial Arc at Current Position - Syntax ΓòÉΓòÉΓòÉ
This order draws a line from a given position to the start of an arc, and then
draws the arc.
Partial Arc at Given Position (GPARC)
X'E3' (LEN, P0, P1, M, START, SWEEP)
Partial Arc at Current Position (GCPARC)
X'A3' (LEN, P1, M, START, SWEEP)
ΓòÉΓòÉΓòÉ <hidden> GPARC/GCPARC Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GPARC/GCPARC Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Coordinate data of start of line.
This parameter is only present in a Partial Arc at Given Position order.
ΓòÉΓòÉΓòÉ <hidden> GPARC/GCPARC Parameter - P1 ΓòÉΓòÉΓòÉ
P1 (GPOINT)
Coordinate data of center of arc.
ΓòÉΓòÉΓòÉ <hidden> GPARC/GCPARC Parameter - M ΓòÉΓòÉΓòÉ
M (GROFUFS)
Multiplier.
ΓòÉΓòÉΓòÉ <hidden> GPARC/GCPARC Parameter - START ΓòÉΓòÉΓòÉ
START (GROF)
Start angle.
ΓòÉΓòÉΓòÉ <hidden> GPARC/GCPARC Parameter - SWEEP ΓòÉΓòÉΓòÉ
SWEEP (GROF)
Sweep angle.
ΓòÉΓòÉΓòÉ <hidden> Partial Arc at Given Position/Partial Arc at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P0 (GPOINT)
Coordinate data of start of line.
This parameter is only present in a Partial Arc at Given Position order.
P1 (GPOINT)
Coordinate data of center of arc.
M (GROFUFS)
Multiplier.
START (GROF)
Start angle.
SWEEP (GROF)
Sweep angle.
ΓòÉΓòÉΓòÉ <hidden> Partial Arc at Given Position/Partial Arc at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.35. Polygons ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Polygons - Syntax ΓòÉΓòÉΓòÉ
This order defines a set of polygons, which are optionally filled.
Polygons (GPOLYS)
X'F3' (LEN, FLAGS, COUNT, POLYS)
ΓòÉΓòÉΓòÉ <hidden> GPOLYS Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH2)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GPOLYS Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Internal flags.
INSIDE (GBIT1)
Mode shading:
0 Alternate mode.
1 Winding mode.
MODEL (GBIT1)
Drawing model:
0 The fill is inclusive of bottom right.
1 The fill is exclusive of bottom right.
RES2 (GBIT6)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GPOLYS Parameter - COUNT ΓòÉΓòÉΓòÉ
COUNT (GUSHORT)
Number of polygons.
ΓòÉΓòÉΓòÉ <hidden> GPOLYS Parameter - POLYS ΓòÉΓòÉΓòÉ
POLYS (GPOLYS)
Array of polygons.
ΓòÉΓòÉΓòÉ <hidden> Polygons - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH2)
Length of following data.
FLAGS
Internal flags.
INSIDE (GBIT1)
Mode shading:
0 Alternate mode.
1 Winding mode.
MODEL (GBIT1)
Drawing model:
0 The fill is inclusive of bottom right.
1 The fill is exclusive of bottom right.
RES2 (GBIT6)
Reserved value, must be 0.
COUNT (GUSHORT)
Number of polygons.
POLYS (GPOLYS)
Array of polygons.
ΓòÉΓòÉΓòÉ <hidden> Polygons - Remarks ΓòÉΓòÉΓòÉ
This order draws a set of polygons. For the first polygon the current position
is the first point. For all subsequent polygons all points which define the
polygon are given explicitly. The polygons are automatically closed if
necessary.
The current position is set to the last point specified.
ΓòÉΓòÉΓòÉ <hidden> Polygons - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.36. Pop ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Pop - Syntax ΓòÉΓòÉΓòÉ
This order enables data to be popped from the Segment Call Stack.
Pop (GPOP)
X'3F' (RES)
ΓòÉΓòÉΓòÉ <hidden> GPOP Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> Pop - Parameters ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> Pop - Remarks ΓòÉΓòÉΓòÉ
The data is placed into an attribute or Drawing Process Control.
ΓòÉΓòÉΓòÉ <hidden> Pop - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.37. Relative Line at Given Position/Relative Line at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Relative Line at Given Position/Relative Line at Current Position - Syntax ΓòÉΓòÉΓòÉ
These orders define one or more connected straight lines, at the given position
or at the current position.
Relative Line at Given Position (GRLINE)
X'E1' (LEN, P0, OFF0, OFF1, OFFN)
Relative Line at Current Position (GCRLINE)
X'A1' (LEN, OFF0, OFF1, OFFN)
ΓòÉΓòÉΓòÉ <hidden> GRLINE/GCRLINE Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GRLINE/GCRLINE Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Coordinate data of line start.
This parameter is only present in a Relative Line at Given Position order.
ΓòÉΓòÉΓòÉ <hidden> GRLINE/GCRLINE Parameter - OFF0 ΓòÉΓòÉΓòÉ
OFF0 (GDELPOINT)
Offset data for first point.
This offset is to the first line end, relative to its start point.
ΓòÉΓòÉΓòÉ <hidden> GRLINE/GCRLINE Parameter - OFF1 ΓòÉΓòÉΓòÉ
OFF1 (GDELPOINT)
Offset data for second point.
This offset is to the second line end, relative to the first line end.
ΓòÉΓòÉΓòÉ <hidden> GRLINE/GCRLINE Parameter - OFFN ΓòÉΓòÉΓòÉ
OFFN (GDELPOINT)
Offset data for final point.
This offset is to the nth line end, relative to the n-1th line end.
ΓòÉΓòÉΓòÉ <hidden> Relative Line at Given Position/Relative Line at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P0 (GPOINT)
Coordinate data of line start.
This parameter is only present in a Relative Line at Given Position order.
OFF0 (GDELPOINT)
Offset data for first point.
This offset is to the first line end, relative to its start point.
OFF1 (GDELPOINT)
Offset data for second point.
This offset is to the second line end, relative to the first line end.
OFFN (GDELPOINT)
Offset data for final point.
This offset is to the nth line end, relative to the n-1th line end.
ΓòÉΓòÉΓòÉ <hidden> Relative Line at Given Position/Relative Line at Current Position - Remarks ΓòÉΓòÉΓòÉ
The end point of each line is given as an offset from the start of the line,
rather than as absolute coordinates.
ΓòÉΓòÉΓòÉ <hidden> Relative Line at Given Position/Relative Line at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.38. Segment Characteristics ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Segment Characteristics - Syntax ΓòÉΓòÉΓòÉ
This order provides the facility to set architected or user-defined
characteristics for a segment.
Segment Characteristics (GSGCH)
X'04' (LEN, CBIT8, PARMS)
ΓòÉΓòÉΓòÉ <hidden> GSGCH Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSGCH Parameter - CBIT8 ΓòÉΓòÉΓòÉ
CBIT8 (GUCHAR)
Identification code for characteristics:
0x00-0x7F Reserved for architected characteristics.
0x80-0xFF Reserved for user-defined characteristics.
ΓòÉΓòÉΓòÉ <hidden> GSGCH Parameter - PARMS ΓòÉΓòÉΓòÉ
PARMS (GSTR)
Parameters of characteristics.
ΓòÉΓòÉΓòÉ <hidden> Segment Characteristics - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
CBIT8 (GUCHAR)
Identification code for characteristics:
0x00-0x7F Reserved for architected characteristics.
0x80-0xFF Reserved for user-defined characteristics.
PARMS (GSTR)
Parameters of characteristics.
ΓòÉΓòÉΓòÉ <hidden> Segment Characteristics - Remarks ΓòÉΓòÉΓòÉ
The order is only valid in a root-segment prolog.
ΓòÉΓòÉΓòÉ <hidden> Segment Characteristics - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.39. Set Arc Parameters/Push and Set Arc Parameters ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Arc Parameters/Push and Set Arc Parameters - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the values of the current arc parameters.
Set Arc Parameters (GSAP)
X'22' (LEN, P, Q, R, S)
Push and Set Arc Parameters (GPSAP)
X'62' (LEN, P, Q, R, S)
ΓòÉΓòÉΓòÉ <hidden> GSAP/GPSAP Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSAP/GPSAP Parameter - P ΓòÉΓòÉΓòÉ
P (GROSOL)
P-parameter of arc transform.
ΓòÉΓòÉΓòÉ <hidden> GSAP/GPSAP Parameter - Q ΓòÉΓòÉΓòÉ
Q (GROSOL)
Q-parameter of arc transform.
ΓòÉΓòÉΓòÉ <hidden> GSAP/GPSAP Parameter - R ΓòÉΓòÉΓòÉ
R (GROSOL)
R-parameter of arc transform.
ΓòÉΓòÉΓòÉ <hidden> GSAP/GPSAP Parameter - S ΓòÉΓòÉΓòÉ
S (GROSOL)
S-parameter of arc transform.
ΓòÉΓòÉΓòÉ <hidden> Set Arc Parameters/Push and Set Arc Parameters - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P (GROSOL)
P-parameter of arc transform.
Q (GROSOL)
Q-parameter of arc transform.
R (GROSOL)
R-parameter of arc transform.
S (GROSOL)
S-parameter of arc transform.
ΓòÉΓòÉΓòÉ <hidden> Set Arc Parameters/Push and Set Arc Parameters - Remarks ΓòÉΓòÉΓòÉ
The values of the current arc parameters are pushed on to the Segment Call
stack by the Push and Set order only. Both orders then set the current arc
parameters to the values specified in the order.
The value of these parameters determines the shape of subsequent orders drawn
using Arc at a Given Position/Arc at Current Position or Full Arc at Given
Position/Full Arc at Current Position or Partial Arc at Given Position/Partial
Arc at Current Position.
ΓòÉΓòÉΓòÉ <hidden> Set Arc Parameters/Push and Set Arc Parameters - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.40. Set Background Color/Push and Set Background Color ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Background Color/Push and Set Background Color - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current background color
attribute.
Set Background Color (GSBCOL)
X'25' (LEN, COLOR)
Push and Set Background Color (GPSBCOL)
X'65' (LEN, COLOR)
ΓòÉΓòÉΓòÉ <hidden> GSBCOL/GPSBCOL Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x02 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GSBCOL/GPSBCOL Parameter - COLOR ΓòÉΓòÉΓòÉ
COLOR (GBIT16)
Color-table index: Except for the special values, the values 0x0000 through
0xnnnn are allowed color indexes; that is, as many values as are allowed by
the size of the LCT.
Special Values
0x0000
Drawing default
0x0007
White
0x0008
Black
0xFF00
Drawing default
0xFF0x
Color indexes 0x000n, where n is in the range 1 through 7.
0xFF08
Color index 0 (reset color).
ΓòÉΓòÉΓòÉ <hidden> Set Background Color/Push and Set Background Color - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x02 Only valid value.
COLOR (GBIT16)
Color-table index: Except for the special values, the values 0x0000 through
0xnnnn are allowed color indexes; that is, as many values as are allowed by
the size of the LCT.
Special Values
0x0000
Drawing default
0x0007
White
0x0008
Black
0xFF00
Drawing default
0xFF0x
Color indexes 0x000n, where n is in the range 1 through 7.
0xFF08
Color index 0 (reset color).
ΓòÉΓòÉΓòÉ <hidden> Set Background Color/Push and Set Background Color - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.41. Set Background Indexed Color/Push and Set Background Indexed Color ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Background Indexed Color/Push and Set Background Indexed Color - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current background color
attribute.
Set Background Indexed Color (GSBICOL)
X'A7' (LEN, FLAGS, INDEX)
Push and Set Background Indexed Color (GPSBICOL)
X'E7' (LEN, FLAGS, INDEX)
ΓòÉΓòÉΓòÉ <hidden> GSBICOL/GPSBICOL Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x04 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GSBICOL/GPSBICOL Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Values:
DEFAULT (GBIT1)
Options:
0 Use specified INDEX
1 Use drawing default color.
SPEC (GBIT1)
Options:
0 Use index directly
1 Special value.
RES (GBIT6)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSBICOL/GPSBICOL Parameter - INDEX ΓòÉΓòÉΓòÉ
INDEX (GINDEX3)
Value for color index.
The value is a direct index into the current color table or a special
value. The special values are:
1
Black
2
White
4
All ones
5
All zeros.
ΓòÉΓòÉΓòÉ <hidden> Set Background Indexed Color/Push and Set Background Indexed Color - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x04 Only valid value.
FLAGS
Values:
DEFAULT (GBIT1)
Options:
0 Use specified INDEX
1 Use drawing default color.
SPEC (GBIT1)
Options:
0 Use index directly
1 Special value.
RES (GBIT6)
Reserved value, must be 0.
INDEX (GINDEX3)
Value for color index.
The value is a direct index into the current color table or a special
value. The special values are:
1
Black
2
White
4
All ones
5
All zeros.
ΓòÉΓòÉΓòÉ <hidden> Set Background Indexed Color/Push and Set Background Indexed Color - Remarks ΓòÉΓòÉΓòÉ
The value of the current background color attribute is pushed on to the stack
by the Push and Set order only. Both orders then set the current background
color attribute to the value specified in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Background Indexed Color/Push and Set Background Indexed Color - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.42. Set Background Mix/Push and Set Background Mix ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Background Mix/Push and Set Background Mix - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current background mix
attribute.
Set Background Mix (GSBMX)
X'0D' (MODE)
Push and Set Background Mix (GPSBMX)
X'4D' (MODE)
ΓòÉΓòÉΓòÉ <hidden> GSBMX/GPSBMX Parameter - MODE ΓòÉΓòÉΓòÉ
MODE (GBIT8)
Mix-mode value:
0x00
Drawing default
0x01
OR
0x02
Overpaint
0x03
Reserved
0x04
Exclusive-OR
0x05
Leave Alone
0x06
AND
0x07
Subtract
0x08
Source AND (inverse destination)
0x09
All zeros
0x0A
Inverse (source OR destination)
0x0B
Inverse (source XOR destination)
0x0C
Inverse destination
0x0D
Source OR (inverse destination)
0x0E
Inverse source
0x0F
(Inverse source) OR destination
0x10
Inverse (source AND destination)
0x11
All ones.
ΓòÉΓòÉΓòÉ <hidden> Set Background Mix/Push and Set Background Mix - Parameters ΓòÉΓòÉΓòÉ
MODE (GBIT8)
Mix-mode value:
0x00
Drawing default
0x01
OR
0x02
Overpaint
0x03
Reserved
0x04
Exclusive-OR
0x05
Leave Alone
0x06
AND
0x07
Subtract
0x08
Source AND (inverse destination)
0x09
All zeros
0x0A
Inverse (source OR destination)
0x0B
Inverse (source XOR destination)
0x0C
Inverse destination
0x0D
Source OR (inverse destination)
0x0E
Inverse source
0x0F
(Inverse source) OR destination
0x10
Inverse (source AND destination)
0x11
All ones.
ΓòÉΓòÉΓòÉ <hidden> Set Background Mix/Push and Set Background Mix - Remarks ΓòÉΓòÉΓòÉ
The value of the current background mix attribute is pushed on to the Segment
Call stack by the Push and Set order only. Both orders then set the current
background mix attribute to the value specified in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Background Mix/Push and Set Background Mix - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.43. Set Character Angle/Push and Set Character Angle ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Character Angle/Push and Set Character Angle - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current character angle
attribute.
Set Character Angle (GSCA)
X'34' (LEN, AX, AY)
Push and Set Character Angle (GPSCA)
X'74' (LEN, AX, AY)
ΓòÉΓòÉΓòÉ <hidden> GSCA/GPSCA Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSCA/GPSCA Parameter - AX ΓòÉΓòÉΓòÉ
AX (GROSOL)
X coordinate of point.
This point defines the angle of the character string.
ΓòÉΓòÉΓòÉ <hidden> GSCA/GPSCA Parameter - AY ΓòÉΓòÉΓòÉ
AY (GROSOL)
Y coordinate of point.
This point defines the angle of the character string.
ΓòÉΓòÉΓòÉ <hidden> Set Character Angle/Push and Set Character Angle - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
AX (GROSOL)
X coordinate of point.
This point defines the angle of the character string.
AY (GROSOL)
Y coordinate of point.
This point defines the angle of the character string.
ΓòÉΓòÉΓòÉ <hidden> Set Character Angle/Push and Set Character Angle - Remarks ΓòÉΓòÉΓòÉ
The value of the current character angle attribute is pushed on to the Segment
Call Stack by the Push and Set order only. Both orders then set the value of
the current character angle to the value specified in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Character Angle/Push and Set Character Angle - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.44. Set Character Break Extra/Push and Set Character Break Extra ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Character Break Extra/Push and Set Character Break Extra - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current character break
extra attribute.
Set Character Break Extra (GSCBE)
X'05' (LEN, FLAGS, RES2, INC)
Push and Set Character Break Extra (GPSCBE)
X'45' (LEN, FLAGS, RES2, INC)
ΓòÉΓòÉΓòÉ <hidden> GSCBE/GPSCBE Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSCBE/GPSCBE Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Values as follows:
DEFAULT (GBIT1)
Values as follows:
B"0" Set to specified value.
B"1" Set to drawing default.
RES1 (GBIT7)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSCBE/GPSCBE Parameter - RES2 ΓòÉΓòÉΓòÉ
RES2 (GUNDF1)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSCBE/GPSCBE Parameter - INC ΓòÉΓòÉΓòÉ
INC (GROF)
Increment.
ΓòÉΓòÉΓòÉ <hidden> Set Character Break Extra/Push and Set Character Break Extra - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
FLAGS
Values as follows:
DEFAULT (GBIT1)
Values as follows:
B"0" Set to specified value.
B"1" Set to drawing default.
RES1 (GBIT7)
Reserved value, must be 0.
RES2 (GUNDF1)
Reserved value, must be 0.
INC (GROF)
Increment.
ΓòÉΓòÉΓòÉ <hidden> Set Character Break Extra/Push and Set Character Break Extra - Remarks ΓòÉΓòÉΓòÉ
The value of the current character break extra attribute is pushed on to the
Segment Call Stack by the Push and Set order only. Both orders then set the
value of the current character break extra attribute to the value specified in
the order.
ΓòÉΓòÉΓòÉ <hidden> Set Character Break Extra/Push and Set Character Break Extra - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.45. Set Character Cell/Push and Set Character Cell ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Character Cell/Push and Set Character Cell - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current character cell-size
attribute.
Set Character Cell (GSCC)
X'33' (LEN, CELLX, CELLY, CELLXF, CELLYF, FLAGS, RES)
Push and Set Character Cell (GPSCC)
X'03' (LEN, CELLX, CELLY, CELLXF, CELLYF, FLAGS, RES)
ΓòÉΓòÉΓòÉ <hidden> GSCC/GPSCC Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSCC/GPSCC Parameter - CELLX ΓòÉΓòÉΓòÉ
CELLX (GROSOL)
X part of character cell-size attribute.
ΓòÉΓòÉΓòÉ <hidden> GSCC/GPSCC Parameter - CELLY ΓòÉΓòÉΓòÉ
CELLY (GROSOL)
Y part of character cell-size attribute.
ΓòÉΓòÉΓòÉ <hidden> GSCC/GPSCC Parameter - CELLXF ΓòÉΓòÉΓòÉ
CELLXF (GUSHORT)
Fractional X part of character cell-size attribute.
This parameter is optional.
ΓòÉΓòÉΓòÉ <hidden> GSCC/GPSCC Parameter - CELLYF ΓòÉΓòÉΓòÉ
CELLYF (GUSHORT)
Fractional Y part of character cell-size attribute.
This parameter must be present if CELLXF parameter is present.
ΓòÉΓòÉΓòÉ <hidden> GSCC/GPSCC Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Internal flags.
This parameter is optional.
NOTDEFLT (GBIT1)
Values:
0 A cell size of zero sets drawing default
1 A cell size of zero sets to zero.
RES (GBIT7)
Reserved.
0000000 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GSCC/GPSCC Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
This parameter must be present if FLAGS parameter is present.
ΓòÉΓòÉΓòÉ <hidden> Set Character Cell/Push and Set Character Cell - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
CELLX (GROSOL)
X part of character cell-size attribute.
CELLY (GROSOL)
Y part of character cell-size attribute.
CELLXF (GUSHORT)
Fractional X part of character cell-size attribute.
This parameter is optional.
CELLYF (GUSHORT)
Fractional Y part of character cell-size attribute.
This parameter must be present if CELLXF parameter is present.
FLAGS
Internal flags.
This parameter is optional.
NOTDEFLT (GBIT1)
Values:
0 A cell size of zero sets drawing default
1 A cell size of zero sets to zero.
RES (GBIT7)
Reserved.
0000000 Only valid value.
RES (GBIT8)
Reserved value, must be 0.
This parameter must be present if FLAGS parameter is present.
ΓòÉΓòÉΓòÉ <hidden> Set Character Cell/Push and Set Character Cell - Remarks ΓòÉΓòÉΓòÉ
The value of the current character cell-size attribute is pushed on to the
Segment Call Stack by the Push and Set order only. Both orders then set the
value of the current character cell-size attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Character Cell/Push and Set Character Cell - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.46. Set Character Direction/Push and Set Character Direction ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Character Direction/Push and Set Character Direction - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current character direction
attribute.
Set Character Direction (GSCD)
X'3A' (DIRECTION)
Push and Set Character Direction (GPSCD)
X'7A' (DIRECTION)
ΓòÉΓòÉΓòÉ <hidden> GSCD/GPSCD Parameter - DIRECTION ΓòÉΓòÉΓòÉ
DIRECTION (GBIT8)
Value for character direction:
All other values are reserved.
0x00 Drawing default
0x01 Left to right
0x02 Top to bottom
0x03 Right to left
0x04 Bottom to top.
ΓòÉΓòÉΓòÉ <hidden> Set Character Direction/Push and Set Character Direction - Parameters ΓòÉΓòÉΓòÉ
DIRECTION (GBIT8)
Value for character direction:
All other values are reserved.
0x00 Drawing default
0x01 Left to right
0x02 Top to bottom
0x03 Right to left
0x04 Bottom to top.
ΓòÉΓòÉΓòÉ <hidden> Set Character Direction/Push and Set Character Direction - Remarks ΓòÉΓòÉΓòÉ
The value of the current character direction attribute is pushed on to the
Segment Call Stack by the Push and Set order only. Both orders then set the
value of the current character direction attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Character Direction/Push and Set Character Direction - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.47. Set Character Extra/Push and Set Character Extra ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Character Extra/Push and Set Character Extra - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current character extra
attribute.
Set Character Extra (GSCE)
X'17' (LEN, FLAGS, RES2, INC)
Push and Set Character Extra (GPSCE)
X'57' (LEN, FLAGS, RES2, INC)
ΓòÉΓòÉΓòÉ <hidden> GSCE/GPSCE Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSCE/GPSCE Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Values as follows:
DEFAULT (GBIT1)
Values as follows:
B"0" Set to specified value.
B"1" Set to drawing default.
RES1 (GBIT7)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSCE/GPSCE Parameter - RES2 ΓòÉΓòÉΓòÉ
RES2 (GUNDF1)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSCE/GPSCE Parameter - INC ΓòÉΓòÉΓòÉ
INC (GROF)
Increment.
ΓòÉΓòÉΓòÉ <hidden> Set Character Extra/Push and Set Character Extra - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
FLAGS
Values as follows:
DEFAULT (GBIT1)
Values as follows:
B"0" Set to specified value.
B"1" Set to drawing default.
RES1 (GBIT7)
Reserved value, must be 0.
RES2 (GUNDF1)
Reserved value, must be 0.
INC (GROF)
Increment.
ΓòÉΓòÉΓòÉ <hidden> Set Character Extra/Push and Set Character Extra - Remarks ΓòÉΓòÉΓòÉ
The value of the current character extra attribute is pushed on to the Segment
Call Stack by the Push and Set order only. Both orders set the value of the
current character extra attribute to the value specified in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Character Extra/Push and Set Character Extra - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.48. Set Character Precision/Push and Set Character Precision ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Character Precision/Push and Set Character Precision - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current character precision
attribute.
Set Character Precision (GSCR)
X'39' (PREC)
Push and Set Character Precision (GPSCR)
X'79' (PREC)
ΓòÉΓòÉΓòÉ <hidden> GSCR/GPSCR Parameter - PREC ΓòÉΓòÉΓòÉ
PREC (GBIT8)
Value for character-precision attribute:
All other values are reserved.
0x00 Drawing default
0x01 String precision
0x02 Character precision
0x03 Stroke precision
ΓòÉΓòÉΓòÉ <hidden> Set Character Precision/Push and Set Character Precision - Parameters ΓòÉΓòÉΓòÉ
PREC (GBIT8)
Value for character-precision attribute:
All other values are reserved.
0x00 Drawing default
0x01 String precision
0x02 Character precision
0x03 Stroke precision
ΓòÉΓòÉΓòÉ <hidden> Set Character Precision/Push and Set Character Precision - Remarks ΓòÉΓòÉΓòÉ
The value of the current character precision attribute is pushed on to the
Segment Call Stack by the Push and Set order only. Both orders then set the
value of the current character precision attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Character Precision/Push and Set Character Precision - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.49. Set Character Set/Push and Set Character Set ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Character Set/Push and Set Character Set - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current character-set
attribute.
Set Character Set (GSCS)
X'38' (LCID)
Push and Set Character Set (GPSCS)
X'78' (LCID)
ΓòÉΓòÉΓòÉ <hidden> GSCS/GPSCS Parameter - LCID ΓòÉΓòÉΓòÉ
LCID (GUCHAR)
Local identifier (LCID) for the character set:
0x00 Drawing default
0x01-0xFE Lcid for the symbol set
0xFF Special character set.
ΓòÉΓòÉΓòÉ <hidden> Set Character Set/Push and Set Character Set - Parameters ΓòÉΓòÉΓòÉ
LCID (GUCHAR)
Local identifier (LCID) for the character set:
0x00 Drawing default
0x01-0xFE Lcid for the symbol set
0xFF Special character set.
ΓòÉΓòÉΓòÉ <hidden> Set Character Set/Push and Set Character Set - Remarks ΓòÉΓòÉΓòÉ
The value of the current character-set attribute is pushed on to the Segment
Call Stack by the Push and Set order only. Both orders then set the value of
the current character-set attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Character Set/Push and Set Character Set - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.50. Set Character Shear/Push and Set Character Shear ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Character Shear/Push and Set Character Shear - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current character shear
attribute.
Set Character Shear (GSCH)
X'35' (LEN, HX, HY)
Push and Set Character Shear (GPSCH)
X'75' (LEN, HX, HY)
ΓòÉΓòÉΓòÉ <hidden> GSCH/GPSCH Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSCH/GPSCH Parameter - HX ΓòÉΓòÉΓòÉ
HX (GROSOL)
Dividend of shear ratio.
ΓòÉΓòÉΓòÉ <hidden> GSCH/GPSCH Parameter - HY ΓòÉΓòÉΓòÉ
HY (GROSOL)
Divisor of shear ratio.
ΓòÉΓòÉΓòÉ <hidden> Set Character Shear/Push and Set Character Shear - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
HX (GROSOL)
Dividend of shear ratio.
HY (GROSOL)
Divisor of shear ratio.
ΓòÉΓòÉΓòÉ <hidden> Set Character Shear/Push and Set Character Shear - Remarks ΓòÉΓòÉΓòÉ
When HX and HY are both 0, the drawing default is set. The value of the current
character shear attribute is pushed on to the Segment Call Stack by the Push
and Set order only. Both orders then set the value of the current character
shear attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Character Shear/Push and Set Character Shear - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.51. Set Clip Path ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Clip Path - Syntax ΓòÉΓòÉΓòÉ
This order sets the current clip path.
Set Clip Path (GSCPTH)
X'B4' (LEN, FLAGS, RES, PTHID)
ΓòÉΓòÉΓòÉ <hidden> GSCPTH Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSCPTH Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Extra functions:
RES (GBIT1)
Reserved value, must be 0.
FILL (GBIT1)
Values:
0 Alternate mode
1 Winding mode.
INTER (GBIT1)
Values:
0 Set to specified path
1 Set to intersection of specified and current clip path.
RES2 (GBIT5)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSCPTH Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved.
0x00 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GSCPTH Parameter - PTHID ΓòÉΓòÉΓòÉ
PTHID (GLONG)
Path identifier.
0x00000000 No clipping.
0x00000001-0xFFFFFFFF Path identifier.
ΓòÉΓòÉΓòÉ <hidden> Set Clip Path - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
FLAGS
Extra functions:
RES (GBIT1)
Reserved value, must be 0.
FILL (GBIT1)
Values:
0 Alternate mode
1 Winding mode.
INTER (GBIT1)
Values:
0 Set to specified path
1 Set to intersection of specified and current clip path.
RES2 (GBIT5)
Reserved value, must be 0.
RES (GBIT8)
Reserved.
0x00 Only valid value.
PTHID (GLONG)
Path identifier.
0x00000000 No clipping.
0x00000001-0xFFFFFFFF Path identifier.
ΓòÉΓòÉΓòÉ <hidden> Set Clip Path - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.52. Set Color/Push and Set Color ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Color/Push and Set Color - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current color attribute.
Set Color (GSCOL)
X'0A' (COL)
Push and Set Color (GPSCOL)
X'4A' (COL)
ΓòÉΓòÉΓòÉ <hidden> GSCOL/GPSCOL Parameter - COL ΓòÉΓòÉΓòÉ
COL (GBIT8)
Value for color attribute:
0x00-0x08 These one-byte values are converted to two-byte values by
preceding the value with 0xFF. The resultant is then treated
as a two-byte value as defined by the Set Extended Color/Push
and Set Extended Color order.
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> Set Color/Push and Set Color - Parameters ΓòÉΓòÉΓòÉ
COL (GBIT8)
Value for color attribute:
0x00-0x08 These one-byte values are converted to two-byte values by
preceding the value with 0xFF. The resultant is then treated
as a two-byte value as defined by the Set Extended Color/Push
and Set Extended Color order.
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> Set Color/Push and Set Color - Remarks ΓòÉΓòÉΓòÉ
The value of the current color attribute is pushed on to the Segment Call Stack
by the Push and Set order only. Both orders then set the value of the current
color attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Color/Push and Set Color - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.53. Set Current Position/Push and Set Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Current Position/Push and Set Current Position - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current position.
Set Current Position (GSCP)
X'21' (LEN, P)
Push and Set Current Position (GPSCP)
X'61' (LEN, P)
ΓòÉΓòÉΓòÉ <hidden> GSCP/GPSCP Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSCP/GPSCP Parameter - P ΓòÉΓòÉΓòÉ
P (GPOINT)
Coordinate data.
ΓòÉΓòÉΓòÉ <hidden> Set Current Position/Push and Set Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P (GPOINT)
Coordinate data.
ΓòÉΓòÉΓòÉ <hidden> Set Current Position/Push and Set Current Position - Remarks ΓòÉΓòÉΓòÉ
The value of the current position is pushed on to the Segment Call Stack by the
Push and Set order only. Both orders then set the value of the current position
to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Current Position/Push and Set Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.54. Set Extended Color/Push and Set Extended Color ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Extended Color/Push and Set Extended Color - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current color attribute.
Set Extended Color (GSECOL)
X'26' (LEN, COLOR)
Push and Set Extended Color (GPSECOL)
X'66' (LEN, COLOR)
ΓòÉΓòÉΓòÉ <hidden> GSECOL/GPSECOL Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x02 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GSECOL/GPSECOL Parameter - COLOR ΓòÉΓòÉΓòÉ
COLOR (GBIT16)
Color-table index. Except for the special values, the values 0x0000 through
0xnnnn are allowed color indexes; that is, as many values as are allowed by
the size of the LCT.
Special Values
0x0000
Drawing default
0x0007
White
0x0008
Black
0xFF00
Drawing default
0xFF0n
Color indexes 0x000n, where n is in the range 1 through 7.
0xFF08
Color index 0 (reset color).
ΓòÉΓòÉΓòÉ <hidden> Set Extended Color/Push and Set Extended Color - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x02 Only valid value.
COLOR (GBIT16)
Color-table index. Except for the special values, the values 0x0000 through
0xnnnn are allowed color indexes; that is, as many values as are allowed by
the size of the LCT.
Special Values
0x0000
Drawing default
0x0007
White
0x0008
Black
0xFF00
Drawing default
0xFF0n
Color indexes 0x000n, where n is in the range 1 through 7.
0xFF08
Color index 0 (reset color).
ΓòÉΓòÉΓòÉ <hidden> Set Extended Color/Push and Set Extended Color - Remarks ΓòÉΓòÉΓòÉ
The value of the current extended color attribute is pushed on to the Segment
Call Stack by the Push and Set order only. Both orders then set the value of
the current extended color attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Extended Color/Push and Set Extended Color - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.55. Set Fractional Line Width/Push and Set Fractional Line Width ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Fractional Line Width/Push and Set Fractional Line Width - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current line-width
attribute.
Set Fractional Line Width (GSFLW)
X'11' (LEN, LINEWIDTH)
Push and Set Fractional Line Width (GPSFLW)
X'51' (LEN, LINEWIDTH)
ΓòÉΓòÉΓòÉ <hidden> GSFLW/GPSFLW Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x02 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GSFLW/GPSFLW Parameter - LINEWIDTH ΓòÉΓòÉΓòÉ
LINEWIDTH (GROUFS)
Value for the line-width attribute.
The nonzero value is an integral and fractional multiplier of the normal
line width:
0x0000 Drawing default
0x0001-0xFFFF Multiplier of normal line width.
ΓòÉΓòÉΓòÉ <hidden> Set Fractional Line Width/Push and Set Fractional Line Width - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x02 Only valid value.
LINEWIDTH (GROUFS)
Value for the line-width attribute.
The nonzero value is an integral and fractional multiplier of the normal
line width:
0x0000 Drawing default
0x0001-0xFFFF Multiplier of normal line width.
ΓòÉΓòÉΓòÉ <hidden> Set Fractional Line Width/Push and Set Fractional Line Width - Remarks ΓòÉΓòÉΓòÉ
The value of the current line-width attribute is pushed on to the Segment Call
Stack by the Push and Set order only. Both orders then set the value of the
current line-width attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Fractional Line Width/Push and Set Fractional Line Width - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.56. Set Indexed Color/Push and Set Indexed Color ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Indexed Color/Push and Set Indexed Color - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current color attribute.
Set Indexed Color (GSICOL)
X'A6' (LEN, FLAGS, INDEX)
Push and Set Indexed Color (GPSICOL)
X'E6' (LEN, FLAGS, INDEX)
ΓòÉΓòÉΓòÉ <hidden> GSICOL/GPSICOL Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x04 Only valid value.
ΓòÉΓòÉΓòÉ <hidden> GSICOL/GPSICOL Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Values:
DEFAULT (GBIT1)
Options:
0 Use specified index
1 Use drawing default color.
SPEC (GBIT1)
Options:
0 Use index directly
1 Special value.
RES (GBIT6)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSICOL/GPSICOL Parameter - INDEX ΓòÉΓòÉΓòÉ
INDEX (GINDEX3)
Value for color index.
The value is a direct index into the current color table or a special
value.
The table can be the standard table, or one loaded by the user. The special
values are:
1
Black
2
White
4
All ones
5
All zeros.
ΓòÉΓòÉΓòÉ <hidden> Set Indexed Color/Push and Set Indexed Color - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
0x04 Only valid value.
FLAGS
Values:
DEFAULT (GBIT1)
Options:
0 Use specified index
1 Use drawing default color.
SPEC (GBIT1)
Options:
0 Use index directly
1 Special value.
RES (GBIT6)
Reserved value, must be 0.
INDEX (GINDEX3)
Value for color index.
The value is a direct index into the current color table or a special
value.
The table can be the standard table, or one loaded by the user. The special
values are:
1
Black
2
White
4
All ones
5
All zeros.
ΓòÉΓòÉΓòÉ <hidden> Set Indexed Color/Push and Set Indexed Color - Remarks ΓòÉΓòÉΓòÉ
The value of the current color attribute is pushed on to the Segment Call Stack
by the Push and Set order only. Both orders then set the value of the current
color attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Indexed Color/Push and Set Indexed Color - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.57. Set Individual Attribute/Push and Set Individual Attribute ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Individual Attribute/Push and Set Individual Attribute - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the color, background color,
mix, or background mix attribute for the line character, marker, pattern, or
image primitive type.
Set Individual Attribute (GSIA)
X'14' (LEN, ATYPE, PTYPE, FLAG1, VAL)
Push and Set Individual Attribute (GPSIA)
X'54' (LEN, ATYPE, PTYPE, FLAG1, VAL)
ΓòÉΓòÉΓòÉ <hidden> GSIA/GPSIA Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSIA/GPSIA Parameter - ATYPE ΓòÉΓòÉΓòÉ
ATYPE (GBIT8)
Attribute type:
0x1 Color
0x2 Background color
0x3 Mix
0x4 Background Mix
Other All other values are reserved.
ΓòÉΓòÉΓòÉ <hidden> GSIA/GPSIA Parameter - PTYPE ΓòÉΓòÉΓòÉ
PTYPE (GBIT8)
Primitive type:
0x1
Line
0x2
Character
0x3
Marker
0x4
Pattern
0x5
Image
Other
All other values are reserved.
ΓòÉΓòÉΓòÉ <hidden> GSIA/GPSIA Parameter - FLAG1 ΓòÉΓòÉΓòÉ
FLAG1
Values:
DEFAULT (GBIT1)
Options:
0
Use specified value
1
Use drawing default color.
SPEC (GBIT1)
Options:
0
Use value directly
1
Special Value.
RES (GBIT6)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSIA/GPSIA Parameter - VAL ΓòÉΓòÉΓòÉ
VAL (GINDATT)
Color index value.
For colors, the value is a direct index into the current color table or a
special value.
The table can be the standard table, or one loaded by the user. The special
values are:
1
Black
2
White
4
All ones
5
All zeros.
ΓòÉΓòÉΓòÉ <hidden> Set Individual Attribute/Push and Set Individual Attribute - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ATYPE (GBIT8)
Attribute type:
0x1 Color
0x2 Background color
0x3 Mix
0x4 Background Mix
Other All other values are reserved.
PTYPE (GBIT8)
Primitive type:
0x1
Line
0x2
Character
0x3
Marker
0x4
Pattern
0x5
Image
Other
All other values are reserved.
FLAG1
Values:
DEFAULT (GBIT1)
Options:
0
Use specified value
1
Use drawing default color.
SPEC (GBIT1)
Options:
0
Use value directly
1
Special Value.
RES (GBIT6)
Reserved value, must be 0.
VAL (GINDATT)
Color index value.
For colors, the value is a direct index into the current color table or a
special value.
The table can be the standard table, or one loaded by the user. The special
values are:
1
Black
2
White
4
All ones
5
All zeros.
ΓòÉΓòÉΓòÉ <hidden> Set Individual Attribute/Push and Set Individual Attribute - Remarks ΓòÉΓòÉΓòÉ
The value of the current attribute is pushed on to the Segment Call Stack by
the Push and Set order only. Both orders then set the value of the individual
attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Individual Attribute/Push and Set Individual Attribute - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.58. Set Line End/Push and Set Line End ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Line End/Push and Set Line End - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current line-end attribute.
Set Line End (GSLE)
X'1A' (LINEEND)
Push and Set Line End (GPSLE)
X'5A' (LINEEND)
ΓòÉΓòÉΓòÉ <hidden> GSLE/GPSLE Parameter - LINEEND ΓòÉΓòÉΓòÉ
LINEEND (GBIT8)
Value for the line-end attribute:
0x00 Drawing default
0x01 Flat
0x02 Square
0x03 Round
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> Set Line End/Push and Set Line End - Parameters ΓòÉΓòÉΓòÉ
LINEEND (GBIT8)
Value for the line-end attribute:
0x00 Drawing default
0x01 Flat
0x02 Square
0x03 Round
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> Set Line End/Push and Set Line End - Remarks ΓòÉΓòÉΓòÉ
The value of the current line-end attribute is pushed on to the Segment Call
Stack by the Push and Set order only. Both orders then set the value of the
current line-end attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Line End/Push and Set Line End - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.59. Set Line Join/Push and Set Line Join ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Line Join/Push and Set Line Join - Syntax ΓòÉΓòÉΓòÉ
These orders set the value of the current line-join attribute.
Set Line Join (GSLJ)
X'1B' (LINEJOIN)
Push and Set Line Join (GPSLJ)
X'5B' (LINEJOIN)
ΓòÉΓòÉΓòÉ <hidden> GSLJ/GPSLJ Parameter - LINEJOIN ΓòÉΓòÉΓòÉ
LINEJOIN (GBIT8)
Value for line-join attribute:
0x00 Drawing default
0x01 Bevel
0x02 Round
0x03 Miter
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> Set Line Join/Push and Set Line Join - Parameters ΓòÉΓòÉΓòÉ
LINEJOIN (GBIT8)
Value for line-join attribute:
0x00 Drawing default
0x01 Bevel
0x02 Round
0x03 Miter
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> Set Line Join/Push and Set Line Join - Remarks ΓòÉΓòÉΓòÉ
The value of the current line-join attribute is pushed on to the Segment Call
stack by the Push and Set order only. Both orders then set the value of the
current line-join attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Line Join/Push and Set Line Join - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.60. Set Line Type/Push and Set Line Type ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Line Type/Push and Set Line Type - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current line-type
attribute.
Set Line Type (GSLT)
X'18' (LINETYPE)
Push and Set Line Type (GPSLT)
X'58' (LINETYPE)
ΓòÉΓòÉΓòÉ <hidden> GSLT/GPSLT Parameter - LINETYPE ΓòÉΓòÉΓòÉ
LINETYPE (GBIT8)
Value for line-type attribute.
The value is an index into a notational line-type table:
0x00 Drawing default
0x01 Dotted line
0x02 Short dashed line
0x03 Dash-dot line
0x04 Double dotted line
0x05 Long dashed line
0x06 Dash-double-dot line
0x07 Solid line
0x08 Invisible line
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> Set Line Type/Push and Set Line Type - Parameters ΓòÉΓòÉΓòÉ
LINETYPE (GBIT8)
Value for line-type attribute.
The value is an index into a notational line-type table:
0x00 Drawing default
0x01 Dotted line
0x02 Short dashed line
0x03 Dash-dot line
0x04 Double dotted line
0x05 Long dashed line
0x06 Dash-double-dot line
0x07 Solid line
0x08 Invisible line
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> Set Line Type/Push and Set Line Type - Remarks ΓòÉΓòÉΓòÉ
The value of the current line-type attribute is pushed on to the Segment Call
Stack by the Push and Set order only. Both orders then set the value of the
current line-type attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Line Type/Push and Set Line Type - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.61. Set Line Width/Push and Set Line Width ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Line Width/Push and Set Line Width - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current line-width
attribute to the value specified in the order.
Set Line Width (GSLW)
X'19' (LINEWIDTH)
Push and Set Line Width (GPSLW)
X'59' (LINEWIDTH)
ΓòÉΓòÉΓòÉ <hidden> GSLW/GPSLW Parameter - LINEWIDTH ΓòÉΓòÉΓòÉ
LINEWIDTH (GBIT8)
Value for line-width attribute:
0x00 Drawing default
0x01-0xFF Integral multiplier of normal line width.
ΓòÉΓòÉΓòÉ <hidden> Set Line Width/Push and Set Line Width - Parameters ΓòÉΓòÉΓòÉ
LINEWIDTH (GBIT8)
Value for line-width attribute:
0x00 Drawing default
0x01-0xFF Integral multiplier of normal line width.
ΓòÉΓòÉΓòÉ <hidden> Set Line Width/Push and Set Line Width - Remarks ΓòÉΓòÉΓòÉ
The value of the current line-width attribute is pushed on to the Segment Call
stack by the Push and Set order only. Both orders then set the value of the
current line-width attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Line Width/Push and Set Line Width - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.62. Set Marker Cell/Push and Set Marker Cell ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Marker Cell/Push and Set Marker Cell - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current marker cell-size
attribute.
Set Marker Cell (GSMC)
X'37' (LEN, CELLX, CELLY, FLAGS, RES)
Push and Set Marker Cell (GPSMC)
X'77' (LEN, CELLX, CELLY, FLAGS, RES)
ΓòÉΓòÉΓòÉ <hidden> GSMC/GPSMC Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSMC/GPSMC Parameter - CELLX ΓòÉΓòÉΓòÉ
CELLX (GROSOL)
X part of marker cell-size attribute.
ΓòÉΓòÉΓòÉ <hidden> GSMC/GPSMC Parameter - CELLY ΓòÉΓòÉΓòÉ
CELLY (GROSOL)
Y part of marker cell-size attribute.
ΓòÉΓòÉΓòÉ <hidden> GSMC/GPSMC Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
This is an optional extension.
Values:
NOTDEFLT (GBIT1)
Options:
0 A cell size of zero sets drawing default
1 A cell size of zero sets to zero.
RES (GBIT7)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSMC/GPSMC Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> Set Marker Cell/Push and Set Marker Cell - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
CELLX (GROSOL)
X part of marker cell-size attribute.
CELLY (GROSOL)
Y part of marker cell-size attribute.
FLAGS
This is an optional extension.
Values:
NOTDEFLT (GBIT1)
Options:
0 A cell size of zero sets drawing default
1 A cell size of zero sets to zero.
RES (GBIT7)
Reserved value, must be 0.
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> Set Marker Cell/Push and Set Marker Cell - Remarks ΓòÉΓòÉΓòÉ
The value of the current marker cell-size attribute is pushed on to the Segment
Call stack by the Push and Set order only. Both orders then set the value of
the current marker cell-size attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Marker Cell/Push and Set Marker Cell - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.63. Set Marker Precision/Push and Set Marker Precision ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Marker Precision/Push and Set Marker Precision - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current marker-precision
attribute.
Set Marker Precision (GSMP)
X'3B' (PREC)
Push and Set Marker Precision (GPSMP)
X'7B' (PREC)
ΓòÉΓòÉΓòÉ <hidden> GSMP/GPSMP Parameter - PREC ΓòÉΓòÉΓòÉ
PREC (GBIT8)
Value for marker-precision attribute:
0x00 Drawing default
0x01 String precision
0x02 Character precision
0x03 Stroke precision
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> Set Marker Precision/Push and Set Marker Precision - Parameters ΓòÉΓòÉΓòÉ
PREC (GBIT8)
Value for marker-precision attribute:
0x00 Drawing default
0x01 String precision
0x02 Character precision
0x03 Stroke precision
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> Set Marker Precision/Push and Set Marker Precision - Remarks ΓòÉΓòÉΓòÉ
The value of the current marker-precision attribute is pushed on to the Segment
Call stack by the Push and Set order only. Both orders then set the value of
the current-marker precision attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Marker Precision/Push and Set Marker Precision - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.64. Set Marker Set/Push and Set Marker Set ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Marker Set/Push and Set Marker Set - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current marker symbol-set
attribute.
Set Marker Set (GSMS)
X'3C' (LCID)
Push and Set Marker Set (GPSMS)
X'7C' (LCID)
ΓòÉΓòÉΓòÉ <hidden> GSMS/GPSMS Parameter - LCID ΓòÉΓòÉΓòÉ
LCID (GUCHAR)
Local identifier (LCID) for the marker set:
0x00 Drawing default
0x01-0xFE LCID for the coded font
0xFF Special marker set.
ΓòÉΓòÉΓòÉ <hidden> Set Marker Set/Push and Set Marker Set - Parameters ΓòÉΓòÉΓòÉ
LCID (GUCHAR)
Local identifier (LCID) for the marker set:
0x00 Drawing default
0x01-0xFE LCID for the coded font
0xFF Special marker set.
ΓòÉΓòÉΓòÉ <hidden> Set Marker Set/Push and Set Marker Set - Remarks ΓòÉΓòÉΓòÉ
The value of the current marker symbol-set attribute is pushed on to the
Segment Call stack by the Push and Set order only. Both orders then set the
value of the current marker symbol-set attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Marker Set/Push and Set Marker Set - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.65. Set Marker Symbol/Push and Set Marker Symbol ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Marker Symbol/Push and Set Marker Symbol - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current marker symbol
attribute.
Set Marker Symbol (GSMT)
X'29' (N)
Push and Set Marker Symbol (GPSMT)
X'69' (N)
ΓòÉΓòÉΓòÉ <hidden> GSMT/GPSMT Parameter - N ΓòÉΓòÉΓòÉ
N (GBIT8)
Value of marker symbol code point. Special marker set
When this is selected (lcid = 0xFF), the values are:
0x00
Drawing default
0x01
Cross
0x02
Plus
0x03
Diamond
0x04
Square
0x05
6-point star
0x06
8-point star
0x07
Filled diamond
0x08
Filled square
0x09
Dot
0x0A
Small circle
0x40
Blank
Other
Reserved values.
Marker set
Values are as follows for any other set:
0x00
Drawing default
0x01-0xFF
These are the code points into the current marker set.
ΓòÉΓòÉΓòÉ <hidden> Set Marker Symbol/Push and Set Marker Symbol - Parameters ΓòÉΓòÉΓòÉ
N (GBIT8)
Value of marker symbol code point. Special marker set
When this is selected (lcid = 0xFF), the values are:
0x00
Drawing default
0x01
Cross
0x02
Plus
0x03
Diamond
0x04
Square
0x05
6-point star
0x06
8-point star
0x07
Filled diamond
0x08
Filled square
0x09
Dot
0x0A
Small circle
0x40
Blank
Other
Reserved values.
Marker set
Values are as follows for any other set:
0x00
Drawing default
0x01-0xFF
These are the code points into the current marker set.
ΓòÉΓòÉΓòÉ <hidden> Set Marker Symbol/Push and Set Marker Symbol - Remarks ΓòÉΓòÉΓòÉ
The value of the current marker symbol attribute is pushed on to the Segment
Call Stack by the Push and Set order only. Both orders then set the value of
the current marker symbol attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Marker Symbol/Push and Set Marker Symbol - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.66. Set Mix/Push and Set Mix ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Mix/Push and Set Mix - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current mix attribute.
Set Mix (GSMX)
X'0C' (MODE)
Push and Set Mix (GPSMX)
X'4C' (MODE)
ΓòÉΓòÉΓòÉ <hidden> GSMX/GPSMX Parameter - MODE ΓòÉΓòÉΓòÉ
MODE (GBIT8)
Mix-mode value:
0x00 Drawing default
0x01 OR
0x02 Overpaint
0x03 Reserved
0x04 Exclusive-OR
0x05 Leave alone
0x06 AND
0x07 Subtract
0x08 Source AND (inverse destination)
0x09 All zeros
0x0A Inverse (source OR destination)
0x0B Inverse (source XOR destination)
0x0C Inverse destination
0x0D Source OR (inverse destination)
0x0E Inverse source
0x0F (Inverse source) OR destination
0x10 Inverse (source AND destination)
0x11 All ones.
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> Set Mix/Push and Set Mix - Parameters ΓòÉΓòÉΓòÉ
MODE (GBIT8)
Mix-mode value:
0x00 Drawing default
0x01 OR
0x02 Overpaint
0x03 Reserved
0x04 Exclusive-OR
0x05 Leave alone
0x06 AND
0x07 Subtract
0x08 Source AND (inverse destination)
0x09 All zeros
0x0A Inverse (source OR destination)
0x0B Inverse (source XOR destination)
0x0C Inverse destination
0x0D Source OR (inverse destination)
0x0E Inverse source
0x0F (Inverse source) OR destination
0x10 Inverse (source AND destination)
0x11 All ones.
Other Reserved values.
ΓòÉΓòÉΓòÉ <hidden> Set Mix/Push and Set Mix - Remarks ΓòÉΓòÉΓòÉ
The value of the current mix attribute is pushed on to the Segment Call stack
by the Push and Set order only. Both orders then set the value of the current
mix attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Mix/Push and Set Mix - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.67. Set Model Transform/Push and Set Model Transform ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Model Transform/Push and Set Model Transform - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, values in the current model transform.
Set Model Transform (GSTM)
X'24' (LEN, RES, FLAGS, MASK, MX[LEN])
Push and Set Model Transform (GPSTM)
X'64' (LEN, RES, FLAGS, MASK, MX[LEN])
ΓòÉΓòÉΓòÉ <hidden> GSTM/GPSTM Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSTM/GPSTM Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSTM/GPSTM Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Values:
RES (GBIT6)
Reserved value, must be 0.
CM (GBIT2)
Matrix control bits:
B"00" Unity matrix
B"01" Concatenate after
B"10" Concatenate before
B"11" Overwrite.
ΓòÉΓòÉΓòÉ <hidden> GSTM/GPSTM Parameter - MASK ΓòÉΓòÉΓòÉ
MASK (GBIT16)
Load mask.
ΓòÉΓòÉΓòÉ <hidden> GSTM/GPSTM Parameter - MX[LEN] ΓòÉΓòÉΓòÉ
MX[LEN] (GROSOL)
Matrix values.
The matrix size is based on the number of bits set in MASK.
ΓòÉΓòÉΓòÉ <hidden> Set Model Transform/Push and Set Model Transform - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
RES (GBIT8)
Reserved value, must be 0.
FLAGS
Values:
RES (GBIT6)
Reserved value, must be 0.
CM (GBIT2)
Matrix control bits:
B"00" Unity matrix
B"01" Concatenate after
B"10" Concatenate before
B"11" Overwrite.
MASK (GBIT16)
Load mask.
MX[LEN] (GROSOL)
Matrix values.
The matrix size is based on the number of bits set in MASK.
ΓòÉΓòÉΓòÉ <hidden> Set Model Transform/Push and Set Model Transform - Remarks ΓòÉΓòÉΓòÉ
The value of the current model transform is pushed on to the Segment Call stack
by the Push and Set order only. Both orders then set values in the current
model transform as specified in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Model Transform/Push and Set Model Transform - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.68. Set Pattern Reference Point/Push and Set Pattern Reference Point ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Pattern Reference Point/Push and Set Pattern Reference Point - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current pattern
reference-point attribute.
Set Pattern Reference Point (GSPRP)
X'A0' (LEN, FLAGS, RES, PREF)
Push and Set Pattern Reference Point (GPSPRP)
X'E0' (LEN, FLAGS, RES, PREF)
ΓòÉΓòÉΓòÉ <hidden> GSPRP/GPSPRP Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSPRP/GPSPRP Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Values:
DEFAULT (GBIT1)
Options:
0 Set to specified value
1 Set to the drawing default.
RES (GBIT7)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSPRP/GPSPRP Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSPRP/GPSPRP Parameter - PREF ΓòÉΓòÉΓòÉ
PREF (GPOINT)
Coordinate data of the pattern-reference point.
ΓòÉΓòÉΓòÉ <hidden> Set Pattern Reference Point/Push and Set Pattern Reference Point - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
FLAGS
Values:
DEFAULT (GBIT1)
Options:
0 Set to specified value
1 Set to the drawing default.
RES (GBIT7)
Reserved value, must be 0.
RES (GBIT8)
Reserved value, must be 0.
PREF (GPOINT)
Coordinate data of the pattern-reference point.
ΓòÉΓòÉΓòÉ <hidden> Set Pattern Reference Point/Push and Set Pattern Reference Point - Remarks ΓòÉΓòÉΓòÉ
The value of the current pattern reference-point attribute is pushed on to the
Segment Call stack by the Push and Set order only. Both orders then set the
value of the current reference-point attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Pattern Reference Point/Push and Set Pattern Reference Point - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.69. Set Pattern Set/Push and Set Pattern Set ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Pattern Set/Push and Set Pattern Set - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current pattern symbol-set
attribute.
Set Pattern Set (GSPS)
X'08' (LCID)
Push and Set Pattern Set (GPSPS)
X'48' (LCID)
ΓòÉΓòÉΓòÉ <hidden> GSPS/GPSPS Parameter - LCID ΓòÉΓòÉΓòÉ
LCID (GUCHAR)
Local identifier (LCID) for the pattern set:
0x00 Drawing default
0x01-0xFE LCID for the symbol set
0xFF Special pattern set.
ΓòÉΓòÉΓòÉ <hidden> Set Pattern Set/Push and Set Pattern Set - Parameters ΓòÉΓòÉΓòÉ
LCID (GUCHAR)
Local identifier (LCID) for the pattern set:
0x00 Drawing default
0x01-0xFE LCID for the symbol set
0xFF Special pattern set.
ΓòÉΓòÉΓòÉ <hidden> Set Pattern Set/Push and Set Pattern Set - Remarks ΓòÉΓòÉΓòÉ
The value of the current pattern symbol-set attribute is pushed on to the
Segment Call stack by the Push and Set order only. Both orders then set the
value of the current pattern symbol-set attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Pattern Set/Push and Set Pattern Set - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.70. Set Pattern Symbol/Push and Set Pattern Symbol ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Pattern Symbol/Push and Set Pattern Symbol - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current pattern-symbol
attribute.
Set Pattern Symbol (GSPT)
X'28' (PATT)
Push and Set Pattern Symbol (GPSPT)
X'09' (PATT)
ΓòÉΓòÉΓòÉ <hidden> GSPT/GPSPT Parameter - PATT ΓòÉΓòÉΓòÉ
PATT (GBIT8)
Value for pattern-symbol attribute.
Special pattern set
When this is selected (lcid = 0xFF), the values are:
0x00
Drawing default
0x01-0x08
Density one through density eight (decreasing)
0x09
Vertical lines
0x0A
Horizontal lines
0x0B
Diagonal lines 1 (bottom-left to top-right)
0x0C
Diagonal lines 2 (bottom-left to top-right)
0x0D
Diagonal lines 1 (top-left to bottom-right)
0x0E
Diagonal lines 2 (top-left to bottom-right)
0x0F
No shading
0x10
Solid shading
0x40
Blank.
Other
Reserved values.
Pattern set
Values are as follows for any other set:
0x00
Drawing default
0x01-0xFF
These are the code points into the current pattern set.
ΓòÉΓòÉΓòÉ <hidden> Set Pattern Symbol/Push and Set Pattern Symbol - Parameters ΓòÉΓòÉΓòÉ
PATT (GBIT8)
Value for pattern-symbol attribute.
Special pattern set
When this is selected (lcid = 0xFF), the values are:
0x00
Drawing default
0x01-0x08
Density one through density eight (decreasing)
0x09
Vertical lines
0x0A
Horizontal lines
0x0B
Diagonal lines 1 (bottom-left to top-right)
0x0C
Diagonal lines 2 (bottom-left to top-right)
0x0D
Diagonal lines 1 (top-left to bottom-right)
0x0E
Diagonal lines 2 (top-left to bottom-right)
0x0F
No shading
0x10
Solid shading
0x40
Blank.
Other
Reserved values.
Pattern set
Values are as follows for any other set:
0x00
Drawing default
0x01-0xFF
These are the code points into the current pattern set.
ΓòÉΓòÉΓòÉ <hidden> Set Pattern Symbol/Push and Set Pattern Symbol - Remarks ΓòÉΓòÉΓòÉ
The value of the current pattern-symbol attribute is pushed on to the Segment
Call stack by the Push and Set order only. Both orders then set the value of
the current pattern-symbol attribute to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Pattern Symbol/Push and Set Pattern Symbol - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.71. Set Pick Identifier/Push and Set Pick Identifier ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Pick Identifier/Push and Set Pick Identifier - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current pick identifier.
Set Pick Identifier (GSPIK)
X'43' (LEN, PKID)
Push and Set Pick Identifier (GPSPIK)
X'23' (LEN, PKID)
ΓòÉΓòÉΓòÉ <hidden> GSPIK/GPSPIK Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSPIK/GPSPIK Parameter - PKID ΓòÉΓòÉΓòÉ
PKID (GLONG)
Pick identifier.
ΓòÉΓòÉΓòÉ <hidden> Set Pick Identifier/Push and Set Pick Identifier - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
PKID (GLONG)
Pick identifier.
ΓòÉΓòÉΓòÉ <hidden> Set Pick Identifier/Push and Set Pick Identifier - Remarks ΓòÉΓòÉΓòÉ
The value of the current pick identifier is pushed on to the Segment Call stack
by the Push and Set order only. Both orders then set the value of the current
pick identifier to the value in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Pick Identifier/Push and Set Pick Identifier - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.72. Set Segment Boundary ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Segment Boundary - Syntax ΓòÉΓòÉΓòÉ
This order defines the maximum extent of the boundaries of the associated root
segment. It is valid only in a root segment prolog.
Set Segment Boundary (GSSB)
X'32' (LEN, RES, MASK, BB[LEN])
ΓòÉΓòÉΓòÉ <hidden> GSSB Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSSB Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSSB Parameter - MASK ΓòÉΓòÉΓòÉ
MASK
Values:
RES1 (GBIT2)
Reserved value, must be 0.
XL (GBIT1)
X left limit.
0 Not included in list of BB values
1 Is included in list of BB values.
XR (GBIT1)
X right limit.
0 Not included in list of BB values
1 Is included in list of BB values.
YB (GBIT1)
Y bottom limit.
0 Not included in list of BB values
1 Is included in list of BB values.
YT (GBIT1)
Y top limit.
0 Not included in list of BB values
1 Is included in list of BB values.
RES2 (GBIT2)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSSB Parameter - BB[LEN] ΓòÉΓòÉΓòÉ
BB[LEN] (GROSOL)
Boundary values.
ΓòÉΓòÉΓòÉ <hidden> Set Segment Boundary - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
RES (GBIT8)
Reserved value, must be 0.
MASK
Values:
RES1 (GBIT2)
Reserved value, must be 0.
XL (GBIT1)
X left limit.
0 Not included in list of BB values
1 Is included in list of BB values.
XR (GBIT1)
X right limit.
0 Not included in list of BB values
1 Is included in list of BB values.
YB (GBIT1)
Y bottom limit.
0 Not included in list of BB values
1 Is included in list of BB values.
YT (GBIT1)
Y top limit.
0 Not included in list of BB values
1 Is included in list of BB values.
RES2 (GBIT2)
Reserved value, must be 0.
BB[LEN] (GROSOL)
Boundary values.
ΓòÉΓòÉΓòÉ <hidden> Set Segment Boundary - Remarks ΓòÉΓòÉΓòÉ
The order is only valid in a root-segment prolog.
ΓòÉΓòÉΓòÉ <hidden> Set Segment Boundary - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.73. Set Stroke Line Width/Push and Set Stroke Line Width ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Stroke Line Width/Push and Set Stroke Line Width - Syntax ΓòÉΓòÉΓòÉ
These orders set the current stroke line-width attribute.
Set Stroke Line Width (GSSLW)
X'15' (LEN, FLAGS, RES, STRWIDTH)
Push and Set Stroke Line Width (GPSSLW)
X'55' (LEN, FLAGS, RES, STRWIDTH)
ΓòÉΓòÉΓòÉ <hidden> GSSLW/GPSSLW Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSSLW/GPSSLW Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
DEFLT (GBIT1)
Values:
0 Set to value
1 Set to drawing default.
RES (GBIT7)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSSLW/GPSSLW Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSSLW/GPSSLW Parameter - STRWIDTH ΓòÉΓòÉΓòÉ
STRWIDTH (GROSOL)
Value for stroke width.
ΓòÉΓòÉΓòÉ <hidden> Set Stroke Line Width/Push and Set Stroke Line Width - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
FLAGS
DEFLT (GBIT1)
Values:
0 Set to value
1 Set to drawing default.
RES (GBIT7)
Reserved value, must be 0.
RES (GBIT8)
Reserved value, must be 0.
STRWIDTH (GROSOL)
Value for stroke width.
ΓòÉΓòÉΓòÉ <hidden> Set Stroke Line Width/Push and Set Stroke Line Width - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.74. Set Text Alignment/Push and Set Text Alignment ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Text Alignment/Push and Set Text Alignment - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the value of the current text alignment
attribute.
Set Text Alignment (GSCSA)
X'10' (LEN, HORIZ, VERT)
Push and Set Text Alignment (GPSCSA)
X'50' (LEN, HORIZ, VERT)
ΓòÉΓòÉΓòÉ <hidden> GSCSA/GPSCSA Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSCSA/GPSCSA Parameter - HORIZ ΓòÉΓòÉΓòÉ
HORIZ (GUCHAR)
Horizontal alignment as follows:
0x00 Drawing default.
0x01 Normal alignment. The alignment assumed depends on the current
character direction:
Left to right Left alignment.
Top to bottom Center alignment.
Right to left Right alignment.
Bottom to top Center alignment.
0x02 Left alignment. The string is aligned on the left edge of its
leftmost character.
0x03 Center alignment. The string is aligned on the arithmetic mean
of left and right.
0x04 Right alignment. The string is aligned on the right edge of its
rightmost character.
0xFF Standard alignment. The alignment assumed depends on the current
character direction:
Left to right Left alignment.
Top to bottom Left alignment.
Right to left Right alignment.
Bottom to top Left alignment.
ΓòÉΓòÉΓòÉ <hidden> GSCSA/GPSCSA Parameter - VERT ΓòÉΓòÉΓòÉ
VERT (GUCHAR)
Vertical alignment as follows:
0x00 Drawing default.
0x01 Normal alignment. The alignment assumed depends on the current
character direction:
Left to right Base alignment.
Top to bottom Top alignment.
Right to left Base alignment.
Bottom to top Bottom alignment.
0x02 Top Alignment. The string is aligned on the top edge of its
topmost character.
0x03 Reserved.
0x04 Half alignment. The string is aligned on the arithmetic mean of
top and bottom.
0x05 Base alignment. The string is aligned on the base of its bottom
character.
0x06 Bottom Alignment. The string is aligned on the bottom edge of
its bottom character.
0xFF Standard alignment. The alignment assumed depends on the current
character direction:
Left to right Bottom alignment.
Top to bottom Top alignment.
Right to left Bottom alignment.
Bottom to top Bottom alignment.
ΓòÉΓòÉΓòÉ <hidden> Set Text Alignment/Push and Set Text Alignment - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
HORIZ (GUCHAR)
Horizontal alignment as follows:
0x00 Drawing default.
0x01 Normal alignment. The alignment assumed depends on the current
character direction:
Left to right Left alignment.
Top to bottom Center alignment.
Right to left Right alignment.
Bottom to top Center alignment.
0x02 Left alignment. The string is aligned on the left edge of its
leftmost character.
0x03 Center alignment. The string is aligned on the arithmetic mean
of left and right.
0x04 Right alignment. The string is aligned on the right edge of its
rightmost character.
0xFF Standard alignment. The alignment assumed depends on the current
character direction:
Left to right Left alignment.
Top to bottom Left alignment.
Right to left Right alignment.
Bottom to top Left alignment.
VERT (GUCHAR)
Vertical alignment as follows:
0x00 Drawing default.
0x01 Normal alignment. The alignment assumed depends on the current
character direction:
Left to right Base alignment.
Top to bottom Top alignment.
Right to left Base alignment.
Bottom to top Bottom alignment.
0x02 Top Alignment. The string is aligned on the top edge of its
topmost character.
0x03 Reserved.
0x04 Half alignment. The string is aligned on the arithmetic mean of
top and bottom.
0x05 Base alignment. The string is aligned on the base of its bottom
character.
0x06 Bottom Alignment. The string is aligned on the bottom edge of
its bottom character.
0xFF Standard alignment. The alignment assumed depends on the current
character direction:
Left to right Bottom alignment.
Top to bottom Top alignment.
Right to left Bottom alignment.
Bottom to top Bottom alignment.
ΓòÉΓòÉΓòÉ <hidden> Set Text Alignment/Push and Set Text Alignment - Remarks ΓòÉΓòÉΓòÉ
The value of the current text alignment attribute is pushed on to the Segment
Call stack by the Push and Set order only. Both orders set the value of the
current text alignment attribute to the value specified in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Text Alignment/Push and Set Text Alignment - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.75. Set Viewing Transform ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Viewing Transform - Syntax ΓòÉΓòÉΓòÉ
This order sets the current viewing transform.
Set Viewing Transform (GSTV)
X'31' (LEN, RES, FLAGS, MASK, MX[LEN])
ΓòÉΓòÉΓòÉ <hidden> GSTV Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSTV Parameter - RES ΓòÉΓòÉΓòÉ
RES (GBIT8)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSTV Parameter - FLAGS ΓòÉΓòÉΓòÉ
FLAGS
Values:
RES1 (GBIT5)
Reserved value, must be 0.
CONTROL (GBIT1)
Values:
0 Concatenate before drawing default
1 Concatenate before the current viewing transform.
RES2 (GBIT2)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSTV Parameter - MASK ΓòÉΓòÉΓòÉ
MASK (GBIT16)
Load mask.
ΓòÉΓòÉΓòÉ <hidden> GSTV Parameter - MX[LEN] ΓòÉΓòÉΓòÉ
MX[LEN] (GROSOL)
Matrix values.
ΓòÉΓòÉΓòÉ <hidden> Set Viewing Transform - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
RES (GBIT8)
Reserved value, must be 0.
FLAGS
Values:
RES1 (GBIT5)
Reserved value, must be 0.
CONTROL (GBIT1)
Values:
0 Concatenate before drawing default
1 Concatenate before the current viewing transform.
RES2 (GBIT2)
Reserved value, must be 0.
MASK (GBIT16)
Load mask.
MX[LEN] (GROSOL)
Matrix values.
ΓòÉΓòÉΓòÉ <hidden> Set Viewing Transform - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Glossary
ΓòÉΓòÉΓòÉ 2.76. Set Viewing Window/Push and Set Viewing Window ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Set Viewing Window/Push and Set Viewing Window - Syntax ΓòÉΓòÉΓòÉ
These orders set, or push and set, the current viewing window.
Set Viewing Window (GSVW)
X'27' (LEN, FLAG, MASK, WW[LEN])
Push and Set Viewing Window (GPSVW)
X'67' (LEN, FLAG, MASK, WW[LEN])
ΓòÉΓòÉΓòÉ <hidden> GSVW/GPSVW Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSVW/GPSVW Parameter - FLAG ΓòÉΓòÉΓòÉ
FLAG
Values:
REPLACE (GBIT1)
Values:
0 Intersect with current window
1 Replace current with new window.
RES (GBIT7)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSVW/GPSVW Parameter - MASK ΓòÉΓòÉΓòÉ
MASK
Values:
RES1 (GBIT2)
Reserved value, must be 0.
XL (GBIT1)
X left limit.
0 Not included in list of WW values
1 Is included in list of WW values
XR (GBIT1)
X right limit.
0 Not included in list of WW values
1 Is included in list of WW values
YB (GBIT1)
Y bottom limit.
0 Not included in list of WW values
1 Is included in list of WW values
YT (GBIT1)
Y top limit.
0 Not included in list of WW values
1 Is included in list of WW values
RES2 (GBIT2)
Reserved value, must be 0.
ΓòÉΓòÉΓòÉ <hidden> GSVW/GPSVW Parameter - WW[LEN] ΓòÉΓòÉΓòÉ
WW[LEN] (GROSOL)
Window values.
ΓòÉΓòÉΓòÉ <hidden> Set Viewing Window/Push and Set Viewing Window - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
FLAG
Values:
REPLACE (GBIT1)
Values:
0 Intersect with current window
1 Replace current with new window.
RES (GBIT7)
Reserved value, must be 0.
MASK
Values:
RES1 (GBIT2)
Reserved value, must be 0.
XL (GBIT1)
X left limit.
0 Not included in list of WW values
1 Is included in list of WW values
XR (GBIT1)
X right limit.
0 Not included in list of WW values
1 Is included in list of WW values
YB (GBIT1)
Y bottom limit.
0 Not included in list of WW values
1 Is included in list of WW values
YT (GBIT1)
Y top limit.
0 Not included in list of WW values
1 Is included in list of WW values
RES2 (GBIT2)
Reserved value, must be 0.
WW[LEN] (GROSOL)
Window values.
ΓòÉΓòÉΓòÉ <hidden> Set Viewing Window/Push and Set Viewing Window - Remarks ΓòÉΓòÉΓòÉ
The value of the current viewing window is pushed on to the Segment Call stack
by the Push and Set order only. Both orders then set the current viewing window
using the values in the order.
ΓòÉΓòÉΓòÉ <hidden> Set Viewing Window/Push and Set Viewing Window - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 2.77. Sharp Fillet at Given Position/Sharp Fillet at Current Position ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Sharp Fillet at Given Position/Sharp Fillet at Current Position - Syntax ΓòÉΓòÉΓòÉ
This order generates a curve that starts at a given position, and uses points
P1 and P2, together with the sharpness specification S1.
Sharp Fillet at Given Position (GSFLT)
X'E4' (LEN, P0, P1, P2, P3, P4, PN-1, PN, S1, S2, SN/2)
Sharp Fillet at Current Position (GCSFLT)
X'A4' (LEN, P1, P2, P3, P4, PN-1, PN, S1, S2, SN/2)
ΓòÉΓòÉΓòÉ <hidden> GSFLT/GCSFLT Parameter - LEN ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
ΓòÉΓòÉΓòÉ <hidden> GSFLT/GCSFLT Parameter - P0 ΓòÉΓòÉΓòÉ
P0 (GPOINT)
Coordinate data of first curve start.
This parameter is only present in a Sharp Fillet at Given Position order.
ΓòÉΓòÉΓòÉ <hidden> GSFLT/GCSFLT Parameter - P1 ΓòÉΓòÉΓòÉ
P1 (GPOINT)
Coordinate data of first curve control point.
ΓòÉΓòÉΓòÉ <hidden> GSFLT/GCSFLT Parameter - P2 ΓòÉΓòÉΓòÉ
P2 (GPOINT)
Coordinate data of first curve end.
ΓòÉΓòÉΓòÉ <hidden> GSFLT/GCSFLT Parameter - P3 ΓòÉΓòÉΓòÉ
P3 (GPOINT)
Coordinate data of second curve control point.
ΓòÉΓòÉΓòÉ <hidden> GSFLT/GCSFLT Parameter - P4 ΓòÉΓòÉΓòÉ
P4 (GPOINT)
Coordinate data of second curve end.
ΓòÉΓòÉΓòÉ <hidden> GSFLT/GCSFLT Parameter - PN-1 ΓòÉΓòÉΓòÉ
PN-1 (GPOINT)
Coordinate data of last curve control point.
ΓòÉΓòÉΓòÉ <hidden> GSFLT/GCSFLT Parameter - PN ΓòÉΓòÉΓòÉ
PN (GPOINT)
Coordinate data of last curve end.
ΓòÉΓòÉΓòÉ <hidden> GSFLT/GCSFLT Parameter - S1 ΓòÉΓòÉΓòÉ
S1 (GROF)
Sharpness specification of first curve.
ΓòÉΓòÉΓòÉ <hidden> GSFLT/GCSFLT Parameter - S2 ΓòÉΓòÉΓòÉ
S2 (GROF)
Sharpness specification of second curve.
ΓòÉΓòÉΓòÉ <hidden> GSFLT/GCSFLT Parameter - SN/2 ΓòÉΓòÉΓòÉ
SN/2 (GROF)
Sharpness specification of last curve.
ΓòÉΓòÉΓòÉ <hidden> Sharp Fillet at Given Position/Sharp Fillet at Current Position - Parameters ΓòÉΓòÉΓòÉ
LEN (GLENGTH1)
Length of following data.
P0 (GPOINT)
Coordinate data of first curve start.
This parameter is only present in a Sharp Fillet at Given Position order.
P1 (GPOINT)
Coordinate data of first curve control point.
P2 (GPOINT)
Coordinate data of first curve end.
P3 (GPOINT)
Coordinate data of second curve control point.
P4 (GPOINT)
Coordinate data of second curve end.
PN-1 (GPOINT)
Coordinate data of last curve control point.
PN (GPOINT)
Coordinate data of last curve end.
S1 (GROF)
Sharpness specification of first curve.
S2 (GROF)
Sharpness specification of second curve.
SN/2 (GROF)
Sharpness specification of last curve.
ΓòÉΓòÉΓòÉ <hidden> Sharp Fillet at Given Position/Sharp Fillet at Current Position - Remarks ΓòÉΓòÉΓòÉ
Further points are used in groups of two to form a polycurve.
ΓòÉΓòÉΓòÉ <hidden> Sharp Fillet at Given Position/Sharp Fillet at Current Position - Topics ΓòÉΓòÉΓòÉ
Select an item:
Syntax
Parameters
Remarks
Glossary
ΓòÉΓòÉΓòÉ 3. Graphics Orders Data Types ΓòÉΓòÉΓòÉ
All data types are in Intel** format, unless noted otherwise.
ΓòÉΓòÉΓòÉ 3.1. GBIT1 ΓòÉΓòÉΓòÉ
1-bit field.
ΓòÉΓòÉΓòÉ 3.2. GBIT2 ΓòÉΓòÉΓòÉ
2-bit field.
ΓòÉΓòÉΓòÉ 3.3. GBIT4 ΓòÉΓòÉΓòÉ
4-bit field.
ΓòÉΓòÉΓòÉ 3.4. GBIT5 ΓòÉΓòÉΓòÉ
5-bit field.
ΓòÉΓòÉΓòÉ 3.5. GBIT6 ΓòÉΓòÉΓòÉ
6-bit field.
ΓòÉΓòÉΓòÉ 3.6. GBIT7 ΓòÉΓòÉΓòÉ
7-bit field.
ΓòÉΓòÉΓòÉ 3.7. GBIT8 ΓòÉΓòÉΓòÉ
8-bit field.
ΓòÉΓòÉΓòÉ 3.8. GBIT16 ΓòÉΓòÉΓòÉ
16-bit field.
ΓòÉΓòÉΓòÉ 3.9. GBIT32 ΓòÉΓòÉΓòÉ
32-bit field.
ΓòÉΓòÉΓòÉ 3.10. GCHAR ΓòÉΓòÉΓòÉ
Signed 1-byte integer value.
ΓòÉΓòÉΓòÉ 3.11. GDELPOINT ΓòÉΓòÉΓòÉ
Offset point structure.
ΓòÉΓòÉΓòÉ <hidden> GDELPOINT Field - dx ΓòÉΓòÉΓòÉ
dx (GCHAR)
x coordinate offset.
ΓòÉΓòÉΓòÉ <hidden> GDELPOINT Field - dy ΓòÉΓòÉΓòÉ
dy (GCHAR)
y coordinate offset.
ΓòÉΓòÉΓòÉ 3.12. GFIXED ΓòÉΓòÉΓòÉ
Signed integer fraction (16:16). (This can be treated as a GLONG where the
value has been multiplied by 65536.)
ΓòÉΓòÉΓòÉ 3.13. GFIXEDS ΓòÉΓòÉΓòÉ
Signed integer fraction (8:8), which can be treated as a GSHORT data type,
where the value has been multiplied by 256.
ΓòÉΓòÉΓòÉ <hidden> GFIXEDS Field - Integer ΓòÉΓòÉΓòÉ
Integer (GCHAR)
Integral component.
ΓòÉΓòÉΓòÉ <hidden> GFIXEDS Field - Fraction ΓòÉΓòÉΓòÉ
Fraction (GUCHAR)
Fractional component.
ΓòÉΓòÉΓòÉ 3.14. GHBITMAP ΓòÉΓòÉΓòÉ
Bit-map handle, which is the same as GULONG.
ΓòÉΓòÉΓòÉ 3.15. GINDATT ΓòÉΓòÉΓòÉ
Individual attribute value. For the attribute types color and background
color, this is the same as GINDEX3. For the attribute types mix and background
color, this is the same as GUCHAR.
ΓòÉΓòÉΓòÉ 3.16. GINDEX3 ΓòÉΓòÉΓòÉ
Unsigned 3-byte integer value.
ΓòÉΓòÉΓòÉ 3.17. GLENGTH1 ΓòÉΓòÉΓòÉ
1-byte length.
ΓòÉΓòÉΓòÉ 3.18. GLENGTH2 ΓòÉΓòÉΓòÉ
2-byte length, in S/370 format; that is, the high-order byte precedes the
low-order byte in storage.
ΓòÉΓòÉΓòÉ 3.19. GLONG ΓòÉΓòÉΓòÉ
Signed 4-byte integer value.
ΓòÉΓòÉΓòÉ 3.20. GPOINT ΓòÉΓòÉΓòÉ
Point structure.
ΓòÉΓòÉΓòÉ <hidden> GPOINT Field - x ΓòÉΓòÉΓòÉ
x (GROSOL)
x coordinate.
ΓòÉΓòÉΓòÉ <hidden> GPOINT Field - y ΓòÉΓòÉΓòÉ
y (GROSOL)
y coordinate.
ΓòÉΓòÉΓòÉ 3.21. GPOINTB ΓòÉΓòÉΓòÉ
Point in bit-map structure.
ΓòÉΓòÉΓòÉ <hidden> GPOINTB Field - x ΓòÉΓòÉΓòÉ
x (GLONG)
x coordinate.
ΓòÉΓòÉΓòÉ <hidden> GPOINTB Field - y ΓòÉΓòÉΓòÉ
y (GLONG)
y coordinate.
ΓòÉΓòÉΓòÉ 3.22. GPOLYS ΓòÉΓòÉΓòÉ
Array of Polygons. Each element of the array is a 16 bit count of the number of
vertices, followed by the vertex coordinates.
ΓòÉΓòÉΓòÉ 3.23. GREAL ΓòÉΓòÉΓòÉ
Real (single precision floating point).
This data type is in Intel format.
ΓòÉΓòÉΓòÉ 3.24. GROF ΓòÉΓòÉΓòÉ
Number representation which is the same as the GFIXED data type.
ΓòÉΓòÉΓòÉ 3.25. GROFUFS ΓòÉΓòÉΓòÉ
Number representation which is either GFIXED, GUFIXEDS or GREAL data type,
depending on the presentation-space format.
ΓòÉΓòÉΓòÉ 3.26. GROUFS ΓòÉΓòÉΓòÉ
Number representation which is either the GUFIXEDS or GREAL data type,
depending on the presentation-space format.
ΓòÉΓòÉΓòÉ 3.27. GROL ΓòÉΓòÉΓòÉ
Number representation, which is the same as the GLONG data type.
ΓòÉΓòÉΓòÉ 3.28. GROSOL ΓòÉΓòÉΓòÉ
Number representation which is either the GSHORT or the GLONG data type,
depending on the presentation-space format; see PS_FORMAT in the flOptions
parameter of the GpiCreatePS function.
ΓòÉΓòÉΓòÉ 3.29. GROUL ΓòÉΓòÉΓòÉ
Number representation, which is the same as the GULONG data type.
ΓòÉΓòÉΓòÉ 3.30. GSHORT ΓòÉΓòÉΓòÉ
Signed 2-byte integer value.
ΓòÉΓòÉΓòÉ 3.31. GSHORT370 ΓòÉΓòÉΓòÉ
Signed 2-byte integer value, in S/370 format (that is, the high-order byte
precedes the low-order byte in storage).
ΓòÉΓòÉΓòÉ 3.32. GSTR ΓòÉΓòÉΓòÉ
String with an explicit length count.
ΓòÉΓòÉΓòÉ 3.33. GUCHAR ΓòÉΓòÉΓòÉ
Unsigned 1-byte integer value.
ΓòÉΓòÉΓòÉ 3.34. GUFIXEDS ΓòÉΓòÉΓòÉ
Unsigned integer fraction (8:8) which can be treated as a GUSHORT data type,
where the value has been multiplied by 256.
ΓòÉΓòÉΓòÉ 3.35. GULONG ΓòÉΓòÉΓòÉ
Unsigned 4-byte integer value.
ΓòÉΓòÉΓòÉ 3.36. GULONG370 ΓòÉΓòÉΓòÉ
Unsigned 4-byte integer value, in S/370 format (that is, the high-order byte
first, the low-order byte last in storage).
ΓòÉΓòÉΓòÉ 3.37. GUNDF ΓòÉΓòÉΓòÉ
Undefined string of 8-bit bytes.
ΓòÉΓòÉΓòÉ 3.38. GUNDF1 ΓòÉΓòÉΓòÉ
Undefined 8-bit byte.
ΓòÉΓòÉΓòÉ 3.39. GUSHORT ΓòÉΓòÉΓòÉ
Unsigned 2-byte integer value.
ΓòÉΓòÉΓòÉ 3.40. GUSHORT370 ΓòÉΓòÉΓòÉ
Unsigned 2-byte integer value, in S/370 format; that is, the high-order byte
precedes the low-order byte in storage.
ΓòÉΓòÉΓòÉ 4. Errors ΓòÉΓòÉΓòÉ
Error codes are furnished numerically and alphabetically.
For a listing of error codes by number, see Error Number and Name.
For a listing of error codes and their explanations, see Error Name and
Explanation.
ΓòÉΓòÉΓòÉ 4.1. Error Number and Name ΓòÉΓòÉΓòÉ
This section lists PM errors returned by WinGetLastError in order of their
error numbers. For explanations of these errors, see Error Name and
Explanation.
Error Number Error Constant
0x0000 PMERR_OK
0x0000 PMERR_OK
0x0000 PMERR_OK
0x0836 NERR_NetNotStarted
0x0845 NERR_RedirectedPath
0x084B NERR_BufTooSmall
0x085E NERR_InvalidAPI
0x0866 NERR_QNotFound
0x0867 NERR_JobNotFound
0x0868 NERR_DestNotFound
0x0869 NERR_DestExists
0x086A NERR_QExists
0x086B NERR_QNoRoom
0x086C NERR_JobNoRoom
0x086D NERR_DestNoRoom
0x086E NERR_DestIdle
0x086F NERR_DestInvalidOp
0x0871 NERR_SpoolerNotLoaded
0x0872 NERR_DestInvalidState
0x0874 NERR_JobInvalidState
0x0875 NERR_SpoolNoMemory
0x0876 NERR_DriverNotFound
0x0877 NERR_DataTypeInvalid
0x0878 NERR_ProcNotFound
0x0925 NERR_BadDev
0x0927 NERR_CommDevInUse
0x092F NERR_InvalidComputer
0x0961 NERR_OpenFiles
0x0965 NERR_LocalDrive
0x1001 PMERR_INVALID_HWND
0x1001 HMERR_NO_FRAME_WND_IN_CHAIN
0x1002 PMERR_INVALID_HMQ
0x1002 HMERR_INVALID_ASSOC_APP_WND
0x1003 PMERR_PARAMETER_OUT_OF_RANGE
0x1003 HMERR_INVALID_ASSOC_HELP_INST
0x1004 PMERR_WINDOW_LOCK_UNDERFLOW
0x1004 HMERR_INVALID_DESTROY_HELP_INST
0x1005 PMERR_WINDOW_LOCK_OVERFLOW
0x1005 HMERR_NO_HELP_INST_IN_CHAIN
0x1006 PMERR_BAD_WINDOW_LOCK_COUNT
0x1006 HMERR_INVALID_HELP_INSTANCE_HDL
0x1007 PMERR_WINDOW_NOT_LOCKED
0x1007 HMERR_INVALID_QUERY_APP_WND
0x1008 PMERR_INVALID_SELECTOR
0x1008 HMERR_HELP_INST_CALLED_INVALID
0x1009 PMERR_CALL_FROM_WRONG_THREAD
0x1009 HMERR_HELPTABLE_UNDEFINE
0x100A PMERR_RESOURCE_NOT_FOUND
0x100A HMERR_HELP_INSTANCE_UNDEFINE
0x100B PMERR_INVALID_STRING_PARM
0x100B HMERR_HELPITEM_NOT_FOUND
0x100C PMERR_INVALID_HHEAP
0x100C HMERR_INVALID_HELPSUBITEM_SIZE
0x100D PMERR_INVALID_HEAP_POINTER
0x100D HMERR_HELPSUBITEM_NOT_FOUND
0x100E PMERR_INVALID_HEAP_SIZE_PARM
0x100F PMERR_INVALID_HEAP_SIZE
0x1010 PMERR_INVALID_HEAP_SIZE_WORD
0x1011 PMERR_HEAP_OUT_OF_MEMORY
0x1012 PMERR_HEAP_MAX_SIZE_REACHED
0x1013 PMERR_INVALID_HATOMTBL
0x1014 PMERR_INVALID_ATOM
0x1015 PMERR_INVALID_ATOM_NAME
0x1016 PMERR_INVALID_INTEGER_ATOM
0x1017 PMERR_ATOM_NAME_NOT_FOUND
0x1018 PMERR_QUEUE_TOO_LARGE
0x1019 PMERR_INVALID_FLAG
0x101A PMERR_INVALID_HACCEL
0x101B PMERR_INVALID_HPTR
0x101C PMERR_INVALID_HENUM
0x101D PMERR_INVALID_SRC_CODEPAGE
0x101E PMERR_INVALID_DST_CODEPAGE
0x101F PMERR_UNKNOWN_COMPONENT_ID
0x1020 PMERR_UNKNOWN_ERROR_CODE
0x1021 PMERR_SEVERITY_LEVELS
0x1034 PMERR_INVALID_RESOURCE_FORMAT
0x1035 WINDBG_WINDOW_UNLOCK_WAIT
0x1036 PMERR_NO_MSG_QUEUE
0x1037 PMERR_CANNOT_SET_FOCUS
0x1038 PMERR_QUEUE_FULL
0x1039 PMERR_LIBRARY_LOAD_FAILED
0x103A PMERR_PROCEDURE_LOAD_FAILED
0x103B PMERR_LIBRARY_DELETE_FAILED
0x103C PMERR_PROCEDURE_DELETE_FAILED
0x103D PMERR_ARRAY_TOO_LARGE
0x103E PMERR_ARRAY_TOO_SMALL
0x103F PMERR_DATATYPE_ENTRY_BAD_INDEX
0x1040 PMERR_DATATYPE_ENTRY_CTL_BAD
0x1041 PMERR_DATATYPE_ENTRY_CTL_MISS
0x1042 PMERR_DATATYPE_ENTRY_INVALID
0x1043 PMERR_DATATYPE_ENTRY_NOT_NUM
0x1044 PMERR_DATATYPE_ENTRY_NOT_OFF
0x1045 PMERR_DATATYPE_INVALID
0x1046 PMERR_DATATYPE_NOT_UNIQUE
0x1047 PMERR_DATATYPE_TOO_LONG
0x1048 PMERR_DATATYPE_TOO_SMALL
0x1049 PMERR_DIRECTION_INVALID
0x104A PMERR_INVALID_HAB
0x104D PMERR_INVALID_HSTRUCT
0x104E PMERR_LENGTH_TOO_SMALL
0x104F PMERR_MSGID_TOO_SMALL
0x1050 PMERR_NO_HANDLE_ALLOC
0x1051 PMERR_NOT_IN_A_PM_SESSION
0x1052 PMERR_MSG_QUEUE_ALREADY_EXISTS
0x1055 PMERR_OLD_RESOURCE
0x1056 PMERR_WPDSERVER_IS_ACTIVE
0x1057 PMERR_WPDSERVER_NOT_STARTED
0x1058 PMERR_SOMDD_IS_ACTIVE
0x1059 PMERR_SOMDD_NOT_STARTED
0x1101 PMERR_INVALID_PIB
0x1102 PMERR_INSUFF_SPACE_TO_ADD
0x1103 PMERR_INVALID_GROUP_HANDLE
0x1104 PMERR_DUPLICATE_TITLE
0x1105 PMERR_INVALID_TITLE
0x1106 PMERR_INVALID_TARGET_HANDLE
0x1107 PMERR_HANDLE_NOT_IN_GROUP
0x1108 PMERR_INVALID_PATH_STATEMENT
0x1109 PMERR_NO_PROGRAM_FOUND
0x110A PMERR_INVALID_BUFFER_SIZE
0x110B PMERR_BUFFER_TOO_SMALL
0x110C PMERR_PL_INITIALISATION_FAIL
0x110D PMERR_CANT_DESTROY_SYS_GROUP
0x110E PMERR_INVALID_TYPE_CHANGE
0x110F PMERR_INVALID_PROGRAM_HANDLE
0x1110 PMERR_NOT_CURRENT_PL_VERSION
0x1111 PMERR_INVALID_CIRCULAR_REF
0x1112 PMERR_MEMORY_ALLOCATION_ERR
0x1113 PMERR_MEMORY_DEALLOCATION_ERR
0x1114 PMERR_TASK_HEADER_TOO_BIG
0x1115 PMERR_INVALID_INI_FILE_HANDLE
0x1116 PMERR_MEMORY_SHARE
0x1117 PMERR_OPEN_QUEUE
0x1118 PMERR_CREATE_QUEUE
0x1119 PMERR_WRITE_QUEUE
0x111A PMERR_READ_QUEUE
0x111B PMERR_CALL_NOT_EXECUTED
0x111C PMERR_UNKNOWN_APIPKT
0x111D PMERR_INITHREAD_EXISTS
0x111E PMERR_CREATE_THREAD
0x111F PMERR_NO_HK_PROFILE_INSTALLED
0x1120 PMERR_INVALID_DIRECTORY
0x1121 PMERR_WILDCARD_IN_FILENAME
0x1122 PMERR_FILENAME_BUFFER_FULL
0x1123 PMERR_FILENAME_TOO_LONG
0x1124 PMERR_INI_FILE_IS_SYS_OR_USER
0x1125 PMERR_BROADCAST_PLMSG
0x1126 PMERR_190_INIT_DONE
0x1127 PMERR_HMOD_FOR_PMSHAPI
0x1128 PMERR_SET_HK_PROFILE
0x1129 PMERR_API_NOT_ALLOWED
0x112A PMERR_INI_STILL_OPEN
0x112B PMERR_PROGDETAILS_NOT_IN_INI
0x112C PMERR_PIBSTRUCT_NOT_IN_INI
0x112D PMERR_INVALID_DISKPROGDETAILS
0x112E PMERR_PROGDETAILS_READ_FAILURE
0x112F PMERR_PROGDETAILS_WRITE_FAILURE
0x1130 PMERR_PROGDETAILS_QSIZE_FAILURE
0x1131 PMERR_INVALID_PROGDETAILS
0x1132 PMERR_SHEPROFILEHOOK_NOT_FOUND
0x1133 PMERR_190PLCONVERTED
0x1134 PMERR_FAILED_TO_CONVERT_INI_PL
0x1135 PMERR_PMSHAPI_NOT_INITIALISED
0x1136 PMERR_INVALID_SHELL_API_HOOK_ID
0x1200 PMERR_DOS_ERROR
0x1201 PMERR_NO_SPACE
0x1202 PMERR_INVALID_SWITCH_HANDLE
0x1203 PMERR_NO_HANDLE
0x1204 PMERR_INVALID_PROCESS_ID
0x1205 PMERR_NOT_SHELL
0x1206 PMERR_INVALID_WINDOW
0x1207 PMERR_INVALID_POST_MSG
0x1208 PMERR_INVALID_PARAMETERS
0x1208 PMERR_INVALID_PARAMETERS
0x1209 PMERR_INVALID_PROGRAM_TYPE
0x120A PMERR_NOT_EXTENDED_FOCUS
0x120B PMERR_INVALID_SESSION_ID
0x120C PMERR_SMG_INVALID_ICON_FILE
0x120D PMERR_SMG_ICON_NOT_CREATED
0x120E PMERR_SHL_DEBUG
0x1301 PMERR_OPENING_INI_FILE
0x1302 PMERR_INI_FILE_CORRUPT
0x1303 PMERR_INVALID_PARM
0x1304 PMERR_NOT_IN_IDX
0x1305 PMERR_NO_ENTRIES_IN_GROUP
0x1306 PMERR_INI_WRITE_FAIL
0x1307 PMERR_IDX_FULL
0x1308 PMERR_INI_PROTECTED
0x1309 PMERR_MEMORY_ALLOC
0x130A PMERR_INI_INIT_ALREADY_DONE
0x130B PMERR_INVALID_INTEGER
0x130C PMERR_INVALID_ASCIIZ
0x130D PMERR_CAN_NOT_CALL_SPOOLER
0x130D PMERR_VALIDATION_REJECTED
0x1401 PMERR_WARNING_WINDOW_NOT_KILLED
0x1402 PMERR_ERROR_INVALID_WINDOW
0x1403 PMERR_ALREADY_INITIALIZED
0x1405 PMERR_MSG_PROG_NO_MOU
0x1406 PMERR_MSG_PROG_NON_RECOV
0x1407 PMERR_WINCONV_INVALID_PATH
0x1408 PMERR_PI_NOT_INITIALISED
0x1409 PMERR_PL_NOT_INITIALISED
0x140A PMERR_NO_TASK_MANAGER
0x140B PMERR_SAVE_NOT_IN_PROGRESS
0x140C PMERR_NO_STACK_SPACE
0x140D PMERR_INVALID_COLR_FIELD
0x140E PMERR_INVALID_COLR_VALUE
0x140F PMERR_COLR_WRITE
0x1501 PMERR_TARGET_FILE_EXISTS
0x1502 PMERR_SOURCE_SAME_AS_TARGET
0x1503 PMERR_SOURCE_FILE_NOT_FOUND
0x1504 PMERR_INVALID_NEW_PATH
0x1505 PMERR_TARGET_FILE_NOT_FOUND
0x1506 PMERR_INVALID_DRIVE_NUMBER
0x1507 PMERR_NAME_TOO_LONG
0x1508 PMERR_NOT_ENOUGH_ROOM_ON_DISK
0x1509 PMERR_NOT_ENOUGH_MEM
0x150B PMERR_LOG_DRV_DOES_NOT_EXIST
0x150C PMERR_INVALID_DRIVE
0x150D PMERR_ACCESS_DENIED
0x150E PMERR_NO_FIRST_SLASH
0x150F PMERR_READ_ONLY_FILE
0x151F PMERR_GROUP_PROTECTED
0x152F PMERR_INVALID_PROGRAM_CATEGORY
0x1530 PMERR_INVALID_APPL
0x1531 PMERR_CANNOT_START
0x1532 PMERR_STARTED_IN_BACKGROUND
0x1533 PMERR_INVALID_HAPP
0x1534 PMERR_CANNOT_STOP
0x1601 PMERR_INTERNAL_ERROR_1
0x1602 PMERR_INTERNAL_ERROR_2
0x1603 PMERR_INTERNAL_ERROR_3
0x1604 PMERR_INTERNAL_ERROR_4
0x1605 PMERR_INTERNAL_ERROR_5
0x1606 PMERR_INTERNAL_ERROR_6
0x1607 PMERR_INTERNAL_ERROR_7
0x1608 PMERR_INTERNAL_ERROR_8
0x1609 PMERR_INTERNAL_ERROR_9
0x160A PMERR_INTERNAL_ERROR_10
0x160B PMERR_INTERNAL_ERROR_11
0x160C PMERR_INTERNAL_ERROR_12
0x160D PMERR_INTERNAL_ERROR_13
0x160E PMERR_INTERNAL_ERROR_14
0x160F PMERR_INTERNAL_ERROR_15
0x1610 PMERR_INTERNAL_ERROR_16
0x1611 PMERR_INTERNAL_ERROR_17
0x1612 PMERR_INTERNAL_ERROR_18
0x1613 PMERR_INTERNAL_ERROR_19
0x1614 PMERR_INTERNAL_ERROR_20
0x1615 PMERR_INTERNAL_ERROR_21
0x1616 PMERR_INTERNAL_ERROR_22
0x1617 PMERR_INTERNAL_ERROR_23
0x1618 PMERR_INTERNAL_ERROR_24
0x1619 PMERR_INTERNAL_ERROR_25
0x161A PMERR_INTERNAL_ERROR_26
0x161B PMERR_INTERNAL_ERROR_27
0x161C PMERR_INTERNAL_ERROR_28
0x161D PMERR_INTERNAL_ERROR_29
0x1630 PMERR_INVALID_FREE_MESSAGE_ID
0x1641 PMERR_FUNCTION_NOT_SUPPORTED
0x1642 PMERR_INVALID_ARRAY_COUNT
0x1643 PMERR_INVALID_LENGTH
0x1644 PMERR_INVALID_BUNDLE_TYPE
0x1645 PMERR_INVALID_PARAMETER
0x1646 PMERR_INVALID_NUMBER_OF_PARMS
0x1647 PMERR_GREATER_THAN_64K
0x1648 PMERR_INVALID_PARAMETER_TYPE
0x1649 PMERR_NEGATIVE_STRCOND_DIM
0x164A PMERR_INVALID_NUMBER_OF_TYPES
0x164B PMERR_INCORRECT_HSTRUCT
0x164C PMERR_INVALID_ARRAY_SIZE
0x164D PMERR_INVALID_CONTROL_DATATYPE
0x164E PMERR_INCOMPLETE_CONTROL_SEQU
0x164F PMERR_INVALID_DATATYPE
0x1650 PMERR_INCORRECT_DATATYPE
0x1651 PMERR_NOT_SELF_DESCRIBING_DTYP
0x1652 PMERR_INVALID_CTRL_SEQ_INDEX
0x1653 PMERR_INVALID_TYPE_FOR_LENGTH
0x1654 PMERR_INVALID_TYPE_FOR_OFFSET
0x1655 PMERR_INVALID_TYPE_FOR_MPARAM
0x1656 PMERR_INVALID_MESSAGE_ID
0x1657 PMERR_C_LENGTH_TOO_SMALL
0x1658 PMERR_APPL_STRUCTURE_TOO_SMALL
0x1659 PMERR_INVALID_ERRORINFO_HANDLE
0x165A PMERR_INVALID_CHARACTER_INDEX
0x1700 WPERR_PROTECTED_CLASS
0x1701 WPERR_INVALID_CLASS
0x1702 WPERR_INVALID_SUPERCLASS
0x1703 WPERR_NO_MEMORY
0x1704 WPERR_SEMAPHORE_ERROR
0x1705 WPERR_BUFFER_TOO_SMALL
0x1706 WPERR_CLSLOADMOD_FAILED
0x1707 WPERR_CLSPROCADDR_FAILED
0x1708 WPERR_OBJWORD_LOCATION
0x1709 WPERR_INVALID_OBJECT
0x170A WPERR_MEMORY_CLEANUP
0x170B WPERR_INVALID_MODULE
0x170C WPERR_INVALID_OLDCLASS
0x170D WPERR_INVALID_NEWCLASS
0x170E WPERR_NOT_IMMEDIATE_CHILD
0x170F WPERR_NOT_WORKPLACE_CLASS
0x1710 WPERR_CANT_REPLACE_METACLS
0x1711 WPERR_INI_FILE_WRITE
0x1712 WPERR_INVALID_FOLDER
0x1713 WPERR_BUFFER_OVERFLOW
0x1714 WPERR_OBJECT_NOT_FOUND
0x1715 WPERR_INVALID_HFIND
0x1716 WPERR_INVALID_COUNT
0x1717 WPERR_INVALID_BUFFER
0x1718 WPERR_ALREADY_EXISTS
0x1719 WPERR_INVALID_FLAGS
0x1720 WPERR_INVALID_OBJECTID
0x1721 WPERR_INVALID_TARGET_OBJECT
0x1F00 PMERR_NOT_DRAGGING
0x2001 PMERR_ALREADY_IN_AREA
0x2001 HMERR_INDEX_NOT_FOUND
0x2002 PMERR_ALREADY_IN_ELEMENT
0x2002 HMERR_CONTENT_NOT_FOUND
0x2003 PMERR_ALREADY_IN_PATH
0x2003 HMERR_OPEN_LIB_FILE
0x2004 PMERR_ALREADY_IN_SEG
0x2004 HMERR_READ_LIB_FILE
0x2005 PMERR_AREA_INCOMPLETE
0x2005 HMERR_CLOSE_LIB_FILE
0x2006 PMERR_BASE_ERROR
0x2006 HMERR_INVALID_LIB_FILE
0x2007 PMERR_BITBLT_LENGTH_EXCEEDED
0x2007 HMERR_NO_MEMORY
0x2008 PMERR_BITMAP_IN_USE
0x2008 HMERR_ALLOCATE_SEGMENT
0x2009 PMERR_BITMAP_IS_SELECTED
0x2009 HMERR_FREE_MEMORY
0x200A PMERR_BITMAP_NOT_FOUND
0x200B PMERR_BITMAP_NOT_SELECTED
0x200C PMERR_BOUNDS_OVERFLOW
0x200D PMERR_CALLED_SEG_IS_CHAINED
0x200E PMERR_CALLED_SEG_IS_CURRENT
0x200F PMERR_CALLED_SEG_NOT_FOUND
0x2010 PMERR_CANNOT_DELETE_ALL_DATA
0x2010 HMERR_PANEL_NOT_FOUND
0x2011 PMERR_CANNOT_REPLACE_ELEMENT_0
0x2011 HMERR_DATABASE_NOT_OPEN
0x2012 PMERR_COL_TABLE_NOT_REALIZABLE
0x2013 PMERR_COL_TABLE_NOT_REALIZED
0x2013 HMERR_LOAD_DLL
0x2014 PMERR_COORDINATE_OVERFLOW
0x2015 PMERR_CORR_FORMAT_MISMATCH
0x2016 PMERR_DATA_TOO_LONG
0x2017 PMERR_DC_IS_ASSOCIATED
0x2018 PMERR_DESC_STRING_TRUNCATED
0x2019 PMERR_DEVICE_DRIVER_ERROR_1
0x201A PMERR_DEVICE_DRIVER_ERROR_2
0x201B PMERR_DEVICE_DRIVER_ERROR_3
0x201C PMERR_DEVICE_DRIVER_ERROR_4
0x201D PMERR_DEVICE_DRIVER_ERROR_5
0x201E PMERR_DEVICE_DRIVER_ERROR_6
0x201F PMERR_DEVICE_DRIVER_ERROR_7
0x2020 PMERR_DEVICE_DRIVER_ERROR_8
0x2021 PMERR_DEVICE_DRIVER_ERROR_9
0x2022 PMERR_DEVICE_DRIVER_ERROR_10
0x2023 PMERR_DEV_FUNC_NOT_INSTALLED
0x2024 PMERR_DOSOPEN_FAILURE
0x2025 PMERR_DOSREAD_FAILURE
0x2026 PMERR_DRIVER_NOT_FOUND
0x2027 PMERR_DUP_SEG
0x2028 PMERR_DYNAMIC_SEG_SEQ_ERROR
0x2029 PMERR_DYNAMIC_SEG_ZERO_INV
0x202A PMERR_ELEMENT_INCOMPLETE
0x202B PMERR_ESC_CODE_NOT_SUPPORTED
0x202C PMERR_EXCEEDS_MAX_SEG_LENGTH
0x202D PMERR_FONT_AND_MODE_MISMATCH
0x202E PMERR_FONT_FILE_NOT_LOADED
0x202F PMERR_FONT_NOT_LOADED
0x2030 PMERR_FONT_TOO_BIG
0x2031 PMERR_HARDWARE_INIT_FAILURE
0x2032 PMERR_HBITMAP_BUSY
0x2033 PMERR_HDC_BUSY
0x2034 PMERR_HRGN_BUSY
0x2035 PMERR_HUGE_FONTS_NOT_SUPPORTED
0x2036 PMERR_ID_HAS_NO_BITMAP
0x2037 PMERR_IMAGE_INCOMPLETE
0x2038 PMERR_INCOMPAT_COLOR_FORMAT
0x2039 PMERR_INCOMPAT_COLOR_OPTIONS
0x203A PMERR_INCOMPATIBLE_BITMAP
0x203B PMERR_INCOMPATIBLE_METAFILE
0x203C PMERR_INCORRECT_DC_TYPE
0x203D PMERR_INSUFFICIENT_DISK_SPACE
0x203E PMERR_INSUFFICIENT_MEMORY
0x203F PMERR_INV_ANGLE_PARM
0x2040 PMERR_INV_ARC_CONTROL
0x2041 PMERR_INV_AREA_CONTROL
0x2042 PMERR_INV_ARC_POINTS
0x2043 PMERR_INV_ATTR_MODE
0x2044 PMERR_INV_BACKGROUND_COL_ATTR
0x2045 PMERR_INV_BACKGROUND_MIX_ATTR
0x2046 PMERR_INV_BITBLT_MIX
0x2047 PMERR_INV_BITBLT_STYLE
0x2048 PMERR_INV_BITMAP_DIMENSION
0x2049 PMERR_INV_BOX_CONTROL
0x204A PMERR_INV_BOX_ROUNDING_PARM
0x204B PMERR_INV_CHAR_ANGLE_ATTR
0x204C PMERR_INV_CHAR_DIRECTION_ATTR
0x204D PMERR_INV_CHAR_MODE_ATTR
0x204E PMERR_INV_CHAR_POS_OPTIONS
0x204F PMERR_INV_CHAR_SET_ATTR
0x2050 PMERR_INV_CHAR_SHEAR_ATTR
0x2051 PMERR_INV_CLIP_PATH_OPTIONS
0x2052 PMERR_INV_CODEPAGE
0x2053 PMERR_INV_COLOR_ATTR
0x2054 PMERR_INV_COLOR_DATA
0x2055 PMERR_INV_COLOR_FORMAT
0x2056 PMERR_INV_COLOR_INDEX
0x2057 PMERR_INV_COLOR_OPTIONS
0x2058 PMERR_INV_COLOR_START_INDEX
0x2059 PMERR_INV_COORD_OFFSET
0x205A PMERR_INV_COORD_SPACE
0x205B PMERR_INV_COORDINATE
0x205C PMERR_INV_CORRELATE_DEPTH
0x205D PMERR_INV_CORRELATE_TYPE
0x205E PMERR_INV_CURSOR_BITMAP
0x205F PMERR_INV_DC_DATA
0x2060 PMERR_INV_DC_TYPE
0x2061 PMERR_INV_DEVICE_NAME
0x2062 PMERR_INV_DEV_MODES_OPTIONS
0x2063 PMERR_INV_DRAW_CONTROL
0x2064 PMERR_INV_DRAW_VALUE
0x2065 PMERR_INV_DRAWING_MODE
0x2066 PMERR_INV_DRIVER_DATA
0x2067 PMERR_INV_DRIVER_NAME
0x2068 PMERR_INV_DRAW_BORDER_OPTION
0x2069 PMERR_INV_EDIT_MODE
0x206A PMERR_INV_ELEMENT_OFFSET
0x206B PMERR_INV_ELEMENT_POINTER
0x206C PMERR_INV_END_PATH_OPTIONS
0x206D PMERR_INV_ESC_CODE
0x206E PMERR_INV_ESCAPE_DATA
0x206F PMERR_INV_EXTENDED_LCID
0x2070 PMERR_INV_FILL_PATH_OPTIONS
0x2071 PMERR_INV_FIRST_CHAR
0x2072 PMERR_INV_FONT_ATTRS
0x2073 PMERR_INV_FONT_FILE_DATA
0x2074 PMERR_INV_FOR_THIS_DC_TYPE
0x2075 PMERR_INV_FORMAT_CONTROL
0x2076 PMERR_INV_FORMS_CODE
0x2077 PMERR_INV_FONTDEF
0x2078 PMERR_INV_GEOM_LINE_WIDTH_ATTR
0x2079 PMERR_INV_GETDATA_CONTROL
0x207A PMERR_INV_GRAPHICS_FIELD
0x207B PMERR_INV_HBITMAP
0x207C PMERR_INV_HDC
0x207D PMERR_INV_HJOURNAL
0x207E PMERR_INV_HMF
0x207F PMERR_INV_HPS
0x2080 PMERR_INV_HRGN
0x2081 PMERR_INV_ID
0x2082 PMERR_INV_IMAGE_DATA_LENGTH
0x2083 PMERR_INV_IMAGE_DIMENSION
0x2084 PMERR_INV_IMAGE_FORMAT
0x2085 PMERR_INV_IN_AREA
0x2086 PMERR_INV_IN_CALLED_SEG
0x2087 PMERR_INV_IN_CURRENT_EDIT_MODE
0x2088 PMERR_INV_IN_DRAW_MODE
0x2089 PMERR_INV_IN_ELEMENT
0x208A PMERR_INV_IN_IMAGE
0x208B PMERR_INV_IN_PATH
0x208C PMERR_INV_IN_RETAIN_MODE
0x208D PMERR_INV_IN_SEG
0x208E PMERR_INV_IN_VECTOR_SYMBOL
0x208F PMERR_INV_INFO_TABLE
0x2090 PMERR_INV_JOURNAL_OPTION
0x2091 PMERR_INV_KERNING_FLAGS
0x2092 PMERR_INV_LENGTH_OR_COUNT
0x2093 PMERR_INV_LINE_END_ATTR
0x2094 PMERR_INV_LINE_JOIN_ATTR
0x2095 PMERR_INV_LINE_TYPE_ATTR
0x2096 PMERR_INV_LINE_WIDTH_ATTR
0x2097 PMERR_INV_LOGICAL_ADDRESS
0x2098 PMERR_INV_MARKER_BOX_ATTR
0x2099 PMERR_INV_MARKER_SET_ATTR
0x209A PMERR_INV_MARKER_SYMBOL_ATTR
0x209B PMERR_INV_MATRIX_ELEMENT
0x209C PMERR_INV_MAX_HITS
0x209D PMERR_INV_METAFILE
0x209E PMERR_INV_METAFILE_LENGTH
0x209F PMERR_INV_METAFILE_OFFSET
0x20A0 PMERR_INV_MICROPS_DRAW_CONTROL
0x20A1 PMERR_INV_MICROPS_FUNCTION
0x20A2 PMERR_INV_MICROPS_ORDER
0x20A3 PMERR_INV_MIX_ATTR
0x20A4 PMERR_INV_MODE_FOR_OPEN_DYN
0x20A5 PMERR_INV_MODE_FOR_REOPEN_SEG
0x20A6 PMERR_INV_MODIFY_PATH_MODE
0x20A7 PMERR_INV_MULTIPLIER
0x20A8 PMERR_INV_NESTED_FIGURES
0x20A9 PMERR_INV_OR_INCOMPAT_OPTIONS
0x20AA PMERR_INV_ORDER_LENGTH
0x20AB PMERR_INV_ORDERING_PARM
0x20AC PMERR_INV_OUTSIDE_DRAW_MODE
0x20AD PMERR_INV_PAGE_VIEWPORT
0x20AE PMERR_INV_PATH_ID
0x20AF PMERR_INV_PATH_MODE
0x20B0 PMERR_INV_PATTERN_ATTR
0x20B1 PMERR_INV_PATTERN_REF_PT_ATTR
0x20B2 PMERR_INV_PATTERN_SET_ATTR
0x20B3 PMERR_INV_PATTERN_SET_FONT
0x20B4 PMERR_INV_PICK_APERTURE_OPTION
0x20B5 PMERR_INV_PICK_APERTURE_POSN
0x20B6 PMERR_INV_PICK_APERTURE_SIZE
0x20B7 PMERR_INV_PICK_NUMBER
0x20B8 PMERR_INV_PLAY_METAFILE_OPTION
0x20B9 PMERR_INV_PRIMITIVE_TYPE
0x20BA PMERR_INV_PS_SIZE
0x20BB PMERR_INV_PUTDATA_FORMAT
0x20BC PMERR_INV_QUERY_ELEMENT_NO
0x20BD PMERR_INV_RECT
0x20BE PMERR_INV_REGION_CONTROL
0x20BF PMERR_INV_REGION_MIX_MODE
0x20C0 PMERR_INV_REPLACE_MODE_FUNC
0x20C1 PMERR_INV_RESERVED_FIELD
0x20C2 PMERR_INV_RESET_OPTIONS
0x20C3 PMERR_INV_RGBCOLOR
0x20C4 PMERR_INV_SCAN_START
0x20C5 PMERR_INV_SEG_ATTR
0x20C6 PMERR_INV_SEG_ATTR_VALUE
0x20C7 PMERR_INV_SEG_CH_LENGTH
0x20C8 PMERR_INV_SEG_NAME
0x20C9 PMERR_INV_SEG_OFFSET
0x20CA PMERR_INV_SETID
0x20CB PMERR_INV_SETID_TYPE
0x20CC PMERR_INV_SET_VIEWPORT_OPTION
0x20CD PMERR_INV_SHARPNESS_PARM
0x20CE PMERR_INV_SOURCE_OFFSET
0x20CF PMERR_INV_STOP_DRAW_VALUE
0x20D0 PMERR_INV_TRANSFORM_TYPE
0x20D1 PMERR_INV_USAGE_PARM
0x20D2 PMERR_INV_VIEWING_LIMITS
0x20D3 PMERR_JFILE_BUSY
0x20D4 PMERR_JNL_FUNC_DATA_TOO_LONG
0x20D5 PMERR_KERNING_NOT_SUPPORTED
0x20D6 PMERR_LABEL_NOT_FOUND
0x20D7 PMERR_MATRIX_OVERFLOW
0x20D8 PMERR_METAFILE_INTERNAL_ERROR
0x20D9 PMERR_METAFILE_IN_USE
0x20DA PMERR_METAFILE_LIMIT_EXCEEDED
0x20DB PMERR_NAME_STACK_FULL
0x20DC PMERR_NOT_CREATED_BY_DEVOPENDC
0x20DD PMERR_NOT_IN_AREA
0x20DE PMERR_NOT_IN_DRAW_MODE
0x20DF PMERR_NOT_IN_ELEMENT
0x20E0 PMERR_NOT_IN_IMAGE
0x20E1 PMERR_NOT_IN_PATH
0x20E2 PMERR_NOT_IN_RETAIN_MODE
0x20E3 PMERR_NOT_IN_SEG
0x20E4 PMERR_NO_BITMAP_SELECTED
0x20E5 PMERR_NO_CURRENT_ELEMENT
0x20E6 PMERR_NO_CURRENT_SEG
0x20E7 PMERR_NO_METAFILE_RECORD_HANDLE
0x20E8 PMERR_ORDER_TOO_BIG
0x20E9 PMERR_OTHER_SET_ID_REFS
0x20EA PMERR_OVERRAN_SEG
0x20EB PMERR_OWN_SET_ID_REFS
0x20EC PMERR_PATH_INCOMPLETE
0x20ED PMERR_PATH_LIMIT_EXCEEDED
0x20EE PMERR_PATH_UNKNOWN
0x20EF PMERR_PEL_IS_CLIPPED
0x20F0 PMERR_PEL_NOT_AVAILABLE
0x20F1 PMERR_PRIMITIVE_STACK_EMPTY
0x20F2 PMERR_PROLOG_ERROR
0x20F3 PMERR_PROLOG_SEG_ATTR_NOT_SET
0x20F4 PMERR_PS_BUSY
0x20F5 PMERR_PS_IS_ASSOCIATED
0x20F6 PMERR_RAM_JNL_FILE_TOO_SMALL
0x20F7 PMERR_REALIZE_NOT_SUPPORTED
0x20F8 PMERR_REGION_IS_CLIP_REGION
0x20F9 PMERR_RESOURCE_DEPLETION
0x20FA PMERR_SEG_AND_REFSEG_ARE_SAME
0x20FB PMERR_SEG_CALL_RECURSIVE
0x20FC PMERR_SEG_CALL_STACK_EMPTY
0x20FD PMERR_SEG_CALL_STACK_FULL
0x20FE PMERR_SEG_IS_CURRENT
0x20FF PMERR_SEG_NOT_CHAINED
0x2100 PMERR_SEG_NOT_FOUND
0x2101 PMERR_SEG_STORE_LIMIT_EXCEEDED
0x2102 PMERR_SETID_IN_USE
0x2103 PMERR_SETID_NOT_FOUND
0x2104 PMERR_STARTDOC_NOT_ISSUED
0x2105 PMERR_STOP_DRAW_OCCURRED
0x2106 PMERR_TOO_MANY_METAFILES_IN_USE
0x2107 PMERR_TRUNCATED_ORDER
0x2108 PMERR_UNCHAINED_SEG_ZERO_INV
0x2109 PMERR_UNSUPPORTED_ATTR
0x210A PMERR_UNSUPPORTED_ATTR_VALUE
0x210B PMERR_ENDDOC_NOT_ISSUED
0x210C PMERR_PS_NOT_ASSOCIATED
0x210D PMERR_INV_FLOOD_FILL_OPTIONS
0x210E PMERR_INV_FACENAME
0x210F PMERR_PALETTE_SELECTED
0x2110 PMERR_NO_PALETTE_SELECTED
0x2111 PMERR_INV_HPAL
0x2112 PMERR_PALETTE_BUSY
0x2113 PMERR_START_POINT_CLIPPED
0x2114 PMERR_NO_FILL
0x2115 PMERR_INV_FACENAMEDESC
0x2116 PMERR_INV_BITMAP_DATA
0x2117 PMERR_INV_CHAR_ALIGN_ATTR
0x2118 PMERR_INV_HFONT
0x2119 PMERR_HFONT_IS_SELECTED
0x2120 PMERR_DRVR_NOT_SUPPORTED
0x2120 PMERR_RASTER_FONT
0x3001 HMERR_DDF_MEMORY
0x3002 HMERR_DDF_ALIGN_TYPE
0x3003 HMERR_DDF_BACKCOLOR
0x3004 HMERR_DDF_FORECOLOR
0x3005 HMERR_DDF_FONTSTYLE
0x3006 HMERR_DDF_REFTYPE
0x3007 HMERR_DDF_LIST_UNCLOSED
0x3008 HMERR_DDF_LIST_UNINITIALIZED
0x3009 HMERR_DDF_LIST_BREAKTYPE
0x300A HMERR_DDF_LIST_SPACING
0x300B HMERR_DDF_HINSTANCE
0x300C HMERR_DDF_EXCEED_MAX_LENGTH
0x300D HMERR_DDF_EXCEED_MAX_INC
0x300E HMERR_DDF_INVALID_DDF
0x300F HMERR_DDF_FORMAT_TYPE
0x3010 HMERR_DDF_INVALID_PARM
0x3011 HMERR_DDF_INVALID_FONT
0x3012 HMERR_DDF_SEVERE
0x4001 PMERR_SPL_DRIVER_ERROR
0x4001 MERR_SPL_DRIVER_ERROR
0x4002 PMERR_SPL_DEVICE_ERROR
0x4002 MERR_SPL_DEVICE_ERROR
0x4003 PMERR_SPL_DEVICE_NOT_INSTALLED
0x4003 MERR_SPL_DEVICE_NOT_INSTALLED
0x4004 PMERR_SPL_QUEUE_ERROR
0x4004 MERR_SPL_QUEUE_ERROR
0x4005 PMERR_SPL_INV_HSPL
0x4005 MERR_SPL_INV_HSPL
0x4006 PMERR_SPL_NO_DISK_SPACE
0x4006 MERR_SPL_NO_DISK_SPACE
0x4007 PMERR_SPL_NO_MEMORY
0x4007 MERR_SPL_NO_MEMORY
0x4008 PMERR_SPL_PRINT_ABORT
0x4008 MERR_SPL_PRINT_ABORT
0x4009 PMERR_SPL_SPOOLER_NOT_INSTALLED
0x4009 MERR_SPL_SPOOLER_NOT_INSTALLED
0x400A PMERR_SPL_INV_FORMS_CODE
0x400A MERR_SPL_INV_FORMS_CODE
0x400B PMERR_SPL_INV_PRIORITY
0x400B MERR_SPL_INV_PRIORITY
0x400C PMERR_SPL_NO_FREE_JOB_ID
0x400C MERR_SPL_NO_FREE_JOB_ID
0x400D PMERR_SPL_NO_DATA
0x400D MERR_SPL_NO_DATA
0x400E PMERR_SPL_INV_TOKEN
0x400E MERR_SPL_INV_TOKEN
0x400F PMERR_SPL_INV_DATATYPE
0x400F MERR_SPL_INV_DATATYPE
0x4010 PMERR_SPL_PROCESSOR_ERROR
0x4010 MERR_SPL_PROCESSOR_ERROR
0x4011 PMERR_SPL_INV_JOB_ID
0x4011 MERR_SPL_INV_JOB_ID
0x4012 PMERR_SPL_JOB_NOT_PRINTING
0x4012 MERR_SPL_JOB_NOT_PRINTING
0x4013 PMERR_SPL_JOB_PRINTING
0x4013 MERR_SPL_JOB_PRINTING
0x4014 PMERR_SPL_QUEUE_ALREADY_EXISTS
0x4014 MERR_SPL_QUEUE_ALREADY_EXISTS
0x4015 PMERR_SPL_INV_QUEUE_NAME
0x4015 MERR_SPL_INV_QUEUE_NAME
0x4016 PMERR_SPL_QUEUE_NOT_EMPTY
0x4016 MERR_SPL_QUEUE_NOT_EMPTY
0x4017 PMERR_SPL_DEVICE_ALREADY_EXISTS
0x4017 MERR_SPL_DEVICE_ALREADY_EXISTS
0x4018 PMERR_SPL_DEVICE_LIMIT_REACHED
0x4018 MERR_SPL_DEVICE_LIMIT_REACHED
0x4019 PMERR_SPL_STATUS_STRING_TRUNC
0x4019 MERR_SPL_STATUS_STRING_TRUNC
0x401A PMERR_SPL_INV_LENGTH_OR_COUNT
0x401A MERR_SPL_INV_LENGTH_OR_COUNT
0x401B PMERR_SPL_FILE_NOT_FOUND
0x401B MERR_SPL_FILE_NOT_FOUND
0x401C PMERR_SPL_CANNOT_OPEN_FILE
0x401C MERR_SPL_CANNOT_OPEN_FILE
0x401D PMERR_SPL_DRIVER_NOT_INSTALLED
0x401D MERR_SPL_DRIVER_NOT_INSTALLED
0x401E PMERR_SPL_INV_PROCESSOR_DATTYPE
0x401E MERR_SPL_INV_PROCESSOR_DATTYPE
0x401F PMERR_SPL_INV_DRIVER_DATATYPE
0x401F MERR_SPL_INV_DRIVER_DATATYPE
0x4020 PMERR_SPL_PROCESSOR_NOT_INST
0x4020 MERR_SPL_PROCESSOR_NOT_INST
0x4021 PMERR_SPL_NO_SUCH_LOG_ADDRESS
0x4021 MERR_SPL_NO_SUCH_LOG_ADDRESS
0x4022 PMERR_SPL_PRINTER_NOT_FOUND
0x4022 MERR_SPL_PRINTER_NOT_FOUND
0x4023 PMERR_SPL_DD_NOT_FOUND
0x4023 MERR_SPL_DD_NOT_FOUND
0x4024 PMERR_SPL_QUEUE_NOT_FOUND
0x4024 MERR_SPL_QUEUE_NOT_FOUND
0x4025 PMERR_SPL_MANY_QUEUES_ASSOC
0x4025 MERR_SPL_MANY_QUEUES_ASSOC
0x4026 PMERR_SPL_NO_QUEUES_ASSOCIATED
0x4026 MERR_SPL_NO_QUEUES_ASSOCIATED
0x4027 PMERR_SPL_INI_FILE_ERROR
0x4027 MERR_SPL_INI_FILE_ERROR
0x4028 PMERR_SPL_NO_DEFAULT_QUEUE
0x4028 MERR_SPL_NO_DEFAULT_QUEUE
0x4029 PMERR_SPL_NO_CURRENT_FORMS_CODE
0x4029 MERR_SPL_NO_CURRENT_FORMS_CODE
0x402A PMERR_SPL_NOT_AUTHORISED
0x402A MERR_SPL_NOT_AUTHORISED
0x402B PMERR_SPL_TEMP_NETWORK_ERROR
0x402B MERR_SPL_TEMP_NETWORK_ERROR
0x402C PMERR_SPL_HARD_NETWORK_ERROR
0x402C MERR_SPL_HARD_NETWORK_ERROR
0x402D PMERR_DEL_NOT_ALLOWED
0x402D MERR_DEL_NOT_ALLOWED
0x402E PMERR_CANNOT_DEL_QP_REF
0x402E MERR_CANNOT_DEL_QP_REF
0x402F PMERR_CANNOT_DEL_QNAME_REF
0x402F MERR_CANNOT_DEL_QNAME_REF
0x4030 PMERR_CANNOT_DEL_PRINTER_DD_REF
0x4030 MERR_CANNOT_DEL_PRINTER_DD_REF
0x4031 PMERR_CANNOT_DEL_PRN_NAME_REF
0x4031 MERR_CANNOT_DEL_PRN_NAME_REF
0x4032 PMERR_CANNOT_DEL_PRN_ADDR_REF
0x4032 MERR_CANNOT_DEL_PRN_ADDR_REF
0x4033 PMERR_SPOOLER_QP_NOT_DEFINED
0x4033 MERR_SPOOLER_QP_NOT_DEFINED
0x4034 PMERR_PRN_NAME_NOT_DEFINED
0x4034 MERR_PRN_NAME_NOT_DEFINED
0x4035 PMERR_PRN_ADDR_NOT_DEFINED
0x4035 MERR_PRN_ADDR_NOT_DEFINED
0x4036 PMERR_PRINTER_DD_NOT_DEFINED
0x4036 MERR_PRINTER_DD_NOT_DEFINED
0x4037 PMERR_PRINTER_QUEUE_NOT_DEFINED
0x4037 MERR_PRINTER_QUEUE_NOT_DEFINED
0x4038 PMERR_PRN_ADDR_IN_USE
0x4038 MERR_PRN_ADDR_IN_USE
0x4039 PMERR_SPL_TOO_MANY_OPEN_FILES
0x4039 MERR_SPL_TOO_MANY_OPEN_FILES
0x403A PMERR_SPL_CP_NOT_REQD
0x403A MERR_SPL_CP_NOT_REQD
0x4040 PMERR_UNABLE_TO_CLOSE_DEVICE
0x4040 MERR_UNABLE_TO_CLOSE_DEVICE
0x4FC9 PMERR_SPLMSGBOX_INFO_CAPTION
0x4FC9 MERR_SPLMSGBOX_INFO_CAPTION
0x4FCA PMERR_SPLMSGBOX_WARNING_CAPTION
0x4FCA MERR_SPLMSGBOX_WARNING_CAPTION
0x4FCB PMERR_SPLMSGBOX_ERROR_CAPTION
0x4FCB MERR_SPLMSGBOX_ERROR_CAPTION
0x4FCC PMERR_SPLMSGBOX_SEVERE_CAPTION
0x4FCC MERR_SPLMSGBOX_SEVERE_CAPTION
0x4FCD PMERR_SPLMSGBOX_JOB_DETAILS
0x4FCD MERR_SPLMSGBOX_JOB_DETAILS
0x4FCE PMERR_SPLMSGBOX_ERROR_ACTION
0x4FCE MERR_SPLMSGBOX_ERROR_ACTION
0x4FCF PMERR_SPLMSGBOX_SEVERE_ACTION
0x4FCF MERR_SPLMSGBOX_SEVERE_ACTION
0x4FD0 PMERR_SPLMSGBOX_BIT_0_TEXT
0x4FD0 MERR_SPLMSGBOX_BIT_0_TEXT
0x4FD1 PMERR_SPLMSGBOX_BIT_1_TEXT
0x4FD1 MERR_SPLMSGBOX_BIT_1_TEXT
0x4FD2 PMERR_SPLMSGBOX_BIT_2_TEXT
0x4FD2 MERR_SPLMSGBOX_BIT_2_TEXT
0x4FD3 PMERR_SPLMSGBOX_BIT_3_TEXT
0x4FD3 MERR_SPLMSGBOX_BIT_3_TEXT
0x4FD4 PMERR_SPLMSGBOX_BIT_4_TEXT
0x4FD4 MERR_SPLMSGBOX_BIT_4_TEXT
0x4FD5 PMERR_SPLMSGBOX_BIT_5_TEXT
0x4FD5 MERR_SPLMSGBOX_BIT_5_TEXT
0x4FD6 PMERR_SPLMSGBOX_BIT_15_TEXT
0x4FD6 MERR_SPLMSGBOX_BIT_15_TEXT
0x4FD7 PMERR_SPL_NOPATHBUFFER
0x4FD7 MERR_SPL_NOPATHBUFFER
0x4FD8 MERR_SPL_ALREADY_INITIALISED
0x4FD9 MERR_SPL_ERROR
0x5001 PMERR_INV_TYPE
0x5001 MERR_INV_TYPE
0x5002 PMERR_INV_CONV
0x5002 MERR_INV_CONV
0x5003 PMERR_INV_SEGLEN
0x5003 MERR_INV_SEGLEN
0x5004 PMERR_DUP_SEGNAME
0x5004 MERR_DUP_SEGNAME
0x5005 PMERR_INV_XFORM
0x5005 MERR_INV_XFORM
0x5006 PMERR_INV_VIEWLIM
0x5006 MERR_INV_VIEWLIM
0x5007 PMERR_INV_3DCOORD
0x5007 MERR_INV_3DCOORD
0x5008 PMERR_SMB_OVFLOW
0x5008 MERR_SMB_OVFLOW
0x5009 PMERR_SEG_OVFLOW
0x5009 MERR_SEG_OVFLOW
0x5010 PMERR_PIC_DUP_FILENAME
0x5010 MERR_PIC_DUP_FILENAME
SPLERR_BASE+0FA1 PMERR_SPL_ERROR_1
SPLERR_BASE+0FA2 PMERR_SPL_ERROR_2
SPLERR_BASE+0FA3 PMERR_SPL_ERROR_3
SPLERR_BASE+0FA4 PMERR_SPL_ERROR_4
SPLERR_BASE+0FA5 PMERR_SPL_ERROR_5
SPLERR_BASE+0FA6 PMERR_SPL_ERROR_6
SPLERR_BASE+0FA7 PMERR_SPL_ERROR_7
SPLERR_BASE+0FA8 PMERR_SPL_ERROR_8
SPLERR_BASE+0FA9 PMERR_SPL_ERROR_9
SPLERR_BASE+0FAA PMERR_SPL_ERROR_10
SPLERR_BASE+0FAB PMERR_SPL_ERROR_11
SPLERR_BASE+0FAC PMERR_SPL_ERROR_12
SPLERR_BASE+0FAD PMERR_SPL_ERROR_13
SPLERR_BASE+0FAE PMERR_SPL_ERROR_14
SPLERR_BASE+0FAF PMERR_SPL_ERROR_15
SPLERR_BASE+0FB0 PMERR_SPL_ERROR_16
SPLERR_BASE+0FB1 PMERR_SPL_ERROR_17
SPLERR_BASE+0FB2 PMERR_SPL_ERROR_18
SPLERR_BASE+0FB3 PMERR_SPL_ERROR_19
SPLERR_BASE+0FB4 PMERR_SPL_ERROR_20
SPLERR_BASE+0FB5 PMERR_SPL_ERROR_21
SPLERR_BASE+0FB6 PMERR_SPL_ERROR_22
SPLERR_BASE+0FB7 PMERR_SPL_ERROR_23
SPLERR_BASE+0FB8 PMERR_SPL_ERROR_24
SPLERR_BASE+0FB9 PMERR_SPL_ERROR_25
SPLERR_BASE+0FBA PMERR_SPL_ERROR_26
SPLERR_BASE+0FBB PMERR_SPL_ERROR_27
SPLERR_BASE+0FBC PMERR_SPL_ERROR_28
SPLERR_BASE+0FBD PMERR_SPL_ERROR_29
SPLERR_BASE+0FBE PMERR_SPL_ERROR_30
SPLERR_BASE+0FBF PMERR_SPL_ERROR_31
SPLERR_BASE+0FC0 PMERR_SPL_ERROR_32
SPLERR_BASE+0FC1 PMERR_SPL_ERROR_33
SPLERR_BASE+0FC2 PMERR_SPL_ERROR_34
SPLERR_BASE+0FC3 PMERR_SPL_ERROR_35
SPLERR_BASE+0FC4 PMERR_SPL_ERROR_36
SPLERR_BASE+0FC5 PMERR_SPL_ERROR_37
SPLERR_BASE+0FC6 PMERR_SPL_ERROR_38
SPLERR_BASE+0FC7 PMERR_SPL_ERROR_39
SPLERR_BASE+0FC8 PMERR_SPL_ERROR_40
SPLERR_BASE+0FFF PMERR_SPL_ERROR
SPLERR_BASE+0FFD PMERR_SPL_ALREADY_INITIALISED
ΓòÉΓòÉΓòÉ 4.2. Error Name and Explanation ΓòÉΓòÉΓòÉ
This appendix gives an explanation for each PM error. The errors are listed in
alphabetic order. The number associated with each error is given in Error
Number and Name.
Error Constant Explanation
HMERR_ALLOCATE_SEGMENT Unable to allocate a segment
of memory for memory
allocation requests from the
Help Manager.
HMERR_CLOSE_LIB_FILE The library file cannot be
closed.
HMERR_CONTENT_NOT_FOUND The library file does not have
any content.
HMERR_DATABASE_NOT_OPEN Unable to read the unopened
database.
HMERR_DDF_ALIGN_TYPE The alignment type is not
valid.
HMERR_DDF_BACKCOLOR The background color is not
valid.
HMERR_DDF_EXCEED_MAX_INC The value specified to
increment DDF memory is too
large.
HMERR_DDF_EXCEED_MAX_LENGTH The amount of data is too
large for the DDF buffer.
HMERR_DDF_FONTSTYLE The font style is not valid.
HMERR_DDF_FORECOLOR The foreground color is not
valid.
HMERR_DDF_FORMAT_TYPE The format type specified is
invalid.
HMERR_DDF_HINSTANCE The DDF instance is invalid.
HMERR_DDF_INVALID_DDF The DDF handle is invalid.
HMERR_DDF_INVALID_FONT The font value specified is
invalid.
HMERR_DDF_INVALID_PARM One of the DDF parameters
specified is invalid.
HMERR_DDF_LIST_BREAKTYPE The value of BreakType is not
valid.
HMERR_DDF_LIST_SPACING The value for Spacing is not
valid.
HMERR_DDF_LIST_UNCLOSED An attempt was made to nest a
list.
HMERR_DDF_LIST_UNINITIALIZED No definition list has been
initialized by DdfBeginList.
HMERR_DDF_MEMORY Not enough memory is
available.
HMERR_DDF_REFTYPE The reference type is not
valid.
HMERR_DDF_SEVERE Internal error detected by the
Help Manager.
HMERR_FREE_MEMORY Unable to free allocated
memory.
HMERR_HELP_INST_CALLED_INVALID The handle of the instance
specified on a call to the
Help Manager does not have the
class name of a Help Manager
instance.
HMERR_HELP_INSTANCE_UNDEFINE The help instance handle
specified is invalid.
HMERR_HELPITEM_NOT_FOUND Context-sensitive help was
requested but the ID of the
main help item specified was
not found in the help table.
HMERR_HELPSUBITEM_NOT_FOUND Context-sensitive help was
requested but the ID of the
help item specified was not
found in the help subtable.
HMERR_HELPTABLE_UNDEFINE The application did not
provide a help table for
context-sensitive help.
HMERR_INDEX_NOT_FOUND The index is not in the
library file.
HMERR_INVALID_ASSOC_APP_WND The application window handle
specified on the
WinAssociateHelpInstance
function is not a valid window
handle.
HMERR_INVALID_ASSOC_HELP_INST The help instance handle
specified on the
WinAssociateHelpInstance
function is not a valid window
handle.
HMERR_INVALID_DESTROY_HELP_INST The window handle specified as
the help instance to destroy
is not of the help instance
class.
HMERR_INVALID_HELP_INSTANCE_HDL The handle specified to be a
help instance does not have
the class name of a Help
Manager instance.
HMERR_INVALID_HELPSUBITEM_SIZE The help subtable item size is
less than 2.
HMERR_INVALID_LIB_FILE Improper library file
provided.
HMERR_INVALID_QUERY_APP_WND The application window
specified on a
WinQueryHelpInstance function
is not a valid window handle.
HMERR_LOAD_DLL Unable to load resource data
link library.
HMERR_NO_FRAME_WND_IN_CHAIN There is no frame window in
the window chain from which to
find or set the associated
help instance.
HMERR_NO_HELP_INST_IN_CHAIN The parent or owner chain of
the application window
specified does not have an
associated help instance.
HMERR_NO_MEMORY Unable to allocate the
requested amount of memory.
HMERR_OPEN_LIB_FILE The library file cannot be
opened.
HMERR_PANEL_NOT_FOUND Unable to find the requested
help panel.
HMERR_READ_LIB_FILE The library file cannot be
read.
PMERR_ACCESS_DENIED The memory block was not
allocated properly.
PMERR_ALREADY_IN_AREA An attempt was made to begin a
new area while an existing
area bracket was already open.
PMERR_ALREADY_IN_ELEMENT An attempt was made to begin a
new element while an existing
element bracket was already
open.
PMERR_ALREADY_IN_PATH An attempt was made to begin a
new path while an existing
path bracket was already open.
PMERR_ALREADY_IN_SEG An attempt was made to open a
new segment while an existing
segment bracket was already
open.
PMERR_APPL_STRUCTURE_TOO_SMALL The application buffer length
is less than the total length
required for the (application)
component types.
PMERR_AREA_INCOMPLETE One of the following has
occurred:
o A segment has been opened , closed,
or drawn.
o GpiAssociate was issued while an
area bracket was open.
o A drawn segment has opened an area
bracket and ended without closing it.
PMERR_ARRAY_TOO_LARGE More than 4 bytes was
attempted to be inserted or
extracted.
PMERR_ARRAY_TOO_SMALL The array specified was too
small.
PMERR_ATOM_NAME_NOT_FOUND The specified atom name is not
in the atom table.
PMERR_BASE_ERROR An OS/2 base error has
occurred. The base error code
can be accessed using the
OffBinaryData field of the
ERRINFO structure returned by
WinGetErrorInfo.
PMERR_BITMAP_IN_USE An attempt was made either to
set a bit map into a device
context using GpiSetBitmap
while it was already selected
into an existing device
context, or to tag a bit map
with a local pattern set
identifier (setid) using
GpiSetBitmapId while it was
already tagged with an
existing setid.
PMERR_BITMAP_IS_SELECTED An attempt was made to delete
a bit map while it was
selected into a device
context.
PMERR_BITMAP_NOT_FOUND A attempt was made to perform
a bit-map operation on a bit
map that did not exist.
PMERR_BITMAP_NOT_SELECTED A attempt was made to perform
an operation on presentation
space associated with a memory
device context that had no
selected bit map.
PMERR_BOUNDS_OVERFLOW An internal overflow error
occurred during boundary data
accumulation. This can occur
if coordinates or matrix
transformation elements (or
both) are invalid or too
large.
PMERR_BUFFER_TOO_SMALL The supplied buffer was not
large enough for the data to
be returned.
PMERR_C_LENGTH_TOO_SMALL The maximum length of the C
structure is less than the
total length required for the
(C) component types.
PMERR_CALLED_SEG_IS_CHAINED An attempt was made to call a
segment that has a chained
attribute set.
PMERR_CALLED_SEG_IS_CURRENT An attempt was made to call a
segment that is currently
open.
PMERR_CALLED_SEG_NOT_FOUND An attempt was made to call a
segment that did not exist.
PMERR_CAN_NOT_CALL_SPOOLER An error occurred attempting
to call the spooler validation
routine. This error is not
raised if the spooler is not
installed.
PMERR_CANNOT_DEL_PRINTER_DD_REF Presentation Manager device
driver deletion not possible
due to a reference.
PMERR_CANNOT_DEL_PRN_ADDR_REF Printer port deletion not
possible due to a reference.
PMERR_CANNOT_DEL_PRN_NAME_REF Printer deletion not possible
due to a reference.
PMERR_CANNOT_DEL_QNAME_REF Spooler queue deletion not
possible due to a reference.
PMERR_CANNOT_DEL_QP_REF Spooler queue processor
deletion not possible due to a
reference.
PMERR_CANNOT_SET_FOCUS Focus cannot be set if a focus
change is in progress, or if a
system-modal window exists.
PMERR_CANNOT_STOP The session cannot be stopped.
PMERR_COL_TABLE_NOT_REALIZABLE An attempt was made to realize
a color table that is not
realizable.
PMERR_COL_TABLE_NOT_REALIZED An attempt was made to realize
a color table on a device
driver that does not support
this function.
PMERR_COORDINATE_OVERFLOW An internal coordinate
overflow error occurred. This
can occur if coordinates or
matrix transformation elements
(or both) are invalid or too
large.
PMERR_DATA_TOO_LONG An attempt was made to
transfer more than the maximum
permitted amount of data
(64512 bytes) using
GpiPutData, GpiGetData, or
GpiElement.
PMERR_DATATYPE_ENTRY_BAD_INDEX An invalid datatype entry
index was specified.
PMERR_DATATYPE_ENTRY_CTL_BAD An invalid datatype entry
control was specified.
PMERR_DATATYPE_ENTRY_CTL_MISS The datatype entry control was
missing.
PMERR_DATATYPE_ENTRY_NOT_NUM The datatype entry specified
was not numerical.
PMERR_DATATYPE_ENTRY_NOT_OFF The datatype entry specified
was not an offset.
PMERR_DATATYPE_INVALID An invalid datatype was
specified.
PMERR_DATATYPE_NOT_UNIQUE An attempt to register a
datatype failed because it is
not unique.
PMERR_DATATYPE_TOO_LONG The datatype specified was too
long.
PMERR_DATATYPE_TOO_SMALL The datatype specified was too
small.
PMERR_DC_IS_ASSOCIATED An attempt was made to
associate a presentation space
with a device context that was
already associated or to
destroy a device context that
was associated.
PMERR_DEL_NOT_ALLOWED Deletion not possible.
PMERR_DESC_STRING_TRUNCATED An attempt was made to supply
a description string with
GpiBeginElement that was
greater then the permitted
maximum length (251
characters). The string was
truncated.
PMERR_DEV_FUNC_NOT_INSTALLED The function requested is not
supported by the presentation
driver.
PMERR_DEVICE_DRIVER_ERROR_1 Miscellaneous error available
for use by user written device
drivers.
PMERR_DEVICE_DRIVER_ERROR_10 Miscellaneous error available
for use by user written device
drivers.
PMERR_DEVICE_DRIVER_ERROR_2 Miscellaneous error available
for use by user written device
drivers.
PMERR_DEVICE_DRIVER_ERROR_3 Miscellaneous error available
for use by user written device
drivers.
PMERR_DEVICE_DRIVER_ERROR_4 Miscellaneous error available
for use by user written device
drivers.
PMERR_DEVICE_DRIVER_ERROR_5 Miscellaneous error available
for use by user written device
drivers.
PMERR_DEVICE_DRIVER_ERROR_6 Miscellaneous error available
for use by user written device
drivers.
PMERR_DEVICE_DRIVER_ERROR_7 Miscellaneous error available
for use by user written device
drivers.
PMERR_DEVICE_DRIVER_ERROR_8 Miscellaneous error available
for use by user written device
drivers.
PMERR_DEVICE_DRIVER_ERROR_9 Miscellaneous error available
for use by user written device
drivers.
PMERR_DOS_ERROR A DOS call returned an error.
PMERR_DOSOPEN_FAILURE A DosOpen call made during
GpiLoadMetaFile or
GpiSaveMetaFile gave a good
return code but the file was
not opened successfully.
PMERR_DOSREAD_FAILURE A DosRead call made during
GpiLoadMetaFile gave a good
return code. However, it
failed to read any more bytes
although the file length
indicated that there were more
to be read.
PMERR_DRIVER_NOT_FOUND The device driver specified
with DevPostDeviceModes was
not found.
PMERR_DUP_SEG During GpiPlayMetaFile, while
the actual drawing mode was
draw-and-retain or retain, a
metafile segment to be stored
in the presentation space was
found to have the same segment
identifier as an existing
segment.
PMERR_DUP_SEGNAME A called segment has a name
that has already been used by
another called segment in the
input PIF.
PMERR_DUPLICATE_TITLE The program title specified in
the PIBSTRUCT already exists
within the same group.
PMERR_DYNAMIC_SEG_SEQ_ERROR During removal of dynamic
segments while processing
GpiDrawChain, GpiDrawFrom, or
GpiDrawSegment, the internal
state indicated that dynamic
segment data was still visible
after all chained dynamic
segments had been processed.
This can occur if segments
drawn dynamically (including
called segments) are modified
or removed from the chain
while visible.
PMERR_DYNAMIC_SEG_ZERO_INV An attempt was been made to
open a dynamic segment with a
segment identifier of zero.
PMERR_ENDDOC_NOT_ISSUED A request to close the spooled
output without first issuing a
an ENDDOC was attempted.
PMERR_ESC_CODE_NOT_SUPPORTED The code specified with
DevEscape is not supported by
the target device driver.
PMERR_EXCEEDS_MAX_SEG_LENGTH During metafile creation or
generation of retained
graphics the system has
exceeded maximum segment size.
PMERR_FONT_AND_MODE_MISMATCH An attempt was made to draw
characters with a character
mode and character set that
are incompatible. For
example, the character
specifies an image/raster font
when the mode calls for a
vector/outline font.
PMERR_FONT_FILE_NOT_LOADED An attempt was made to unload
a font file that was not
loaded.
PMERR_FONT_NOT_LOADED An attempt was made to create
a font that was not loaded.
PMERR_FUNCTION_NOT_SUPPORTED The function is not supported.
PMERR_GREATER_THAN_64K A data item or array dimension
is greater than 65 535.
PMERR_HBITMAP_BUSY An internal bit map busy error
was detected. The bit map was
locked by one thread during an
attempt to access it from
another thread.
PMERR_HDC_BUSY An internal device context
busy error was detected. The
device context was locked by
one thread during an attempt
to access it from another
thread.
PMERR_HEAP_MAX_SIZE_REACHED The heap has reached its
maximum size (64KB), and
cannot be increased.
PMERR_HEAP_OUT_OF_MEMORY An attempt to increase the
size of the heap failed.
PMERR_HFONT_IS_SELECTED An attempt has been made to
either change the owner of a
font, or delete when it is
currently selected.
PMERR_HRGN_BUSY An internal region busy error
was detected. The region was
locked by one thread during an
attempt to access it from
another thread.
PMERR_HUGE_FONTS_NOT_SUPPORTED An attempt was made using
GpiSetCharSet,
GpiSetPatternSet,
GpiSetMarkerSet, or
GpiSetAttrs to select a font
that is larger than the
maximum size (64Kb) supported
by the target device driver.
PMERR_ID_HAS_NO_BITMAP No bit map was tagged with the
setid specified on a
GpiQueryBitmapHandle function.
PMERR_IMAGE_INCOMPLETE A drawn segment has opened an
image bracket and ended
without closing it.
PMERR_INCOMPATIBLE_BITMAP An attempt was made to select
a bit map or perform a BitBlt
operation on a device context
that was incompatible with the
format of the bit map.
PMERR_INCOMPATIBLE_METAFILE An attempt was made to
associate a presentation space
and a metafile device context
with incompatible page units,
size or coordinate format; or
to play a metafile using the
RES_RESET option (to reset the
presentation space) to a
presentation space that is
itself associated with a
metafile device context.
PMERR_INCORRECT_DATATYPE A data type is specified which
is incorrect for this
function.
PMERR_INCORRECT_DC_TYPE An attempt was made to perform
a bit-map operation on a
presentation space associated
with a device context of a
type that is unable to support
bit-map operations.
PMERR_INCORRECT_HSTRUCT A structure handle is
non-NULL, and is invalid for
one of the following reasons:
o It is not the handle of a data structure.
o It is the handle of an ERRINFO
structure, which should not be used in
this call.
o A handle block returned by the bindings
to the application has been used for an
in-line structure handle.
PMERR_INI_FILE_IS_SYS_OR_USER User or system initialization
file cannot be closed.
PMERR_INSUFF_SPACE_TO_ADD The initialization file could
not be extended to add the
required program or group.
PMERR_INSUFFICIENT_DISK_SPACE The operation terminated
through insufficient disk
space.
PMERR_INSUFFICIENT_MEMORY The operation terminated
through insufficient memory.
PMERR_INV_3DCOORD An order specifying
3-dimensional coordinates has
been found in the input PIF.
PMERR_INV_ANGLE_PARM An invalid angle parameter was
specified with GpiPartialArc.
PMERR_INV_ARC_CONTROL An invalid control parameter
was specified with GpiFullArc.
PMERR_INV_AREA_CONTROL An invalid options parameter
was specified with
GpiBeginArea.
PMERR_INV_ATTR_MODE An invalid mode parameter was
specified with GpiSetAttrMode.
PMERR_INV_BACKGROUND_COL_ATTR An invalid background color
attribute value was specified
or the default value was
explicitly specified with
GpiSetAttrs instead of using
the defaults mask.
PMERR_INV_BACKGROUND_MIX_ATTR An invalid background mix
attribute value was specified
or the default value was
explicitly specified with
GpiSetAttrs instead of using
the defaults mask.
PMERR_INV_BITBLT_MIX An invalid lRop was specified
with a GpiBitBlt or
GpiWCBitBlt function.
PMERR_INV_BITBLT_STYLE An invalid options parameter
was specified with a GpiBitBlt
or GpiWCBitBlt function.
PMERR_INV_BITMAP_DATA In processing a bit map, the
end of the data was
unexpectedly encountered.
PMERR_INV_BITMAP_DIMENSION An invalid dimension was
specified with a load bit-map
function.
PMERR_INV_BOX_CONTROL An invalid control parameter
was specified with GpiBox.
PMERR_INV_BOX_ROUNDING_PARM An invalid corner rounding
control parameter was
specified with GpiBox.
PMERR_INV_CHAR_ALIGN_ATTR The text alignment attribute
specified in
GpiSetTextAlignment is not
valid.
PMERR_INV_CHAR_ANGLE_ATTR The default character angle
attribute value was explicitly
specified with GpiSetAttrs
instead of using the defaults
mask.
PMERR_INV_CHAR_DIRECTION_ATTR An invalid character direction
attribute value was specified
or the default value was
explicitly specified with
GpiSetAttrs instead of using
the defaults mask.
PMERR_INV_CHAR_MODE_ATTR An invalid character mode
attribute value was specified
or the default value was
explicitly specified with
GpiSetAttrs instead of using
the defaults mask.
PMERR_INV_CHAR_POS_OPTIONS An invalid options parameter
was specified with
GpiCharStringPos or
GpiCharStringPosAt.
PMERR_INV_CHAR_SET_ATTR An invalid character setid
attribute value was specified
or the default value was
explicitly specified with
GpiSetAttrs instead of using
the defaults mask.
PMERR_INV_CHAR_SHEAR_ATTR An invalid character shear
attribute value was specified
or the default value was
explicitly specified with
GpiSetAttrs instead of using
the defaults mask.
PMERR_INV_CLIP_PATH_OPTIONS An invalid options parameter
was specified with
GpiSetClipPath.
PMERR_INV_CODEPAGE An invalid code-page parameter
was specified with GpiSetCp.
PMERR_INV_COLOR_ATTR An invalid color attribute
value was specified or the
default value was explicitly
specified with GpiSetAttrs
instead of using the defaults
mask.
PMERR_INV_COLOR_DATA Invalid color table definition
data was specified with
GpiCreateLogColorTable.
PMERR_INV_COLOR_FORMAT An invalid format parameter
was specified with
GpiCreateLogColorTable.
PMERR_INV_COLOR_INDEX An invalid color index
parameter was specified with
GpiQueryRGBColor.
PMERR_INV_COLOR_OPTIONS An invalid options parameter
was specified with a logical
color table or color query
function.
PMERR_INV_COLOR_START_INDEX An invalid starting index
parameter was specified with a
logical color table or color
query function.
PMERR_INV_CONV Invalid conversion-type
parameter.
PMERR_INV_COORD_OFFSET An invalid coordinate offset
value was specified.
PMERR_INV_COORD_SPACE An invalid source or target
coordinate space parameter was
specified with GpiConvert.
PMERR_INV_COORDINATE An invalid coordinate value
was specified.
PMERR_INV_CORRELATE_DEPTH An invalid maxdepth parameter
was specified with
GpiCorrelateSegment,
GpiCorrelateFrom, or
GpiCorrelateChain.
PMERR_INV_CORRELATE_TYPE An invalid type parameter was
specified with
GpiCorrelateSegment,
GpiCorrelateFrom, or
GpiCorrelateChain.
PMERR_INV_CURSOR_BITMAP An invalid pointer was
referenced with WinSetPointer.
PMERR_INV_DC_DATA An invalid data parameter was
specified with DevOpenDC.
PMERR_INV_DC_TYPE An invalid type parameter was
specified with DevOpenDC, or a
function was issued that is
invalid for a
OD_METAFILE_NOQUERY device
context.
PMERR_INV_DEV_MODES_OPTIONS An invalid options parameter
was specified with
DevPostDeviceModes.
PMERR_INV_DEVICE_NAME An invalid devicename
parameter was specified with
DevPostDeviceModes.
PMERR_INV_DRAW_BORDER_OPTION An invalid option parameter
was specified with
WinDrawBorder.
PMERR_INV_DRAW_CONTROL An invalid control parameter
was specified with
GpiSetDrawControl or
GpiQueryDrawControl.
PMERR_INV_DRAW_VALUE An invalid value parameter was
specified with
GpiSetDrawControl.
PMERR_INV_DRAWING_MODE An invalid mode parameter was
specified with
GpiSetDrawControl not
draw-and-retain or draw.
PMERR_INV_DRIVER_DATA Invalid driver data was
specified.
PMERR_INV_DRIVER_NAME A driver name was specified
which has not been installed.
PMERR_INV_EDIT_MODE An invalid mode parameter was
specified with GpiSetEditMode.
PMERR_INV_ELEMENT_OFFSET An invalid off (offset)
parameter was specified with
GpiQueryElement.
PMERR_INV_ELEMENT_POINTER An attempt was made to issue
GpiPutData with the element
pointer not pointing at the
last element.
PMERR_INV_END_PATH_OPTIONS An attempt to create or delete
a path out of context of the
path bracket was made.
PMERR_INV_ESC_CODE An invalid escape code was
used in a call to DevEscape.
PMERR_INV_ESCAPE_DATA An invalid data parameter was
specified with DevEscape.
PMERR_INV_FACENAME An invalid font family name
was passed to
GpiQueryFaceString.
PMERR_INV_FACENAMEDESC The font facename description
is invalid.
PMERR_INV_FILL_PATH_OPTIONS An invalid options parameter
was specified with
GpiFillPath.
PMERR_INV_FIRST_CHAR An invalid firstchar parameter
was specified with
GpiQueryWidthTable.
PMERR_INV_FLOOD_FILL_OPTIONS Invalid flood fill parameters
were specified.
PMERR_INV_FONT_ATTRS An invalid attrs parameter was
specified with
GpiCreateLogFont.
PMERR_INV_FONT_FILE_DATA The font file specified with
GpiLoadFonts,
GpiLoadPublicFonts,
GpiQueryFontFileDescriptions,
or GpiQueryFullFontFileDescs
contains invalid data.
PMERR_INV_FOR_THIS_DC_TYPE An attempt has been made to
issue GpiRemoveDynamics or
GpiDrawDynamics to a
presentation space associated
with a metafile device
context.
PMERR_INV_FORMS_CODE An invalid forms code
parameter was specified with
DevQueryHardcopyCaps.
PMERR_INV_GEOM_LINE_WIDTH_ATTR An invalid geometric line
width attribute value was
specified.
PMERR_INV_GETDATA_CONTROL An invalid format parameter
was specified with GpiGetData.
PMERR_INV_GRAPHICS_FIELD An invalid field parameter was
specified with
GpiSetGraphicsField.
PMERR_INV_HBITMAP An invalid bit-map handle was
specified.
PMERR_INV_HDC An invalid device-context
handle or (micro presentation
space) presentation-space
handle was specified.
PMERR_INV_HFONT An invalid font handle was
specified.
PMERR_INV_HMF An invalid metafile handle was
specified.
PMERR_INV_HPAL An invalid color palette
handle was specified.
PMERR_INV_HPS An invalid presentation-space
handle was specified.
PMERR_INV_HRGN An invalid region handle was
specified.
PMERR_INV_ID An invalid lPSid parameter was
specified with GpiRestorePS.
PMERR_INV_IMAGE_DATA_LENGTH An invalid lLength parameter
was specified with GpiImage.
There is a mismatch between
the image size and the data
length.
PMERR_INV_IMAGE_DIMENSION An invalid psizlImageSize
parameter was specified with
GpiImage.
PMERR_INV_IMAGE_FORMAT An invalid lFormat parameter
was specified with GpiImage.
PMERR_INV_IN_AREA An attempt was made to issue a
function invalid inside an
area bracket. This can be
detected while the actual
drawing mode is draw or
draw-and-retain or during
segment drawing or correlation
functions.
PMERR_INV_IN_CURRENT_EDIT_MODE An attempt was made to issue a
function invalid inside the
current editing mode.
PMERR_INV_IN_ELEMENT An attempt was made to issue a
function invalid inside an
element bracket.
PMERR_INV_IN_IMAGE An attempt was made to issue a
function invalid inside an
element bracket.
PMERR_INV_IN_PATH An attempt was made to issue a
function invalid inside a path
bracket.
PMERR_INV_IN_RETAIN_MODE An attempt was made to issue a
function (for example, query)
that is invalid when the
actual drawing mode is not
draw or draw-and-retain.
PMERR_INV_IN_SEG An attempt was made to issue a
function invalid inside a
segment bracket.
PMERR_INV_IN_VECTOR_SYMBOL An invalid order was detected
inside a vector symbol
definition while drawing a
vector (outline) font.
PMERR_INV_INFO_TABLE An invalid bit-map info table
was specified with a bit-map
operation.
PMERR_INV_LENGTH_OR_COUNT An invalid length or count
parameter was specified.
PMERR_INV_LINE_END_ATTR An invalid line end attribute
value was specified.
PMERR_INV_LINE_JOIN_ATTR An invalid line join attribute
value was specified.
PMERR_INV_LINE_TYPE_ATTR An invalid line type attribute
value was specified or the
default value was explicitly
specified with GpiSetAttrs
instead of using the defaults
mask.
PMERR_INV_LINE_WIDTH_ATTR An invalid line width
attribute value was specified
or the default value was
explicitly specified with
GpiSetAttrs instead of using
the defaults mask.
PMERR_INV_LOGICAL_ADDRESS An invalid device logical
address was specified.
PMERR_INV_MARKER_BOX_ATTR An invalid marker box
attribute value was specified.
PMERR_INV_MARKER_SET_ATTR An invalid marker set
attribute value was specified
or the default value was
explicitly specified with
GpiSetAttrs instead of using
the defaults mask.
PMERR_INV_MARKER_SYMBOL_ATTR An invalid marker symbol
attribute value was specified
or the default value was
explicitly specified with
GpiSetAttrs instead of using
the defaults mask.
PMERR_INV_MATRIX_ELEMENT An invalid transformation
matrix element was specified.
PMERR_INV_MAX_HITS An invalid maxhits parameter
was specified with
GpiCorrelateSegment,
GpiCorrelateFrom, or
GpiCorrelateChain.
PMERR_INV_METAFILE An invalid metafile was
specified with
GpiPlayMetaFile.
PMERR_INV_METAFILE_LENGTH An invalid length parameter
was specified with
GpiSetMetaFileBits or
GpiQueryMetaFileBits.
PMERR_INV_METAFILE_OFFSET An invalid length parameter
was specified with
GpiSetMetaFileBits or
GpiQueryMetaFileBits.
PMERR_INV_MICROPS_DRAW_CONTROL A draw control parameter was
specified with
GpiSetDrawControl that is
invalid in a micro
presentation space.
PMERR_INV_MICROPS_FUNCTION An attempt was made to issue a
function that is invalid in a
micro presentation space.
PMERR_INV_MICROPS_ORDER An attempt was made to play a
metafile containing orders
that are invalid in a micro
presentation space.
PMERR_INV_MIX_ATTR An invalid mix attribute value
was specified or the default
value was explicitly specified
with GpiSetAttrs instead of
using the defaults mask.
PMERR_INV_MODE_FOR_OPEN_DYN An attempt was made to open a
segment with the ATTR_DYNAMIC
segment set, while the drawing
mode was set to DM_DRAW or
DM_DRAWANDRETAIN.
PMERR_INV_MODE_FOR_REOPEN_SEG An attempt was made to reopen
an existing segment while the
drawing mode was set to
DM_DRAW or DM_DRAWANDRETAIN.
PMERR_INV_MODIFY_PATH_MODE An invalid mode parameter was
specified with GpiModifyPath.
PMERR_INV_MULTIPLIER An invalid multiplier
parameter was specified with
GpiPartialArc or GpiFullArc.
PMERR_INV_NESTED_FIGURES Nested figures have been
detected within a path
definition.
PMERR_INV_OR_INCOMPAT_OPTIONS An invalid or incompatible
(with micro presentation
space) options parameter was
specified with GpiCreatePS or
GpiSetPS.
PMERR_INV_ORDER_LENGTH An invalid order length was
detected during GpiPutData or
segment drawing.
PMERR_INV_ORDERING_PARM An invalid order parameter was
specified with
GpiSetSegmentPriority.
PMERR_INV_OUTSIDE_DRAW_MODE An attempt was made to issue a
GpiSavePS or GpiRestorePS
function, or an output only
function (for example,
GpiPaintRegion) from
GpiPlayMetaFile without the
drawing mode set to DM_DRAW.
PMERR_INV_PAGE_VIEWPORT An invalid viewport parameter
was specified with
GpiSetPageViewport.
PMERR_INV_PATH_ID An invalid path identifier
parameter was specified.
PMERR_INV_PATTERN_ATTR An invalid pattern symbol
attribute value was specified
or the default value was
explicitly specified with
GpiSetAttrs instead of using
the defaults mask.
PMERR_INV_PATTERN_REF_PT_ATTR An invalid refpoint attribute
value was specified.
PMERR_INV_PATTERN_SET_ATTR An invalid pattern set
attribute value was specified
or the default value was
explicitly specified with
GpiSetAttrs instead of using
the defaults mask.
PMERR_INV_PATTERN_SET_FONT An attempt was made to use an
unsuitable font as a pattern
set.
PMERR_INV_PICK_APERTURE_OPTION An invalid options parameter
was specified with
GpiSetPickApertureSize.
PMERR_INV_PICK_APERTURE_POSN An invalid pick aperture
position was specified.
PMERR_INV_PICK_APERTURE_SIZE An invalid size parameter was
specified with
GpiSetPickApertureSize.
PMERR_INV_PLAY_METAFILE_OPTION An invalid option parameter
was specified with
GpiPlayMetaFile.
PMERR_INV_PRIMITIVE_TYPE An invalid primitive type
parameter was specified with
GpiSetAttrs or GpiQueryAttrs.
PMERR_INV_PS_SIZE An invalid size parameter was
specified with GpiCreatePS or
GpiSetPS.
PMERR_INV_PUTDATA_FORMAT An invalid format parameter
was specified with GpiPutData.
PMERR_INV_QUERY_ELEMENT_NO An invalid start parameter was
specified with DevQueryCaps.
PMERR_INV_RECT An invalid rectangle parameter
was specified.
PMERR_INV_REGION_CONTROL An invalid control parameter
was specified with
GpiQueryRegionRects.
PMERR_INV_REGION_MIX_MODE An invalid mode parameter was
specified with
GpiCombineRegion.
PMERR_INV_REPLACE_MODE_FUNC An attempt was made to issue
GpiPutData with the editing
mode set to SEGEM_REPLACE.
PMERR_INV_RESERVED_FIELD An invalid reserved field was
specified.
PMERR_INV_RESET_OPTIONS An invalid options parameter
was specified with GpiResetPS.
PMERR_INV_RGBCOLOR An invalid rgb color parameter
was specified with
GpiQueryNearestColor or
GpiQueryColor.
PMERR_INV_SCAN_START An invalid scanstart parameter
was specified with a bit-map
function.
PMERR_INV_SEG_ATTR An invalid attribute parameter
was specified with
GpiSetSegmentAttrs,
GpiQuerySegmentAttrs,
GpiSetInitialSegmentAttrs, or
GpiQueryInitialSegmentAttrs.
PMERR_INV_SEG_ATTR_VALUE An invalid attribute value
parameter was specified with
GpiSetSegmentAttrs or
GpiSetInitialSegmentAttrs.
PMERR_INV_SEG_NAME An invalid segment identifier
was specified.
PMERR_INV_SEG_OFFSET An invalid offset parameter
was specified with GpiPutData.
PMERR_INV_SEGLEN An order length exceeds the
remaining segment length in
the input PIF.
PMERR_INV_SETID An invalid setid parameter was
specified.
PMERR_INV_SHARPNESS_PARM An invalid sharpness parameter
was specified with
GpiPolyFilletSharp.
PMERR_INV_STOP_DRAW_VALUE An invalid value parameter was
specified with GpiSetStopDraw.
PMERR_INV_TRANSFORM_TYPE An invalid options parameter
was specified with a transform
matrix function.
PMERR_INV_TYPE Invalid file-type parameter.
PMERR_INV_USAGE_PARM An invalid options parameter
was specified with
GpiCreateBitmap.
PMERR_INV_VIEWING_LIMITS An invalid limits parameter
was specified with
GpiSetViewingLimits.
PMERR_INV_VIEWLIM A set viewing limits order has
an inconsistent mask and order
length in the input PIF.
PMERR_INV_XFORM A set (default) viewing
transform order has an
inconsistent mask and order
length in the input PIF.
PMERR_INVALID_APPL Attempted to start an
application whose type is not
recognized by OS/2.
PMERR_INVALID_ARRAY_COUNT An array has an invalid count,
that is, less than or equal to
zero.
PMERR_INVALID_ARRAY_SIZE A control data type array size
is invalid.
PMERR_INVALID_ASCIIZ The profile string is not a
valid zero-terminated string.
PMERR_INVALID_ATOM The specified atom does not
exist in the atom table.
PMERR_INVALID_ATOM_NAME An invalid atom name string
was passed.
PMERR_INVALID_BUNDLE_TYPE An invalid bundle type was
passed.
PMERR_INVALID_CHARACTER_INDEX On WinNextChar or WinPrevChar,
a character index is invalid,
that is, it is less than 1 or
is greater than the string
length+1.
PMERR_INVALID_CONTROL_DATATYPE An invalid control data type
was specified.
PMERR_INVALID_DATATYPE An invalid data type was
specified.
PMERR_INVALID_DST_CODEPAGE The destination code page
parameter is invalid.
PMERR_INVALID_ERRORINFO_HANDLE On WinFreeErrorInfo, the
ERRINFO is not the handle of
an ERRINFO structure, that is,
it was not created by
WinGetErrorInfo.
PMERR_INVALID_FLAG An invalid bit was set for a
parameter. Use constants
defined by PM for options, and
do not set any reserved bits.
PMERR_INVALID_FREE_MESSAGE_ID An invalid message identifier
was specified. The call has
completed by assuming the
message parameter and reply
data types to be ULONG.
PMERR_INVALID_GROUP_HANDLE An invalid program-group
handle was specified.
PMERR_INVALID_HACCEL An invalid accelerator-table
handle was specified.
PMERR_INVALID_HAPP The application handle passed
to WinTerminateApp does not
correspond to a valid session.
PMERR_INVALID_HATOMTBL An invalid atom-table handle
was specified.
PMERR_INVALID_HEAP_POINTER An invalid pointer was found
within the heap.
PMERR_INVALID_HEAP_SIZE Invalid data was found within
the heap.
PMERR_INVALID_HEAP_SIZE_PARM Invalid data was found within
the heap.
PMERR_INVALID_HEAP_SIZE_WORD Invalid data was found within
the heap.
PMERR_INVALID_HENUM An invalid enumeration handle
was specified.
PMERR_INVALID_HHEAP An invalid heap handle was
specified.
PMERR_INVALID_HMQ An invalid message-queue
handle was specified.
PMERR_INVALID_HPTR An invalid pointer handle was
specified.
PMERR_INVALID_HSTRUCT An invalid (null) structure
handle was specified.
PMERR_INVALID_HWND An invalid window handle was
specified.
PMERR_INVALID_INI_FILE_HANDLE An invalid initialization-file
handle was specified.
PMERR_INVALID_INTEGER The specified atom is not a
valid integer atom.
PMERR_INVALID_INTEGER_ATOM The specified atom is not a
valid integer atom.
PMERR_INVALID_MESSAGE_ID A message identifier is
invalid.
PMERR_INVALID_NUMBER_OF_PARMS The number of parameters is
invalid.
PMERR_INVALID_NUMBER_OF_TYPES The function call has an
invalid number (zero) of
types.
PMERR_INVALID_PARAMETER An application parameter value
is invalid for its converted
PM type. For example: a 4-byte
value outside the range
-32,768 to +32,767 cannot be
converted to a SHORT, and a
negative number cannot be
converted to a ULONG or
USHORT.
PMERR_INVALID_PARAMETER_TYPE A parameter type is invalid
for a bundle mask.
PMERR_INVALID_PARAMETERS An application parameter value
is invalid for its converted
PM type. For example: a 4-byte
value outside the range
-32768 to +32 767 cannot be
converted to a SHORT, and a
negative number cannot be
converted to a ULONG or
USHORT.
PMERR_INVALID_PARAMETERS
PMERR_INVALID_PARM A parameter to the function
contained invalid data.
PMERR_INVALID_PROGRAM_HANDLE An invalid program handle was
specified.
PMERR_INVALID_SESSION_ID The specified session
identifier is invalid. Either
zero (for the application's
own session) or a valid
identifier must be specified.
PMERR_INVALID_SRC_CODEPAGE The source code page parameter
is invalid.
PMERR_INVALID_STRING_PARM The specified string parameter
is invalid.
PMERR_INVALID_SWITCH_HANDLE An invalid Window List entry
handle was specified.
PMERR_INVALID_TARGET_HANDLE An invalid target
program-group handle was
specified.
PMERR_INVALID_TITLE The specified program or group
title is too long or contains
invalid characters.
PMERR_INVALID_TYPE_FOR_LENGTH The data type for a control
length is invalid.
PMERR_INVALID_TYPE_FOR_MPARAM The message parameter type for
a control MPARAM is invalid,
that is, not mparam1, mparam2
or mreply.
PMERR_INVALID_TYPE_FOR_OFFSET The data type for a control
offset is invalid.
PMERR_INVALID_WINDOW The window specified with a
Window List call is not a
valid frame window.
PMERR_KERNING_NOT_SUPPORTED Kerning was requested on
GpiCreateLogFont call to a
presentation space associated
with a device context that
does not support kerning.
PMERR_LABEL_NOT_FOUND The specified element label
did not exist.
PMERR_MATRIX_OVERFLOW An internal overflow error
occurred during matrix
multiplication. This can occur
if coordinates or matrix
transformation elements (or
both) are invalid or too
large.
PMERR_MEMORY_ALLOC An error occurred during
memory management.
PMERR_MEMORY_ALLOCATION_ERR An error occurred during
memory management.
PMERR_MEMORY_DEALLOCATION_ERR An error occurred during
memory management.
PMERR_METAFILE_IN_USE An attempt has been made to
access a metafile that is in
use by another thread.
PMERR_METAFILE_INTERNAL_ERROR An internal inconsistency has
been detected during metafile
unlock processing.
PMERR_METAFILE_LIMIT_EXCEEDED The maximum permitted metafile
size limit was exceeded during
metafile recording.
PMERR_MSG_QUEUE_ALREADY_EXISTS An attempt to create a message
queue for a thread failed
because a message queue
already exists for the calling
thread.
PMERR_MSGID_TOO_SMALL The message identifier
specified is too small.
PMERR_NEGATIVE_STRCOND_DIM A negative array dimension was
passed for a data type length.
PMERR_NO_BITMAP_SELECTED An attempt has been made to
operate on a memory device
context that has no bit map
selected.
PMERR_NO_CURRENT_ELEMENT An attempt has been made to
issue GpiQueryElementType or
GpiQueryElement while there is
no currently open element.
PMERR_NO_CURRENT_SEG An attempt has been made to
issue GpiQueryElementType or
GpiQueryElement while there is
no currently open segment.
PMERR_NO_FILL No flood fill occurred because
either the starting point
color was the same as the
input color when a boundary
fill was requested, or the
starting point color was not
the same as the input color
when a surface fill was
requested.
PMERR_NO_METAFILE_RECORD_HANDLE The metafile record handle was
not found during metafile
recording, or DevEscape
(DEVESC_STARTDOC) was not
issued when drawing to a
OD_QUEUED device context with
a pszDataType field of
PM_Q_STD.
PMERR_NO_MSG_QUEUE
PMERR_NO_PALETTE_SELECTED An attempt to realize a
palette failed because no
palette was previously
selected into the Presentation
Space.
PMERR_NO_SPACE The limit on the number of
Window List entries has been
reached with
WinAddSwitchEntry.
PMERR_NOT_CREATED_BY_DEVOPENDC An attempt has been made to
destroy a device context using
DevCloseDC that was not
created using DevOpenDC.
PMERR_NOT_CURRENT_PL_VERSION An unexpected data format was
found in the initialization
file.
PMERR_NOT_DRAGGING A drag operation is not in
progress at this time.
PMERR_NOT_IN_A_PM_SESSION An attempt was made to access
function that is only
available from PM programs
from a non-PM session.
PMERR_NOT_IN_AREA An attempt was made to end an
area using GpiEndArea or
during segment drawing while
not in an area bracket.
PMERR_NOT_IN_DRAW_MODE An attempt was made to issue
GpiSavePS or GpiRestorePS
while the drawing mode was not
set to DM_DRAW.
PMERR_NOT_IN_ELEMENT An attempt was made to end an
element using GpiEndElement or
during segment drawing while
not in an element bracket.
PMERR_NOT_IN_IDX The application name, key-name
or program handle was not
found.
PMERR_NOT_IN_IMAGE An attempt was made to end an
image during segment drawing
while not in an image bracket.
PMERR_NOT_IN_PATH An attempt was made to end a
path using GpiEndPath or
during segment drawing while
not in a path bracket.
PMERR_NOT_IN_RETAIN_MODE An attempt was made to issue a
segment editing element
function that is invalid when
the actual drawing mode is not
set to retain.
PMERR_NOT_IN_SEG An attempt was made to end a
segment using GpiCloseSegment
while not in a segment
bracket.
PMERR_NOT_SELF_DESCRIBING_DTYP A data type is not
self-describing.
PMERR_OK The code page or country code
passed is not valid.
PMERR_OK The window handle or menu item
passed is not valid.
PMERR_OPENING_INI_FILE Unable to open initialization
file (due to lack of disk
space for example).
PMERR_ORDER_TOO_BIG An internal size limit was
exceeded while converting
orders from short to long
format during GpiPutData
processing. An order was too
long to convert.
PMERR_OWN_SET_ID_REFS An attempt to unload a font
failed because the setid is
still being referenced.
PMERR_PALETTE_BUSY An attempt has been made to
reset the owner of a palette
when it was busy.
PMERR_PALETTE_SELECTED Color palette operations
cannot be performed on a
presentation space while a
palette is selected.
PMERR_PARAMETER_OUT_OF_RANGE The value of a parameter was
not within the defined valid
range for that parameter.
PMERR_PATH_INCOMPLETE An attempt was made to open or
close a segment either
directly or during segment
drawing, or to issue
GpiAssociate while there is an
open path bracket.
PMERR_PATH_LIMIT_EXCEEDED An internal size limit was
exceeded during path or area
processing.
PMERR_PATH_UNKNOWN An attempt was made to perform
a path function on a path that
did not exist.
PMERR_PEL_IS_CLIPPED An attempt was made to query a
pel that had been clipped
using GpiQueryPel.
PMERR_PEL_NOT_AVAILABLE An attempt was made to query a
pel that did not exist in
GpiQueryPel (for example, a
memory device context with no
selected bit map).
PMERR_PRINTER_DD_NOT_DEFINED The Presentation Manager
device driver has not been
defined.
PMERR_PRINTER_QUEUE_NOT_DEFINED The spooler queue for the
printer has not been defined.
PMERR_PRN_ADDR_IN_USE A printer is already defined
on the port.
PMERR_PRN_ADDR_NOT_DEFINED The printer port has not been
defined.
PMERR_PRN_NAME_NOT_DEFINED The printer has not been
defined.
PMERR_PROLOG_ERROR A prolog error was detected
during drawing. Segment
prologs are used internally
within retained segments and
also appear in metafiles. This
error can also arise from an
End Prolog order that is
outside a prolog.
PMERR_PS_BUSY An attempt was made to access
the presentation space from
more than one thread
simultaneously.
PMERR_PS_IS_ASSOCIATED An attempt was made to destroy
a presentation or associate a
presentation space that is
still associated with a device
context.
PMERR_PS_NOT_ASSOCIATED An attempt was made to access
a presentation space that is
not associated with a device
context.
PMERR_QUEUE_TOO_LARGE An attempt to create a message
queue has failed because the
value specified for the size
of the message queue is too
large.
PMERR_RASTER_FONT A request was made for the
outline of a bit-map font.
Outlines can only be returned
for vector font characters.
PMERR_REALIZE_NOT_SUPPORTED An attempt was made to create
a realizable logical color
table on a device driver that
does not support this
function.
PMERR_REGION_IS_CLIP_REGION An attempt was made to perform
a region operation on a region
that is selected as a clip
region.
PMERR_RESOURCE_DEPLETION An internal resource depletion
error has occurred.
PMERR_RESOURCE_NOT_FOUND The specified resource
identity could not be found.
PMERR_SEG_AND_REFSEG_ARE_SAME The segid and refsegid
specified with
GpiSetSegmentPriority were the
same.
PMERR_SEG_CALL_STACK_EMPTY A call stack empty condition
was detected when attempting a
pop function during GpiPop or
segment drawing.
PMERR_SEG_CALL_STACK_FULL A call stack full condition
was detected when attempting
to call a segment using
GpiCallSegmentMatrix,
attempting to preserve an
attribute, or during segment
drawing.
PMERR_SEG_IS_CURRENT An attempt was made to issue
GpiGetData to a segment that
was currently open.
PMERR_SEG_NOT_CHAINED An attempt was made to issue
GpiDrawFrom, GpiCorrelateFrom
or GpiQuerySegmentPriority for
a segment that was not
chained.
PMERR_SEG_NOT_FOUND The specified segment
identifier did not exist.
PMERR_SEG_OVFLOW The input PIF has more than
1000 called segments. This has
overflowed an internal buffer.
PMERR_SEG_STORE_LIMIT_EXCEEDED The maximum permitted retained
segment store size limit was
exceeded.
PMERR_SETID_IN_USE An attempt was made to specify
a setid that was already in
use as the currently selected
character, marker or pattern
set.
PMERR_SETID_NOT_FOUND An attempt was made to delete
a setid that did not exist.
PMERR_SMB_OVFLOW The input PIF has more than
100 symbol sets defined. This
has overflowed an internal
buffer.
PMERR_SOMDD_IS_ACTIVE The DSOM daemon is already
active.
PMERR_SOMDD_NOT_STARTED The DSOM daemon failed to
start.
PMERR_SOURCE_SAME_AS_TARGET The direct manipulation source
and target process are the
same.
PMERR_SPL_CANNOT_OPEN_FILE Unable to open the file.
PMERR_SPL_DD_NOT_FOUND The Presentation Manager
device driver definition could
not be found.
PMERR_SPL_DEVICE_ALREADY_EXISTS The device already exists.
PMERR_SPL_DEVICE_LIMIT_REACHED The limit on the number of
devices has been reached.
PMERR_SPL_DEVICE_NOT_INSTALLED The device has not been
installed.
PMERR_SPL_DRIVER_ERROR No Presentation Manager device
driver supplied or found.
PMERR_SPL_DRIVER_NOT_INSTALLED The Presentation Manager
device driver has not been
installed.
PMERR_SPL_FILE_NOT_FOUND Unable to find the file.
PMERR_SPL_HARD_NETWORK_ERROR Hard network error.
PMERR_SPL_INI_FILE_ERROR Error accessing the
initialization file.
PMERR_SPL_INV_DATATYPE The spool file data type is
invalid.
PMERR_SPL_INV_DRIVER_DATATYPE The data type is invalid for
the Presentation Manager
device driver.
PMERR_SPL_INV_FORMS_CODE The forms code for the job is
invalid.
PMERR_SPL_INV_HSPL The spooler handle is invalid.
PMERR_SPL_INV_JOB_ID The job id is invalid.
PMERR_SPL_INV_LENGTH_OR_COUNT The length or count is
invalid.
PMERR_SPL_INV_PRIORITY The priority for the job is
invalid.
PMERR_SPL_INV_PROCESSOR_DATTYPE The data type is invalid for
the spooler queue processor.
PMERR_SPL_INV_QUEUE_NAME The spooler queue name is
invalid.
PMERR_SPL_INV_TOKEN The token is invalid.
PMERR_SPL_JOB_NOT_PRINTING The print job is not printing.
PMERR_SPL_JOB_PRINTING The print job is already
printing.
PMERR_SPL_MANY_QUEUES_ASSOC More than one queue has been
associated with the printer.
PMERR_SPL_NO_CURRENT_FORMS_CODE There is no current forms code
defined to the Presentation
Manager device driver.
PMERR_SPL_NO_DATA No data supplied or found.
PMERR_SPL_NO_DEFAULT_QUEUE There is no default spooler
queue for the printer.
PMERR_SPL_NO_DISK_SPACE There is not enough free disk
space.
PMERR_SPL_NO_FREE_JOB_ID There is no free job id
available.
PMERR_SPL_NO_MEMORY There is not enough free
memory.
PMERR_SPL_NO_QUEUES_ASSOCIATED A queue has not been
associated with the printer.
PMERR_SPL_NO_SUCH_LOG_ADDRESS The logical address does not
exist (that is, it is not
defined in the initialization
file).
PMERR_SPL_NOT_AUTHORISED Not authorized to perform the
operation.
PMERR_SPL_PRINT_ABORT The job has already been
aborted.
PMERR_SPL_PRINTER_NOT_FOUND The printer definition could
not be found.
PMERR_SPL_PROCESSOR_ERROR No spooler queue processor
supplied or found.
PMERR_SPL_PROCESSOR_NOT_INST The spooler queue processor
has not been installed.
PMERR_SPL_QUEUE_ALREADY_EXISTS The spooler queue already
exists.
PMERR_SPL_QUEUE_ERROR No spooler queue supplied or
found.
PMERR_SPL_QUEUE_NOT_EMPTY The spooler queue contains
print jobs.
PMERR_SPL_QUEUE_NOT_FOUND The spooler queue definition
could not be found.
PMERR_SPL_SPOOLER_NOT_INSTALLED The spooler is not installed.
PMERR_SPL_STATUS_STRING_TRUNC The print job status string
has been truncated.
PMERR_SPL_TEMP_NETWORK_ERROR Temporary network error.
PMERR_SPL_TOO_MANY_OPEN_FILES Too many open files.
PMERR_SPOOLER_QP_NOT_DEFINED The spooler queue processor
has not been defined.
PMERR_START_POINT_CLIPPED The starting point specified
for flood fill is outside the
current clipping path or
region.
PMERR_STARTDOC_NOT_ISSUED A request to write spooled
output without first issuing a
STARTDOC was attempted.
PMERR_STARTED_IN_BACKGROUND The application started a new
session in the background.
PMERR_STOP_DRAW_OCCURRED Segment drawing or
GpiPlayMetaFile was stopped
prematurely in response to a
GpiSetStopDraw request.
PMERR_TOO_MANY_METAFILES_IN_USE The maximum number of
metafiles allowed for a given
process was exceeded.
PMERR_TRUNCATED_ORDER An incomplete order was
detected during segment
processing.
PMERR_UNABLE_TO_CLOSE_DEVICE Unable to close the print
device (for example, powered
off or offline).
PMERR_UNCHAINED_SEG_ZERO_INV An attempt was made to open
segment with segment
identifier zero and the
ATTR_CHAINED segment attribute
not specified.
PMERR_UNSUPPORTED_ATTR An unsupported attribute was
specified in the attrmask with
GpiSetAttrs or GpiQueryAttrs.
PMERR_UNSUPPORTED_ATTR_VALUE An attribute value was
specified with GpiSetAttrs
that is not supported.
PMERR_WINDOW_LOCK_OVERFLOW An overflow occurred for the
use count of a window.
PMERR_WINDOW_LOCK_UNDERFLOW An attempt was made to
decrement the use count of a
window below zero.
PMERR_WINDOW_NOT_LOCKED The window specified in
WinSendMsg was not locked.
PMERR_WPDSERVER_IS_ACTIVE The Workplace Shell DSOM
Server is already active.
PMERR_WPDSERVER_NOT_STARTED The Workplace Shell DSOM
Server could not be started.
WPERR_INVALID_FLAGS An invalid flag was specified.
WPERR_INVALID_OBJECTID An invalid object ID was
specified.
WPERR_INVALID_TARGET_OBJECT An invalid target object was
specified.
ΓòÉΓòÉΓòÉ 5. Area and Polygon Primitives ΓòÉΓòÉΓòÉ
An area is one or more closed figures that can be drawn filled, outlined, or
filled and outlined. If an area includes more than one figure, those figures
can be separate or intersecting.
A polygon, too, is one or more closed figures that can be drawn filled,
outlined, or filled and outlined. Polygons, unlike areas, are limited to
figures with straight edges. Polygons also can be separate or intersecting.
The following topics are related to information in this chapter:
Presentation spaces
Line and arc primitives
Color and mix attributes
Fonts
Bit maps
Paths
ΓòÉΓòÉΓòÉ 5.1. About Area Primitives ΓòÉΓòÉΓòÉ
Applications can create, outline, and fill areas and can create custom-fill
patterns from bit maps or font symbols. Some graphics functions are not valid
within an area definition. For example, you cannot include marker, image, or
character-string primitives in an area definition. The following figure is an
example of an area.
An Area
This area comprises two hexagons, one completely enclosed by the other. The
area is filled with the current area-fill pattern.
ΓòÉΓòÉΓòÉ 5.1.1. Attributes of Area Primitives ΓòÉΓòÉΓòÉ
The attributes of the area primitive are contained in a data structure called
AREABUNDLE. These attributes are:
Pattern symbol
Pattern reference point
Pattern set
Foreground color
Background color
Foreground mix attribute
Background mix mode
When an application creates a presentation space, the area attributes are set
to the default values shown in the following table.
Area Attribute Default Values
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéAttribute ΓöéDefault ΓöéFunction that Redefines Γöé
Γöé ΓöéValue ΓöéAttribute Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéPattern symbol Γöésolid ΓöéGpiSetPattern Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéPattern reference Γöé(0,0) ΓöéGpiSetPatternRefPoint Γöé
Γöépoint Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéPattern set ΓöéLCID_DEFAULTΓöéGpiSetPatternSet Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéForeground color ΓöéBlack ΓöéGpiSetAttrs (ABB_COLOR) Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBackground color ΓöéClear ΓöéGpiSetAttrs (ABB_BACK_COLOR) Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéForeground mix ΓöéOverpaint ΓöéGpiSetAttrs (ABB_MIX_MODE) Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBackground mix ΓöéLeave alone ΓöéGpiSetAttrs Γöé
Γöé Γöé Γöé(ABB_BACK_MIX_MODE) Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Note: If the default (LCID_DEFAULT) for pattern set is changed, the base
pattern set cannot be reselected with GpiSetPatternSet.
ΓòÉΓòÉΓòÉ 5.1.2. Pattern Symbol Attribute ΓòÉΓòÉΓòÉ
The current pattern symbol, also called the symbol point code, is selected from
the current pattern set with GpiSetPattern. The pattern symbol selected for the
specified presentation space is used as the subsequent fill pattern until a new
symbol is selected. Applications must not call GpiSetPattern while in an area
or a path. If the current pattern set specifies a bit map, this attribute is
ignored.
The following table describes the pattern symbols provided by the PM
programming interface in a base pattern set. These symbols are not necessarily
available from other pattern sets.
The Base Pattern Set
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéSymbol ΓöéIdentifier ΓöéLong ValueΓöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéSolid shading decreasing in dots per inch ΓöéPATSYM_DENSE1 Γöé1L - 8L Γöé
Γöé Γöéthrough Γöé Γöé
Γöé ΓöéPATSYM_DENSE8 Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéVertical lines ΓöéPATSYM_VERT Γöé9L Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéHorizontal lines ΓöéPATSYM_HORIZ Γöé10L Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéLines bottom left to top right ΓöéPATSYM_DIAG1 Γöé11L Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéLines bottom left to middle right ΓöéPATSYM_DIAG2 Γöé12L Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéLines top left to bottom right ΓöéPATSYM_DIAG3 Γöé13L Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéLines top left to middle right ΓöéPATSYM_DIAG4 Γöé14L Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéNo shading ΓöéPATSYM_NOSHADE Γöé15L Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéSolid shading ΓöéPATSYM_SOLID Γöé16L Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéAlternate pels ΓöéPATSYM_HALFTONE Γöé17L Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCartesian grid ΓöéPATSYM_HATCH Γöé18L Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéDiagonal crosshatch ΓöéPATSYM_DIAGHATCH Γöé19L Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBlank (often called the clear pattern) ΓöéPATSYM_BLANK Γöé64L Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
The default pattern symbol (PATSYM_DEFAULT) is identical to the PATSYM_SOLID
symbol, and has a long value of 0. The error pattern symbol (PATSYM_ERROR) has
a long value of -1L.
The following figure shows the patterns from the base pattern symbol set.
Applications can determine the current pattern set by calling GpiQueryPattern.
The Base Pattern Symbol Set
ΓòÉΓòÉΓòÉ 5.1.3. Pattern Reference Point Attribute ΓòÉΓòÉΓòÉ
The pattern reference point is the point from which the area's fill-pattern
spreads horizontally and vertically. The lower-left corner of the pattern is
aligned on this point. The pattern reference point has a default value of
(0,0), and is expressed in world coordinates. Applications can determine the
pattern reference point with GpiQueryPatternRefPoint. Applications can specify
the pattern reference point with GpiSetPatternRefPoint; however, this should
not be done inside an area. The pattern reference point does not have to be
within the boundary of the area. The following figure shows an area that was
filled using the default pattern reference point.
The Pattern Reference Point
The pattern of diagonal lines is aligned with the pattern reference point
(0,0). When the picture is displayed or printed, only the hexagon will be
filled.
Use of the default reference point causes the diagonal lines of the pattern to
intersect the area boundary at specific points. If you change the reference
point to (0,4), for example, the pattern shifts upward, and the points of
intersection with the area boundary are different. Although the reference point
is outside the area, when an application displays or prints the picture, only
the area is filled.
ΓòÉΓòÉΓòÉ 5.1.4. Pattern Set Attribute ΓòÉΓòÉΓòÉ
When you create a presentation space, the current pattern set and other area
attributes are set to the default. The current pattern-a black solid, as
described earlier- is specified from the supplied pattern set. (The supplied
set of pattern symbols contains image or raster patterns only.) An area
primitive is filled by repeating this pattern vertically and horizontally
within the area boundary.
Default Pattern Set
The standard pattern set contains patterns of solid shading with decreasing
intensity, and patterns of vertical, horizontal, and diagonal lines. If the
default pattern set is changed with GpiSetDefAttrs, its patterns are not
accessible. The patterns from the default set can be recovered by specifying
GpiSetDefAttrs with the value LCID_DEFAULT, (0).
Customizing Pattern Sets
An application can create custom patterns by using bit maps or characters and
symbols from an image font. When designing custom patterns, consider that the
operating system uses only the first eight bits in the first eight rows,
starting with the lower-left corner of the bit map. The cell size of an image
font used as a fill pattern might be too large to include the complete
character or symbol.
An application can change the appearance of a fill pattern by changing its
alignment in an area primitive with GpiSetPatternRefPoint. When the default
reference point is set, the operating system aligns the lower-left corner of
the fill pattern with the point (0,0) in the application's world space and
begins filling the area. If an application adjusts the pattern reference point
to (3,2), The operating system aligns the lower-left corner of the fill pattern
with the point (3,2) in the application's world space and begins filling the
area. By moving the reference point from (0,0) to (3,2), the fill pattern
appears shifted up two pels and to the right three pels.
Custom Fill Patterns from a Bit Map
To create a custom pattern from a hard-coded bit map, an application must use
the following steps:
1. Create or load a bit map to obtain a bit-map handle; for example, use
GpiLoadBitmap.
2. Call GpiSetBitmapId (ID) to tag the bit map with a local identifier
(lcid) from 1 to 254.
3. Call GpiSetPatternSet (ID) or GpiSetAttrs (ABB_SET) to set the current
fill pattern.
The application can now draw the area.
Custom Fill Patterns from a Font Symbol
To create a custom pattern from a character or a symbol in a font:
1. Create a logical image font and assign it an ID; for example use
GpiCreateLogFont.
2. Call GpiSetPatternSet (ID) or GpiSetAttrs (ABB_SET), passing it the local
identifier for the font.
3. Call GpiSetPattern, passing the value of the code point for a character
or symbol in the font.
The application can now draw the area.
ΓòÉΓòÉΓòÉ 5.1.5. Area Colors and Mix Attributes ΓòÉΓòÉΓòÉ
The color attribute defines the color used to draw a primitive or an object.
The mix attribute determines how the color of a primitive or an object is
combined with the color of the drawing surface, or any other objects on the
surface. Both attributes also are described in Color and Mix Attributes.
The area color defines the color used to fill the output from any of the IBM
OS/2 area functions, when necessary. The area primitive is the only primitive
in which the color can be changed during the drawing of the area. Therefore,
this attribute, more than the other area attributes, depends on the current
value as described in Attribute Currentness.
When a presentation space is created, the area color initial default is black.
The pattern symbol initial default, explained previously, is solid. Areas are
one of the primitives that have a foreground and background color, as shown in
the following figure. The appearance of the area also depends on the pattern
symbol.
Area Primitives
Area primitives have both a color and background color attribute. The
background color does not appear if the pattern symbol is solid, and the
background color is undefined if the pattern symbol is a customized,
multi-colored bit map.
When a presentation space is created, the area mix attribute initial default is
FM_OVERPAINT. The overpaint mix attribute specifies that the area color is not
to be modified by the color of the drawing surface. If the area mix attribute
is changed, the area color is mixed with colors that are already on the drawing
surface.
When the pattern symbol is solid, the color that fills the area, if necessary,
is the current area foreground color. If the pattern symbol is changed to be a
pattern of vertical lines, for example, the color of those lines is the current
area foreground color. Inside of the area bracket, there can be other colors if
these colors are the current color for primitives such as lines or arcs, that
are drawn within the area bracket. These colors are not specifically defined or
influenced by the area foreground color.
The area background color initial default is CLR_BACKGROUND. Usually this is
defined by the application to the same color as the drawing surface. If the
pattern symbol is solid, the area background color does not appear. If the
pattern symbol is changed to be a pattern of vertical lines, for example, the
color in between those lines is the current area background color.
The area background mix attribute initial default is BM_LEAVEALONE. The
leave-alone background mix attribute specifies that the area background color
is not drawn. This means that for a nonsolid pattern symbol, the
drawing-surface color or the color of an object, not created by the area
bracket, but on the drawing surface, shows through the nonsolid pattern. The
area background color, for nonsolid pattern symbols, appears only if the
background mix attribute is changed to overpaint, BM_OVERPAINT.
If you have customized the pattern symbol with a bit map, the color definitions
of the area primitive change. The foreground color corresponds to the color of
the pels that are specified ON in the fill-pattern bit map. The background
color corresponds to the color of the pels that are specified OFF in the
fill-pattern bit map. The foreground and background mix attribute do not
change.
Note: Background color and mix attribute only apply to monochrome (2-color)
fill patterns. The bit set to 0 is defined as the background and the bit set to
1 is defined as the foreground.
A multi-colored bit map is unaffected by the background color and mix
attributes.
To specify a new color or mix attribute call GpiSetAttrs. This function accepts
as input the type of primitive, for example PRIM_AREA, a list of attributes
that are to be changed, a list of attributes that are to be set to their
default values, and the values for the attributes that are to be changed.
GpiSetAttrs is useful to specify colors and mix attributes just for a specific
data structure -for example the AREABUNDLE structure. GpiSetAttrs also provides
some protection against invalid colors.
To determine the current area color and mix attribute, call GpiQueryAttrs. This
function accepts as input the primitive type and the attributes in question. It
returns as output an array of values for the specifically queried attributes.
To reset the default area color and mix attribute, just as with any other
attribute specified in the AREABUNDLE. data structure, call GpiSetDefAttrs.
This function accepts as input the type of primitive, for example PRIM_AREA,
the attributes to be changed, and the values that will become the new default
values. The changing of default values is important when working with segments.
Changing the default values during a series of drawing functions is not
recommended.
The area color and mix attribute also can be specified with:
GpiSetColor
GpiSetMix
GpiSetBackColor
GpiSetBackMix
However, these functions have the disadvantage of specifying the foreground
and background color or mix attribute for all primitive BUNDLE data structures
that have the respective component.
There are four queries that determine the color and mix attribute as specified
by GpiSet... functions:
GpiQueryColor
GpiQueryMix
GpiQueryBackColor
GpiQueryBackMix
If the area color, area background color, mix attribute, or background mix
attribute were specified individually, the aforementioned queries can return a
value inconsistent with the current area attribute.
ΓòÉΓòÉΓòÉ 5.1.6. Area Brackets ΓòÉΓòÉΓòÉ
Areas also are referred to as area brackets, because the functions that create
and define the area always are "bracketed" by the two functions, GpiBeginArea
and GpiEndArea. Only one area is defined between these two functions. However,
within the area, there can be any number of adjacent, intersecting, or
completely separate area primitives.
GpiBeginArea signals the start of a group of primitives that define the
boundary of the area. The current position is not changed by GpiBeginArea,
although it is updated by any drawing instructions that follow.
If you call GpiSetCurrentPosition or GpiMove within an area definition, the
current figure is closed automatically, and a new figure is started at the
current position by the next line or curve. A figure in the area, whose start
and end points are not the same, is closed by drawing a straight line from the
current position to the start position of the figure.
GpiEndArea signals the end of an area definition and tells the operating system
to draw the area. If an application does not close a figure before calling
GpiEndArea, the figure is closed automatically by drawing a straight line from
the end point of the last line or curve to the start point of the current
figure. The current position is always updated to the end point of the last
line drawn.
The functional sequence to draw the area in the following figure could be:
Procedure fncAREA01;
#If 0
GpiBeginArea (* Starts the area bracket *)
GpiSetCurrentPosition (* Set the start point of the *)
(* outer hexagon. *)
GpiPolyLine (* Draw the outer hexagon. *)
GpiSetCurrentPosition (* Set the start point of the inner *)
(* hexagon. *)
GpiPolyLine (* Draw the inner hexagon. *)
GpiEndArea (* End the area definition. *)
#endif
End; (* fncAREA01 *)
An area bracket contains the functions that define an area. Only one area can
be defined between "bracket" functions.
Following the beginning of an area bracket, an application can define the shape
and location of the area in world space by using the following line and arc
functions:
GpiBox
GpiFullArc
GpiLine
GpiPartialArc
GpiPointArc
GpiPolyFillet
GpiPolyFilletSharp
GpiPolyLine
GpiPolySpline
If an application calls either GpiBox or GpiFullArc inside an area, it must
use the DRO_OUTLINE option.
In addition to the drawing functions, an application also can use the
following specification functions inside an area bracket:
GpiBeginElement
GpiCallSegmentMatrix
GpiComment
GpiElement
GpiEndArea
GpiEndElement
GpiGetData
GpiLabel
GpiMove
GpiOffsetElementPointer
GpiPop
GpiPutData
GpiSetArcParams
GpiSetAttrMode
GpiSetAttrs
GpiSetColor
GpiSetCurrentPosition
GpiSetEditMode
GpiSetElementPointer
GpiSetElementPointerAtLabel
GpiSetLineEnd
GpiSetLineJoin
GpiSetLineType
GpiSetLineWidth
GpiSetMix
GpiSetModelTransformMatrix
GpiSetSegmentTransformMatrix
An application also can use the following query functions inside an area
bracket:
GpiQueryArcParams
GpiQueryAttrMode
GpiQueryAttrs
GpiQueryBackColor
GpiQueryBackMix
GpiQueryBoundaryData
GpiQueryCharAngle
GpiQueryCharBox
GpiQueryCharDirection
GpiQueryCharMode
GpiQueryCharSet
GpiQueryCharShear
GpiQueryCharStringPos
GpiQueryCharStringPosAt
GpiQueryClipBox
GpiQueryClipRegion
GpiQueryColor
GpiQueryColorData
GpiQueryColorIndex
GpiQueryCp
GpiQueryCurrentPosition
GpiQueryDefaultViewMatrix
GpiQueryDefCharBox
GpiQueryDevice
GpiQueryDeviceBitmapFormats
GpiQueryEditMode
GpiQueryFontFileDescriptions
GpiQueryFontMetrics
GpiQueryFonts
GpiQueryGraphicsField
GpiQueryInitialSegmentAttrs
GpiQueryKerningPairs
GpiQueryLineEnd
GpiQueryLineJoin
GpiQueryLineType
GpiQueryLineWidth
GpiQueryLineWidthGeom
GpiQueryLogColorTable
GpiQueryMarker
GpiQueryMarkerBox
GpiQueryMarkerSet
GpiQueryMix
GpiQueryModelTransformMatrix
GpiQueryNearestColor
GpiQueryNumberSetIds
GpiQueryPageViewport
GpiQueryPattern
GpiQueryPatternRefPoint
GpiQueryPatternSet
GpiQueryPel
GpiQueryPickAperturePosition
GpiQueryPickApertureSize
GpiQueryRealColors
GpiQueryRegionBox
GpiQueryRegionRects
GpiQueryRGBColor
GpiQuerySegmentAttrs
GpiQuerySegmentNames
GpiQuerySegmentPriority
GpiQuerySegmentTransformMatrix
GpiQuerySetIds
GpiQueryStopDraw
GpiQueryTag
GpiQueryViewingLimits
GpiQueryViewingTransformMatrix
GpiQueryWidthTable
ΓòÉΓòÉΓòÉ 5.1.7. Area Bracket Attributes ΓòÉΓòÉΓòÉ
In addition to the attributes controlled by the AREABUNDLE data structure,
there are two attributes that can be specified for each individual area
bracket:
Area boundary
Area construction
These bracket attributes affect how the area primitives inside the bracket are
drawn.
The concept of attribute currentness is especially important to areas and
paths that contain multiple figures.
ΓòÉΓòÉΓòÉ 5.1.8. Area Boundaries ΓòÉΓòÉΓòÉ
An application specifies the area boundary when it calls GpiBeginArea. There
are two options:
BA_BOUNDARY (the default)
BA_NOBOUNDARY.
The BA_BOUNDARY value tells the programming interface to draw all outlines of
the area primitives within the area bracket, using a line that conforms to the
current LINEBUNDLE attributes. If the line attributes have not been changed,
the default outline color is black on most displays and printers, and the
default line style is solid. An application can change the line color and line
styles within the area bracket. The interior of the area primitive is filled
with the current pattern.
To prevent the interface from outlining an area, an application can use the
BA_NOBOUNDARY flag when calling GpiBeginArea. Only the interior fill pattern
is visible. This value most often is used when an area contains many
overlapping figures, and the interior lines are not desired.
You could think of this option in terms similar to the outline and fill
options discussed with boxes and full arcs. The BA_BOUNDARY value corresponds
to DRO_OUTLINEFILL, and BA_NOBOUNDARY, to DRO_FILL. There is no distinct
boundary value that corresponds to DRO_OUTLINE, the simple outline. To
simulate this effect, OR the BA_NOBOUNDARY value with the appropriate area
construction value when calling GpiBeginArea.
ΓòÉΓòÉΓòÉ 5.1.9. Area Construction ΓòÉΓòÉΓòÉ
An application specifies the area construction when it calls GpiBeginArea.
There are two options:
BA_ALTERNATE (the default)
BA_WINDING.
Construction modes also are called area-fill modes. They provide different
ways of determining whether a given point is included in the filled area.
Normally, the construction mode you use is a matter of personal preference.
Alternate Mode
In alternate mode, the following occurs:
A point is included in the filled area if you have to cross an odd number
of lines in the area when drawing a line from that point to infinity.
A point is not included in the filled area if you have to cross an even
number of lines in the area when drawing a line from that point to
infinity.
In the example in the following figure, the inner hexagon is not shaded,
because to draw a line from any point in the hexagon to infinity, you must
cross two boundary lines. The remainder of the area is shaded, because to move
outside the area, you need to cross only one boundary line.
Calculating Filled Areas Constructed in Alternate Mode
Winding Mode
In winding mode, the direction in which the boundary lines in the area are
drawn determines whether a given point is included in the filled area. The
direction of a line depends on both the graphics functions used to draw it and
the world coordinates that define it. For example, if the current position of
a presentation space is (c,c), and GpiBox is called with the
diagonally-opposite corner of the box specified as (d,d), GpiBox always draws
the box in the following order:
1. (xc.,yc.) to
2. (xd.,yc.) to
3. (xd.,yd.) to
4. (xc.,yd.) and returning to
5. (xc.,yc.).
As illustrated in the following figure, in some cases the box is drawn in a
counterclockwise direction. When either xd. is less than xc., or yd. is less
than yc., but not both, a box is drawn clockwise.
The Box
The current position is (3,2) and the specified corner is at (8,6). The box
is drawn from (3,2) to (8,2) to (8,6) to (3,8) to (3,2).
For the polyline primitive, the direction in which a line is drawn depends on
the relative values of the end points of each line, so you can choose whether
to draw in a clockwise or counterclockwise direction.
To determine if a given point is included in the filled area, count the number
of lines to be crossed to move from that point to infinity. For each boundary
line drawn in one direction, add one to the tally. For each line drawn in the
opposite direction, subtract one from the tally. A point is within the area if
the result is nonzero.
If two figures -for example, the hexagons in the following figure- are drawn
in different directions, the tally for the inner hexagon is 0 and the area
will look exactly as it does in alternate mode.
Area Constructed in Different Directions in Winding Mode
If the two hexagons are drawn in the same direction, the result is 2, and the
inner hexagon is shaded as shown in the following figure.
Area Constructed in the Same Direction in Winding Mode
The boundary lines of the area in the previous figure have been drawn and are
visible through the area-fill pattern. The boundary lines of an area primitive
do not have to be drawn; but if they are, they are drawn according to the
current line attributes.
To vary the appearance of different parts of the boundary line, you can change
the current line attributes during area definition.
The boundary lines of an area are considered a part of the area's interior.
Therefore, when you draw an area without boundary lines (BA_NOBOUNDARY), the
area-fill pattern extends to include the boundaries of the area, and the area
is the same size it would be if the boundary lines had been drawn.
ΓòÉΓòÉΓòÉ 5.1.10. Attribute Currentness ΓòÉΓòÉΓòÉ
Graphics functions that change attributes are valid within the area bracket.
There are misconceptions, however, about which attributes are used when the
figures are displayed in a window or drawn to the printer.
Review the following functional sequence:
Function Effect
GpiSetColor Sets color to red.
GpiBeginArea Opens area bracket
GpiLine Draws a straight line
GpiSetColor Sets color to green.
GpiPolyLine Draws two additional lines to form a triangle.
GpiEndArea Ends the area bracket and displays a picture.
If you are displaying on a color monitor, the image appears as follows:
The triangle has one red line, drawn with GpiLine and two green lines, drawn
with GpiPolyLine. The interior of the triangle, if drawn, is red. Red is the
color that was current when the area was defined and, therefore, is the
current color for the area interior. In terms of the interior area, green is
only the color that was current when the function that initiates drawing was
called.
If the application immediately opened a new area bracket, the interior of that
bracket, if drawn, would be green. The color attribute for the second
AREABUNDLE, is not "inherited" from the last AREABUNDLE drawn.
ΓòÉΓòÉΓòÉ 5.2. About Polygon Primitives ΓòÉΓòÉΓòÉ
Area brackets have the flexibility to draw any combination of curved or
straight lines and combine the results into a closed figure. An advantage that
polygons sometimes have over area brackets, however, is that they require fewer
time-consuming calculations to provide that kind of flexibility.
The operating system provides a function that enables you to draw multiple
straight-line closed areas outside of an area bracket. Like bracket-generated
areas, they can be adjacent, intersecting, or completely separate.
The function is GpiPolygons and the set of objects it draws are called polygon
primitives. A polygon primitive is any set of polygons with specified vertices
that can be filled or filled and outlined. This function accepts as input the
desired number of polygons, the POLYGON data structure for each polygon, and a
boundary and construction option similar to those of the GpiBeginArea function.
The purpose of GpiPolygons is to enable you to specify an area in such a way as
to pass all of the area boundaries at once. This improves performance
significantly because the operating system cannot process the accumulated
primitives inside an area bracket until it reaches a GpiEndArea. GpiPolygons is
not valid inside an area bracket because the figures it defines are areas
already.
Although GpiPolygons is limited to straight line figures, it retains a great
deal of flexibility. The polygon data structure (POLYGON) contains the number
of vertices, and the vertices themselves are in world coordinates. The
collection of POLYGON structures accepted in a single GpiPolygons is not
limited to one type of polygon.
The drawing of the first polygon begins at the current position. For all
subsequent polygons, all vertices must be explicitly defined. If the individual
polygons are not completely defined, they are closed with a straight line drawn
from the last defined vertex to the first.
After the application has defined the polygons, they may be transformed and
manipulated just as other primitives are.
ΓòÉΓòÉΓòÉ 5.2.1. Polygon Boundaries ΓòÉΓòÉΓòÉ
Applications have two options when specifying the polygon boundary:
POLYGON_BOUNDARY (the default)
POLYGON_NOBOUNDARY.
The POLYGON_BOUNDARY value tells the PM programming interface to draw all
outlines of the polygon primitives using a line that conforms to the current
LINEBUNDLE attributes. If the line attributes have not been changed, the
default outline color is black on most display devices and printers, and the
default line style is solid. As the attributes cannot be changed within the
context of GpiPolygons, all polygons are drawn with the same line. The
interior of the polygons are filled with the pattern that conforms to the
current AREABUNDLE attributes.
To prevent PM from outlining an area, an application can use the
POLYGON_NOBOUNDARY flag when calling GpiPolygons. Only the interior fill
pattern is visible. This value is used most often when there are many
overlapping polygons, and the interior lines are not desired.
You might think of this option in terms similar to the outline and fill
options discussed with boxes and full arcs. The POLYGON_BOUNDARY value
corresponds to the DRO_OUTLINEFILL value, and POLYGON_NOBOUNDARY, to the
DRO_FILL. There is no distinct boundary value that corresponds to DRO_OUTLINE,
the simple outline.
To simulate this effect, OR the POLYGON_NOBOUNDARY value with the appropriate
polygon construction value, described below, when calling GpiPolygons.
ΓòÉΓòÉΓòÉ 5.2.2. Polygon Construction ΓòÉΓòÉΓòÉ
An application specifies the area construction when it calls GpiBeginArea.
There are two options:
POLYGON_ALTERNATE (the default)
POLYGON_WINDING.
As with area construction, in alternate mode:
A point is included in the filled polygon if you have to cross an odd
number of lines in the set of polygons when drawing a line from that
point to infinity.
A point is not included in the filled polygon if you have to cross an
even number of lines in the set of polygons when drawing a line from that
point to infinity.
Also as with area construction, in winding mode, the direction in which the
boundary lines of the polygons are drawn determines whether a given point is
included in the filled polygon. Since the individual polygons drawn with
GpiPolygons are generated by independent structures, the direction in which a
polygon is drawn depends only on the vertices of that polygon.
To determine if a given point is included in the filled polygon, count the
number of lines to be crossed to move from that point to infinity. For each
boundary line drawn in one direction add one to the tally. For each line drawn
in the opposite direction, subtract one from the tally. A point is within the
polygon if the result is nonzero.
ΓòÉΓòÉΓòÉ 5.2.3. Polygon Overlap ΓòÉΓòÉΓòÉ
An application specifies which pels are drawn when it calls GpiPolygons. There
are two options:
POLYGON_INCL (the default)
POLYGON_EXCL.
When the overlap value is POLYGON_INCL, the bottom right is included in the
polygon. The value POLYGON_EXCL, the exclusive value, indicates that the
bottom right is excluded from the polygon. This value acts in conjunction with
the mix attribute in determining the appearance of a polygon, which is
especially important for a group of overlapping or adjacent polygons.
For example, GpiPolygons specifies a number of polygons. Two of the polygons
share the vertex pair (6,7) and (9,7). When the polygons are drawn, if the
overlap value was POLYGON_INCL, there are two distinct lines to be drawn from
(6,7) to (9,7). A mix attribute other than FM_OVERPAINT could cause
undesirable results as the line and drawing-surface colors mix.
As with the polygon boundary and construction values, the overlap value can be
ORed when calling GpiPolygons to create a specific effect.
ΓòÉΓòÉΓòÉ 5.3. Using Area and Polygon Primitives ΓòÉΓòÉΓòÉ
You can use area functions to:
Draw one or more closed figures
Create a custom fill pattern from a bit map
Create a custom fill pattern from a font character
ΓòÉΓòÉΓòÉ 5.3.1. Drawing a Single, Closed Figure ΓòÉΓòÉΓòÉ
The following figure shows an example of how to use area functions to draw a
single closed figure that is filled with a vertical pattern using the alternate
mode. The closed figure in this example is a 5-pointed star.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure fncAREA02;
Var
Aptl : Array[0..4] of POINTL; (* Structure for current position *)
Hps : HPS;
Begin
(* Initialize the array of points for the 5-pointed star. *)
aptl[0].x := 400; aptl[0].y := 195;
aptl[1].x := 40; aptl[1].y := 320;
aptl[2].x := 260; aptl[2].y := 10;
aptl[3].x := 260; aptl[3].y := 390;
aptl[4].x := 37; aptl[4].y := 82;
GpiSetPattern(hps, PATSYM_VERT);(* Set pattern outside bracket *)
(* Draw the star. *)
GpiBeginArea(hps, BA_ALTERNATE);
GpiMove(hps, aptl[4]); (* First and last point of star *)
GpiPolyLine(hps, 5, aptl);
GpiEndArea(hps);
End; (* fncAREA02 *)
ΓòÉΓòÉΓòÉ 5.3.2. Drawing Multiple, Intersecting, Closed Figures ΓòÉΓòÉΓòÉ
The following figure is an example of how to use area functions to draw two
intersecting boxes, filled, using the winding mode.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure fncAREA03;
Var
Ptl : POINTL; (* Structure for current position *)
Hps : HPS;
Begin
GpiBeginArea(hps, BA_WINDING);
ptl.x := 100;
ptl.y := 50;
GpiMove(hps, ptl);
ptl.x := 300;
ptl.y := 250;
GpiBox(hps, DRO_OUTLINE, ptl, 0, 0);
ptl.x := 180;
ptl.y := 120;
GpiMove(hps, ptl);
ptl.x := 380;
ptl.y := 320;
GpiBox(hps, DRO_OUTLINE, ptl, 0, 0);
GpiEndArea(hps);
End; (* fncAREA03 *)
ΓòÉΓòÉΓòÉ 5.3.3. Creating a Custom Fill Pattern from a Bit Map ΓòÉΓòÉΓòÉ
The following figure is an example of how to create a custom fill pattern by
using a hard-coded bit map. In this example, the bit map creates a pattern of
arrows.
Uses
Os2Def,Os2Base,Os2PmApi;
Var
LcidCustom : LONG; (* Bit map tag *)
Hps : HPS;
Procedure CreatePattern;
Var
Hbm : HBITMAP; (* Bit map handle *)
bmp2 : BITMAPINFOHEADER2; (* Structure for bit map information *)
pbmi2 : PBITMAPINFO2; (* Pointer to structure for bit map data *)
prgb2 : PRGB2; (* Structure for color data *)
CbBitmapInfo : ULONG;
cColors : ULONG;
CONST AbPattern[0..27] of BYTE = (
$E7, $FF, $C3, $FF,
$C3, $FF, $81, $FF,
$81, $FF, $E7, $FF,
$E7, $FF, $E7, $FF,
$E7, $FF, $E7, $FF,
$E7, $FF, $E7, $FF,
$E7, $FF, $FF, $FF );
Begin
lcidCustom := 1; (* Bit map tag *)
bmp2.cbFix := sizeof(BITMAPINFOHEADER2);
bmp2.cx := 8; (* Bit map is 8 pels wide *)
bmp2.cy := 8; (* Bit map is 8 pels high *)
bmp2.cPlanes := 1; (* One bit plane *)
bmp2.cBitCount := 1; (* One bit per pel *)
(* Use default values for the remainder of the structure. *)
bmp2.ulCompression := 0;
bmp2.cbImage := 0;
bmp2.cxResolution := 0;
bmp2.cyResolution := 0;
bmp2.cclrUsed := 0;
bmp2.cclrImportant := 0;
bmp2.usUnits := 0;
bmp2.usReserved := 0;
bmp2.usRecording := 0;
bmp2.usRendering := 0;
bmp2.cSize1 := 0;
bmp2.cSize2 := 0;
bmp2.ulColorEncoding := 0;
bmp2.ulIdentIfier := 0;
cColors := 1 shl (bmp2.cBitCount * bmp2.cPlanes);
cbBitmapInfo := sizeof(BITMAPINFO2) + (sizeof(RGB2) * cColors);
DosAllocMem(pbmi2, cbBitmapInfo,
PAG_COMMIT Or PAG_READ Or PAG_WRITE);
pbmi2^.cbFix := bmp2.cbFix;
pbmi2^.cx := bmp2.cx;
pbmi2^.cy := bmp2.cy;
pbmi2^.cPlanes := bmp2.cPlanes;
pbmi2^.cBitCount := bmp2.cBitCount;
(* Use default values for the remainder of the structure. *)
pbmi2^.ulCompression := 0;
pbmi2^.cbImage := 0;
pbmi2^.cxResolution := 0;
pbmi2^.cyResolution := 0;
pbmi2^.cclrUsed := 0;
pbmi2^.cclrImportant := 0;
pbmi2^.usUnits := 0;
pbmi2^.usReserved := 0;
pbmi2^.usRecording := 0;
pbmi2^.usRendering := 0;
pbmi2^.cSize1 := 0;
pbmi2^.cSize2 := 0;
pbmi2^.ulColorEncoding := 0;
pbmi2^.ulIdentIfier := 0;
prgb2 := pbmi2 + 1; (* Set address to follow bmp2 *)
(* Set bit map colors to black and white. *)
prgb2[0].bBlue := 0; (* Color[0] = black *)
prgb2[0].bGreen := 0; (* Color[0] = black *)
prgb2[0].bRed := 0; (* Color[0] = black *)
prgb2[0].fcOptions := 0;
prgb2[1].bBlue := 255; (* Color[1] = white *)
prgb2[1].bGreen := 255; (* Color[1] = white *)
prgb2[1].bRed := 255; (* Color[1] = white *)
prgb2[1].fcOptions := 0;
(* Create a bit map and retrieve its handle. *)
hbm := GpiCreateBitmap(hps,
bmp2,
CBM_INIT,
abPattern, (* Array of bits *)
pbmi2);
(* Tag the bit map just created with a custom identIfier (lcid). *)
GpiSetBitmapId(hps, hbm, lcidCustom);
End; (* CreatePattern *)
Procedure MyFunction;
Begin
CreatePattern();
GpiSetPatternSet(hps, lcidCustom);
.
.
.
End; (* func *)
Creating a Custom Fill Pattern from a Bit Map
ΓòÉΓòÉΓòÉ 5.3.4. Creating a Custom Fill Pattern from a Font Character ΓòÉΓòÉΓòÉ
The following figure is an example of how to create a custom fill pattern by
using a character from a font. The fill pattern can be only an 8-by-8 bit map;
as a result, not all of the character is used.
Uses
Os2Def,Os2Base,Os2PmApi;
Var
HPS : HPS; (* PRESENTATION-SPACE HANDLE *)
LcidCustom : LONG; (* Font identifier *)
Afm : Array[0..79] of FONTMETRICS;
Fat : FATTRS;
Procedure fncAREA05;
LoadFont();
GpiSetPatternSet(hps, lcidCustom);
GpiSetPattern(hps, 'o'); (* Use lowercase 'o' as fill *)
.
.
.
End; (* fncAREA05 *)
Procedure LoadFont;
Var
CFonts : LONG;
CPublicFonts, i : LONG;
Begin
CFonts := 0;
lcidCustom := 1;
(* Determine the number of loaded public fonts. *)
cPublicFonts := GpiQueryFonts(hps, QF_PUBLIC, nil, cFonts,
(sizeof(FONTMETRICS)), nil);
(* Load the metrics for all public fonts into afm. *)
GpiQueryFonts(hps, QF_PUBLIC, nil, cPublicFonts,
(sizeof(FONTMETRICS)), afm);
(* Get the first image font with a point size larger than 8. *)
i := 0;
While ((agm[i].fsDefn AND FM_DEFN_OUTLINE) OR afm[i].lEmHeight <= 8)
AND i < cPublicFonts Do
Inc(i);
(* Load the FATTRS structure with the required metrics. *)
fat.usRecordLength := sizeof(fat);
fat.fsSelection := 0;
fat.lMatch := afm[i].lMatch;
StringCopy(fat.szFacename, afm[i].szFacename);
fat.idRegistry := 0;
fat.usCodePage := 0;
fat.lMaxBaselineExt := 0;
fat.lAveCharWidth := 0;
fat.fsType := 0;
fat.fsFontUse := 0;
(* Select this font and assign it a custom lcid. *)
GpiCreateLogFont(hps, nil, lcidCustom, fat);
GpiSetCharSet(hps, lcidCustom);
End; (* LoadFont *)
Creating a Custom Fill Pattern from a Font Character
ΓòÉΓòÉΓòÉ 6. Bit Maps ΓòÉΓòÉΓòÉ
Raster output devices, such as display screens, are made up of a number of
picture elements, called pixels or pels. By setting the color of the pels, you
can create an image on the screen. The screen image can be represented
internally by a graphics object called a bit map. The bit map contains a number
of bits that describe the appearance of each pel on the screen.
This chapter describes bit maps, their creation, uses, and functions. The
following topics are related to information in this chapter:
Presentation spaces and device contexts
Coordinate spaces
Color and mix modes
Area primitives
Paths
ΓòÉΓòÉΓòÉ 6.1. About Bit Maps ΓòÉΓòÉΓòÉ
Applications can use bit maps to:
Store and display scanned images, icons, and symbols
Create fill patterns for area primitives and paths
An application can display a bit-map image on any raster output device. A
raster is a rectangular matrix of pels on a video display or dot matrix
printer. A raster output device displays an image by setting pels in its
matrix to colors specified in a corresponding bit map. An image created in
this way is called a "bit-map image". Bit maps cannot be sent to vector output
devices such as plotters.
A bit map is drawn to an output device row by row. Each horizontal line of
pels is known as a scan line.
There is a 1-to-1 correspondence between the number of rows of pels in a
bit-map image and the rows of bits in a bit map. The first pel in a bit-map
image is in the lower-left corner, and the last pel is in the upper-right
corner. The pels are in left-to-right order inside each row of the image. The
following figure shows this relationship between bit map and image.
Bits and Pels in a Bit-Map Image
When an application creates a bit map by calling GpiCreateBitmap, it specifies
the bit-map width and height in terms of pels in the bit-map image. The width
is the number of pels within a row; the height is the number of rows. The
application must store these dimensions in the BITMAPINFO2 and
BITMAPINFOHEADER and pass their addresses to GpiCreateBitmap.
ΓòÉΓòÉΓòÉ 6.1.1. System Implementation ΓòÉΓòÉΓòÉ
Bit maps are most useful when rapid and frequent movement is required, such as
with icons and pointers. They are especially useful for restoring the contents
of a window-for example, when an overlying window is removed. If you save the
contents of a window in a bit map, you can restore the window contents simply
by redisplaying the bit map when the window needs to be redrawn.
Using bit maps is also an effective method of erasing some of the screen
contents. For example, you can save the image of the screen in a bit map at any
time while drawing on the screen. If you continue drawing after saving the
screen image, you can "erase" any drawing done since you saved the screen image
by redisplaying the bit map.
Bit maps are not, however, the recommended way to store graphics that are going
to be changed. Most changes to the bit-map contents mean that you have to
re-create the bit map.
Bit-map images are device-dependent. Their appearance is affected by the shape
of the device's pels and the device's color capabilities. For example, if the
pels on one display measure 0.05 mm by 0.1 mm, but 0.1 mm by 0.3 mm on a second
display, a circular bit-map pie chart drawn on the first display appears
elliptical on the second. The following figure shows how a bit map appears on
two types of displays.
Bit Map Shown on Two Types of Displays
Bit maps, particularly color bit maps, can also occupy large amounts of memory.
The actual amount of memory occupied by a bit map is determined by both the
size of the bit map and the number of bits used to describe each pel.
ΓòÉΓòÉΓòÉ 6.1.2. Bit Map Functions ΓòÉΓòÉΓòÉ
The OS/2 operating system provides a set of functions that allow you to:
Create bit maps
Create and load custom bit maps
Store color information on a bit map
Draw bit maps
Transfer bit maps
Change the size of a bit map
Specify the mix values for a bit map
Convert between monochrome and color data
Manipulate single pels
Copy images from a display into a bit map
Save a bit map
Delete a bit map
Make a bit map available to other processes
Creating a Bit Map
A bit map can be created by an application or by using the PM Icon Editor.
By an Application
To enable an application to create a bit map:
1. Create a memory device context.
A memory device context enables an application to treat a bit map in
memory as though it were a device. For example, an application can copy
color information from another bit map, or copy pels on the display, into
a bit map associated with a memory device context.
To create the memory device context, call DevOpenDC with:
A device type of OD_MEMORY (second argument)
A handle to a compatible device context (such as the device context
of a device with which the bit map is to be compatible).
Note: The device device-context handle ideally should be the handle
of the actual device to which you will be directing the bit map.
Otherwise, it will be necessary to change ownership to the
appropriate device driver before the BitBlt operation (which copies
the bit map from one presentation space to one associated with a
screen device context). As a consequence, the image may appear
distorted.
If you omit the handle of the compatible device context by specifying
NULL, screen compatibility is assumed.
2. Create a graphics presentation space and associate it with the memory
device context.
The operating system requires this association before the application can
perform many of the bit map operations. The handle of this graphics
presentation space is required as input to subsequent bit-map-creation
and manipulation functions.
3. Create the bit map.
When an application creates a bit map, the handle of the presentation
space that you have associated with the memory device context causes the
bit map to be created in a format that is compatible with the memory
device context.
The application also passes two structures: the bit-map information
header and the bit-map information table. These structures contain a
great deal of information about the bit map.
To create the bit map, call GpiCreateBitmap with:
The handle of the presentation space (first argument)
The bit-map information header, BITMAPINFOHEADER (second argument).
(last argument).
The bit-map information table contains similar information, with the
addition of the RGB2 array structure.
GpiCreateBitmap returns a handle to the bit map, which is used to
identify the bit map.
To determine which bit-map formats are supported on a particular device,
call GpiQueryDeviceBitmapFormats. This returns every format supported on
a named device. The data is returned as an array of bit-map plane and
bit-count pairs. The first pair of values in the array is the one most
suitable for the device.
You can think of the bit map at this stage as a rectangular area of
memory containing random data. You can initialize the bit map at this
stage by providing GpiCreateBitmap with the address in application
storage of some initialization data and by setting the CBM_INIT option.
This is a useful function if, for example, your application always starts
by displaying the same image.
4. Select the bit map.
Before selecting the bit map, you can disassociate the presentation space
from the original memory device context and associate it with a different
memory device context. However, the bit-map format must be convertible to
a format that is supported by the new device. If you have selected one of
the four standard bit-map formats, this compatibility is guaranteed and
the conversion is automatic.
Note: When a presentation space is associated with a memory device
context, a bit map must be selected into the device context before you
can draw in the presentation space.
To select the bit map, call GpiSetBitmap with:
The presentation-space handle (first parameter)
The bit-map handle (second parameter).
The following figure shows the sequence of events when you create and display
a bit map.
Creating and Displaying Bit Maps
The application:
1. Calls DevOpenDC to create the memory device context.
2. Creates a graphics presentation space. This is associated with the memory
device context.
3. Calls GpiCreateBitmap to define a bit map.
4. Calls GpiSetBitmap to designate the bit map as the one currently selected
in the memory device context.
5. Calls drawing instructions to the presentation space to draw to the bit
map.
Note: If the bit map is initialized when it is created, this step does
not normally exist. Alternatively, this step can be a
GpiSetBitmapBits call.
6. Calls GpiBitBlt to copy the bit map from presentation space 1 to
presentation space 2 (associated with a screen device context). The bit
map is transferred directly to the screen.
Using the Icon Editor
Using the Icon Editor, you can create monochrome or color bit maps that have a
static appearance. This means that the bit maps can be created in advance and
then used without change while the application is running.
When you use the Icon Editor to create a bit map, the bit map is saved in a
resource file that can be loaded whenever it is needed. To load a bit-map
file, call GpiLoadBitmap, with the identifier of the resource file that
contains the bit map, as the second parameter. If you allow this value to
default, the application's .EXE file is assumed to contain the bit map.
GpiLoadBitmap lets you specify the x- and y-dimensions (in pels) of the bit
map. The loaded bit map is stretched or compressed accordingly. If you supply
a 0 value for one of these dimensions, the bit map is sized in the other
dimension only, which is likely to cause distortion of the image. If the bit
map is to be produced in its original size, specify 0 for both its width and
its height.
Output from the call to this function is the bit-map handle. To display the
loaded bit map on the screen, follow the sequence of steps described in the
preceding section, omitting steps 3 (defining the bit map) and 5 (issuing
drawing instructions to the presentation space).
A bit map created by the Icon Editor is saved in a device-independent format.
This format generates an array of bit maps with formats (bits per pel)
matching each of the supported display devices.
Creating and Loading a Custom Bit Map
An application can create a custom bit map by setting the bits in an array and
passing the array to GpiCreateBitmap or by running the Icon Editor and loading
the bit map with GpiLoadBitmap.
To create a custom bit map with an array, an application:
1. Defines an array of bytes that will set pels in an image to the
appropriate colors. This array of bytes typically represents the output
of a scanned image.
2. Sets the fields in the BITMAPINFOHEADER to their appropriate values.
3. Sets the fields in the BITMAPINFO2 structure to their appropriate values.
4. Calls GpiCreateBitmap, passes it the addresses of the structures and the
array of bytes that the application has already defined, and sets the
flOptions parameter to CBM_INIT.
If the application is to use this bit map as a fill pattern, it assigns the
bit map a local identifier by calling GpiSetBitmapId.
To load a custom bit map that was created with the Icon Editor:
1. Copy the bit map file to the directory in which you compile your
application.
2. Create a BITMAP entry in your application's resource file, assigning a
unique integer identifier to the bit map.
3. Call GpiLoadBitmap, passing it the identifier that you assigned to the
bit map in the resource file.
An application can use GpiLoadBitmap to load any bit map from a file that
conforms to any of the standard OS/2 bit-map formats or to a device-specific
format supported by the device concerned. This means that an application can
load a bit map created by another application, if that application created the
correct bit-map header and stored the bit-map bits correctly.
Storing Color Information in a Bit Map
Graphics systems use one of two formats for storing color information in bit
maps. The first format uses a single plane and a multiple bit count. The
second format uses multiple color planes.
Color Planes
Bit maps are arranged in one or more color planes. A color plane is an array
of bit-map bits that contains color information.
The bit maps in each of the previous illustrations use the single bit-map
plane format, which is the standard format for bit maps in OS/2 applications.
In this format, a specified number of adjacent bit-map bits contains indexes
to either a special color table of RGB values or actual RGB2 structures.
Whether the application maps bits into an RGB or RGB2 structure depends on the
bit-map format. All of the color information resides in a single plane.
The second color format uses more than one color plane. A common multiplane
bit-map format is the three-plane format, in which one plane corresponds to
the red pels, another to the green pels, and a third to the blue pels.
Multiplane bit-map formats are rare in PM applications. Most bit maps are
stored externally in a single-plane format, although the device driver (such
as VGA) may internally convert them to the multiplane format.
The single-plane format can be converted internally to any multiplane format
used by a device. You also can use a nonstandard number of bits to describe
each pel, if supported by your output device. If you write your own
presentation driver, it must be able to convert the standard bit-map formats
to its own internal format.
An application can determine which color-plane format a device supports by
calling GpiQueryDeviceBitmapFormats.
Standard Bit-Map Formats
On a monochrome device, you need only one bit to describe a single pel, and
that bit is switched on or off. Color devices require more bits. For example,
an eight-color picture requires three bits to describe a single pel, because
each component of the RGB mix (red, green, blue) that gives a pel its color
must be described.
A bit count is a value that specifies how many adjacent bit-map bits
correspond to each pel in a bit-map image. There are four standard bit-map
formats, each with a different bit count. The formats are shown in the
following table.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéFormat ΓöéBits per pel ΓöéSize of 640 x 480 Γöé
Γöé Γöé Γöéimage in bytes Γöé
Γöé Γöé Γöé(uncompressed) Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéMonochrome Γöé1 Γöé38 400 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé16 color Γöé4 Γöé153 600 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé256 color Γöé8 Γöé307 200 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé16.7 million color Γöé24 Γöé921 600 Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Note: The bits are stored consecutively in the bit-map plane. If you have
four bits for each pel, the four bits for pel 1 are followed by the four bits
for pel 2, and so on. The bits that describe pel 1 are stored beginning in the
most-significant bits of the first byte. The data for each scan line is packed
together, and the bottom scan line appears first in memory with the leftmost
pel first. Each scan line, however, is padded at the end so that each line
begins on a ULONG ( 32-bit) boundary.
If the device supports a bit count of one bit per pel, the color table
contains two entries. A device that supports a bit count of n bits per pel,
has a corresponding color table with 2n entries. However, a bit count of 24
bits per pel indicates that there is no color table, because each pel is a
direct RGB value.
The following figure shows a bit map using a bit count of four bits per pel
and an associated color table:
A Bit Map and Its Associated Color Table
If a device uses a bit count of one, four or eight bits per pel, the bit-map
bits contain index values for a bit-map color table. If the device supports a
bit count of 24 bits per pel, the bit-map bits contain the bRed, bGreen, and
bBlue fields of RGB2 structures. No color table is associated with a bit map
on a device that supports a format of 24 bits per pel-such a device can
support over 16 million colors. Instead of using a color table, the
BITMAPINFO2 structure consists of only the header, and the red, green, and
blue color values are provided directly by the bit-map data.
An application can determine the bit-count format that a device supports by
calling GpiQueryDeviceBitmapFormats.
Drawing Bit Maps
An application can draw bit-map images on a raster printer or display screen,
or into metafiles associated with a raster device. Any GPI drawing requests
(including those that produce graphics text), issued to a presentation space
associated with a memory DC containing a selected bit map, cause the bit map
to receive raster images of your drawings. The following table describes the
bit map drawing functions:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéFunction ΓöéInput ΓöéOutput Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéWinDrawBitmap ΓöéThe handle of a bit ΓöéA bit-map image on aΓöé
Γöé Γöémap. Γöéraster display. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéGpiImage ΓöéA buffer containing ΓöéA special monochromeΓöé
Γöé Γöébit map image data. Γöébit-map image on a Γöé
Γöé Γöé Γöéraster display or Γöé
Γöé Γöé Γöéprinter. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéGpiDrawBits ΓöéA buffer containing ΓöéA bit-map image on aΓöé
Γöé Γöébit map image data. Γöéraster display or Γöé
Γöé Γöé Γöéprinter. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéGpiBitBlt ΓöéThe handle of a ΓöéA bit-map image on aΓöé
Γöé Γöépresentation space Γöéraster display or Γöé
Γöé Γöécontaining a bit Γöéprinter, or a Γöé
Γöé Γöémap. Γöébit-map image into aΓöé
Γöé Γöé Γöémetafile (albeit in Γöé
Γöé Γöé Γöéan escape order). Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéGpiWCBitBlt ΓöéThe handle of a bit ΓöéA bit-map image on aΓöé
Γöé Γöémap. Γöéraster display or Γöé
Γöé Γöé Γöéprinter, or a Γöé
Γöé Γöé Γöébit-map image into aΓöé
Γöé Γöé Γöémetafile. Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
WinDrawBitmap
WinDrawBitmap draws a bit-map image by copying it into a window linked to a
target presentation space. A call to this function is valid only in draw mode
(DM_DRAW), and only for a screen device context. This function does not
require an application to select a bit map into a presentation space before
the application draws the corresponding image. An application can use
WinDrawBitmap to scale bit maps by specifying DBM_STRETCH as the last
argument, and the address of a RECTL structure as the fourth argument. The
coordinates in this structure are always device coordinates.
WinDrawBitmap draws both color and monochrome bit maps. Color bit maps require
no color conversion. Monochrome bit maps can be drawn in any two colors which
can be explicitly specified as parameters to the call or taken from the image
bundle. These parameters will be color table indexes or RGB values, depending
on the color table mode of the target presentation space. The current image
bundle mix modes are used and, for certain mix values, will affect color.
You can call WinDrawBitmap in retain mode, but the bit-map image will only be
drawn and not recorded in the segments.
Note: An application can determine the current colors and their corresponding
mix modes by calling GpiQueryAttrs. The application can set them by calling
GpiSetAttrs.
An inverted bit map is a bit map in which the colors have been inverted; white
becomes black and black becomes white. An application can draw inverted bit
maps by calling WinDrawBitmap and passing it DBM_INVERT as the last argument.
An application can draw halftone bit maps by calling WinDrawBitmap and passing
it DBM_HALFTONE as the last argument. Before drawing the bit map, clear the
presentation space to CLR_BACKGROUND using GpiErase.
GpiImage
GpiImage draws a nonstandard, monochrome (two-color) bit map called an image
primitive. The bit-map bits in an image are stored in the opposite order from
the bits in a standard bit map-the first bit in the bit map corresponds to the
pel in the upper-left corner of the bit-map image, and the last bit in the bit
map corresponds to the pel in the lower-right corner of the bit-map image. The
following figure shows the correspondence between the bits in an image
primitive and the pels in the drawing produced by GpiImage.
Image-Primitive Bits and Pels
A call to GpiImage also is valid only in draw mode (DM_DRAW), but can provide
output to a screen or printer. An application cannot scale bit-map images by
using GpiImage.
Transferring Bit Maps
The three remaining bit-map drawing functions operate in very similar ways.
GpiDrawBits copies a bit-map image from application memory to a device or a
device context. GpiBitBlt directs bit maps to devices other than the screen.
GpiWCBitBlt enables you to retain the bit-map data in the segment store of the
target presentation space.
The similarities are discussed first. Their differences are discussed in the
sections that follow.
An application should use GpiDrawBits, GpiBitBlt, or GpiWCBitBlt to draw bit
maps that use a color table or RGB2 structures color formats of 1, 4, 8, or 24
bits per pel.
An application can draw inverted bit maps for any of these three functions by
calling the function and passing ROP_NOTSRCCOPY as the raster operation.
GpiDrawBits
GpiDrawBits copies bit map image data from storage into a bit map that has
been selected into a device context associated with a presentation space. It
can also copy bit-map image data to a device. An application can use this
function to draw a bit map without first selecting the bit map into a
presentation space.
This function is valid in all draw modes. Set the draw mode to DM_RETAIN or
DM_DRAWANDRETAIN to create retained segments; otherwise, the default mode,
DM_DRAW, is selected.
GpiBitBlt
GpiBitBlt requires an application to use device coordinates for the dimensions
of the source and target rectangles. GpiBitBlt allows you to direct bit maps
to devices other than the screen. It is independent of the drawing mode, but
it operates as if in draw mode.
At its simplest, GpiBitBlt copies a whole bit map, unaltered, from a device or
bit map source to a device or bit map target. At its most powerful, GpiBitBlt
can take a part of or a whole bit map, and alter both its size and appearance
in the process of copying it to another device context. A bit map can be
copied:
From one memory device context to another memory device context
From a memory device context to the device context of an output device
(screen window or printer) that supports raster operations
From the device context of an output device to a memory device context
From the device context of an output device to another device context of
the same output device. In both cases, the screen device can be a PM
window.
A memory device context (whether it is the source or the target of the
GpiBitBlt operation) must have a bit map selected when GpiBitBlt is called.
GpiBitBlt has a number of input parameters, two of which are the handles of
two presentation spaces: the source presentation space and the target
presentation space. Both of these presentation spaces must be associated with
an appropriate device context. Unless the associated device is a banded
printer, a single presentation space can be both source and target. This
allows you to copy a bit map within a single PM window, or to update the bit
map. The source and target rectangles are specified in device coordinates in
GpiBitBlt. GpiBitBlt, consequently, is very device-dependent, and should be
avoided when creating data for interchange.
GpiWCBitBlt
GpiWCBitBlt enables you to retain the bit-map data in the segment store of the
target presentation space. It is a valid in all three drawing modes:
DM_DRAW-display, printer, or into metafile
DM_RETAIN-into metafile or segment
DM_DRAWANDRETAIN-display, printer, then into associated segment or
metafile.
Most of the bit-map drawing operations occur in an application's device space.
GpiWCBitBlt, however, lets an application draw in its world space, but
requires that you use device coordinates for the source rectangle, and world
coordinates for the target rectangle.
An application can use GpiWCBitBlt to draw a bit map with consistent
dimensions on devices with different aspect ratios. The aspect ratio is the
ratio of a pel's width to its height.
When creating data for interchange, use GpiWCBitBlt. GpiWCBitBlt provides the
same function as GpiBitBlt, with the following exceptions:
The target rectangle is specified in world coordinates, and all four
coordinates (the two source-rectangle coordinates and the two
target-rectangle coordinates) must be specified.
The source handle must be a bit-map handle. It must not be the handle of
a source presentation space. The bit map identified by the source handle
must not be selected into a memory device context when you call
GpiWCBitBlt.
GpiWCBitBlt conforms to the current drawing mode in the target
presentation space. If the drawing mode is retain or draw-and-retain, the
bit map is retained in segment store.
Changing the Size of the Bit Map
You can specify the sizes of the rectangular bit blocks in both the source and
the target presentation spaces. To do this, provide an array of up to four
device-coordinate positions as input to the call. The first two positions
define the lower-left and upper-right corners of the target rectangle; the
second two define the same two corners of the source rectangle.
If you want the two rectangles to be of equal size, do not specify the device
coordinates of the upper-right corner of the source rectangle. The correct
amount of data is automatically transferred to fill the target rectangle. The
following figure shows the points count for bit-block transfers.
Points Count for Bit-Block Transfers
Equal-size rectangles can be built much faster than rectangles that need
stretching or compressing. Compression options (flOptions) are ignored if the
rectangles are to be of equal size.
If the rectangles are not to be of equal size, you must specify all four
coordinate points. The bit-map data is stretched, if the target rectangle is
larger than the source rectangle, or compressed, if the target rectangle is
smaller, to fit the target rectangle. The bit map is stretched by duplicating
rows and columns of data, an action that might cause distortion of the image.
If the data is to be compressed, you can specify one of three compression
options as shown in the following table.
Bit-map Data Compression Rules
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOption ΓöéCompression Rules Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBBO_OR ΓöéCompresses the bit map data as Γöé
Γöé Γöénecessary, using a logical OR operation Γöé
Γöé Γöéon the eliminated rows and columns. ThisΓöé
Γöé Γöéis useful for preserving the foreground Γöé
Γöé Γöéwhen foreground pels are "1" and the Γöé
Γöé Γöébackground pels are "0". Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBBO_AND ΓöéCompresses the bit map data as Γöé
Γöé Γöénecessary, using a logical AND operationΓöé
Γöé Γöéon the eliminated rows and columns. ThisΓöé
Γöé Γöéis useful for preserving the foreground Γöé
Γöé Γöéwhen foreground pels are "0" and the Γöé
Γöé Γöébackground pels are "1". Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBBO_IGNORE ΓöéCompresses the bit map data as Γöé
Γöé Γöénecessary, but ignores any eliminated Γöé
Γöé Γöérows or columns. This is most useful forΓöé
Γöé Γöécolor bit maps, where the results of Γöé
Γöé Γöécombining pels of different colors are Γöé
Γöé Γöéunpredictable. Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Specifying Mix Values
When you draw a graphics primitive into a presentation space, it is affected
by the current foreground-mix value, and possibly by the current
background-mix value, in that presentation space. However, when you copy a bit
map into a target presentation space, the current foreground- and
background-mix values in the target presentation space are ignored. Instead,
you specify a mix-mode value, also known as the raster-operation (ROP) value.
This value determines:
How the bit map is affected by any data that might already be in the
target presentation space
The color of each pel in the bit map
Each pel in the bit map of the target presentation space has, potentially,
three color settings:
The setting of that pel in the source rectangle
The initial setting of that pel in the target rectangle
The setting of that pel in the current area-fill pattern in the target
presentation space
The (boolean) values of each of these settings can be combined using boolean
operations to produce the final value of each pel in the target presentation
space. For a color target, the target must be regarded as consisting of
multiple one-bit per pel planes, with the mixing applied to each plane
separately to produce the final color index into the physical color table.
Because the final color index is an index into the physical palette, the
results of any color mixing are therefore unpredictable. For example, if you
ORed together two numeric index values, the color indexed by the result is
unlikely to have any direct relation to the colors indexed by the two values
you ORed together. It depends on the order of the colors in the physical
table.
As input to the functions, you supply an actual mix value. The ROP mix value
required to achieve any given result can be determined from the following
table. The final value of each bit in every pel depends on the values of the
corresponding bits in the pattern (P), source (S), and the original target
value (T initial). Each row of the table shows one of the eight possible
combinations of these values. For each combination, mark the desired final
target value in the last column. The eight bits in this column then show the
value of the least significant byte of the ROP value required to achieve this
mixing function. For example, if the required mixing function is to copy the
source to the target, then the target (final) column will be the same as the S
column, and the ROP value will have the binary value 11001100, or the
hexadecimal value 00CC.
Possible Settings for the Index Bits
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéPatternΓöéSource ΓöéTarget (initial)Γöé ΓöéTarget (final) Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé0 Γöé0 Γöé0 Γöé ΓöéIndex bit 0 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé0 Γöé0 Γöé1 Γöé ΓöéIndex bit 1 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé0 Γöé1 Γöé0 Γöé ΓöéIndex bit 2 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé0 Γöé1 Γöé1 Γöé ΓöéIndex bit 3 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé1 Γöé0 Γöé0 Γöé ΓöéIndex bit 4 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé1 Γöé0 Γöé1 Γöé ΓöéIndex bit 5 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé1 Γöé1 Γöé0 Γöé ΓöéIndex bit 6 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé1 Γöé1 Γöé1 Γöé ΓöéIndex bit 7 Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
If you want the pattern to have no effect on the target rectangle, the four
low-order bits of the index must be the same as the four high-order bits.
A monochrome bit map consists only of source settings of 1s and 0s, where a 1
or 0 represents each pel. It also has a two-entry color table with index 0
specifying what color a 0 pel represents and index 1 representing what color a
1 pel represents. In a monochrome bit map, this color table is not used during
BitBlt operations (but is used when drawing to the bit map and moving the bit
map between devices). The preceding table defines how any combination of
pattern, source and target original (1 and 0) values define the target final
(1 or 0) value. A color bit map has an index (in the case of four bits, 0-15)
for each pel which, serves as index into the bit map color table (16 entries
for four bits per pel) to define the color of each pel. Unlike monochrome bit
maps, this table is used during BitBlt operations (instead of target image
bundle attributes) to provide the color of the target output.
The following table represents a selection of the most commonly used mixes
with predefined symbolic names and their effects. (There are many other
possible mixes).
Mix Value Names
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéMix Name ΓöéEffect Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_SRCCOPY ΓöéSource Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_SRCPAINT ΓöéSource OR Target Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_SRCAND ΓöéSource AND Target Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_SRCINVERT ΓöéSource XOR Target Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_SRCERASE ΓöéSource AND NOT (Target) Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_NOTSRCCOPY ΓöéNOT (Source) Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_NOTSRCERASE ΓöéNOT (Source) AND NOT (Target) Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_MERGECOPY ΓöéSource AND Pattern Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_MERGEPAINT ΓöéNOT (Source) OR Target Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_PATCOPY ΓöéPattern Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_PATPAINT ΓöéNOT (Source) OR Pattern OR Target Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_PATINVERT ΓöéTarget XOR Pattern Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_DSTINVERT ΓöéNOT (Target) Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_ZERO Γöé0 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_ONE Γöé1 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéROP_GRAY ΓöéGray pattern background Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ROP_SRCCOPY is the most often used value. It simply copies the bit map to the
target presentation space without performing any color mixing. Because most of
the remaining mixes involve some degree of color mixing, they result in an
image that is quite different from the original.
Converting between Monochrome and Color Data Bit Maps
It is possible to copy a monochrome bit map to a color bit map or device, and
to copy a color bit map to a monochrome bit map or device. PM handles these
conversions automatically according to the following rules:
If you are copying a monochrome bit map to a color bit map or to a color
or monochrome device surface, a source setting of 1 adopts the current
image-foreground color of the target presentation space, and a source
setting of 0 adopts the current image-background color of the target
presentation space. For example, if the image foreground color is blue
and the image background color is yellow in the target presentation
space, a monochrome bit map is converted to a blue foreground on a yellow
background.
If you are copying from a monochrome pattern to a color bit map or
device, a source setting of 1 adopts the current area-foreground color of
the target device and a source setting of 0 adopts the current
area-background color of the target device. Note that if image bundle
attributes do not exist for the source bit map, as is the case when using
GpiWCBitBlt (which uses a bit map handle as the source), then zero source
pixels adopt the image background color and nonzero source pixels adopt
the image-foreground color of the presentation space.
If you are copying a color bit map to a monochrome bit map or device,
those pels that have the same color as the current image-background color
in the source presentation space adopt the image background color of the
target presentation space. For example, if the current image-background
color in the source presentation space is blue, all blue pels in the bit
map take on the color of the current image background in the target
presentation space.
All other pels in the color bit map adopt the current image foreground
color of the target presentation space.
Manipulating Single Pels
You can manipulate single pels in a bit map by using GpiSetPel and
GpiQueryPel. GpiSetPel sets the pel at the specified point (in world
coordinates) to the current line color. This function is independent of the
current drawing mode, and its effect is immediate. It is, however, a
device-dependent function. The CAPS_RASTER_CAPS option of DevQueryCaps
indicates if GpiSetPel is supported on the current device.
Copying Images from a Display into a Bit Map
An application can copy an image from a raster display screen to a bit map by
calling GpiBitBlt or GpiWCBitBlt. Before copying the bit map, the application
must call DevOpenDC to create a memory device context. This device context
allows an application to treat a bit map in memory as though it were a
device-the application can copy color information from pels on the display to
the bit map.
Once an application creates a memory device context, associates it with a
presentation space, and selects a bit map into the presentation space, the
application can use the presentation-space handle as the first argument to
GpiBitBlt or GpiWCBitBlt. If the application will be drawing the image on
devices with different aspect ratios, the application should use GpiWCBitBlt
to preserve the original dimensions of the bit map.
Saving a Bit Map
You have two ways to save a bit map that has been created by an application:
Store the bit map in a metafile, by calling GpiWCBitBlt.
Metafiles are covered in detail later.
Use the IBM OS/2 file-handling functions, in conjunction with
GpiQueryBitmapBits and GpiSetBitmapBits.
An application can save a bit map in a file by calling
GpiQueryBitmapBits, DosOpen, DosWrite, and DosClose.
GpiQueryBitmapBits copies bit-map data from a memory device context (that has
a standard-format bit map selected into it) to a buffer. The bit map you copy
can be newly created or have been loaded from a resource file.
You must supply the address in application storage of a bit-map information
table. The bit-map information table has the same structure as the bit map
information header, except for an additional entry, the colors field. As input
to GpiQueryBitmapBits, you supply a bit-count value and a plane value. These
must both be standard bit-map format values, so the plane value is always 1,
and the bit-count value is 1, 4, 8, or 24. If any conversion of the bit-map
data is necessary, it is done automatically. You also must provide the address
of the application storage into which the bit-map data is to be loaded. You
probably will need to find out how large the bit map is before you can do
this. GpiQueryBitmapParameters returns the width, height, plane count, and bit
count of a named bit map.
You also must supply the size of the fixed portion of the header (as well as
bit count, and so on). Nonstandard formats supported by the device that owns
the bit map will also be valid for GpiQueryBitmapBits.
You must ensure that you allocate sufficient storage at the end of the bit map
information table for the returned color table which, if the number of planes
is 1, will have 2n entries, where n is the number of bits per pel.
On return from GpiQueryBitmapBits, the system supplies the width, height, and
bit-map color table in the bit-map information table. You can retrieve a part
of a bit map by specifying the number of the scan line from which the transfer
is to start, and the number of scan lines you want.
When you have copied a bit map into application storage, you can save the bit
map externally, and reload it later, by using OS/2 file-handling functions.
After the application creates a file by calling DosOpen, it can call DosWrite
to copy the buffer containing the bit-map bits into the file. The application
then closes the file by calling DosClose.
If an application needs to use a bit map it has stored on disk, it can copy
the file's contents into a buffer by calling DosRead, and then copy
information about the image to the bit map by calling GpiSetBitmapBits. The
application must select the bit map into a memory device context before it
sets the bits. As with GpiQueryBitmapBits, you can transfer a part of the bit
map rather than the whole. GpiSetBitmapBits can be used to transfer
standard-format bit maps only, and only to a bit map selected into a memory
device context. If necessary, bit-map data is automatically converted from one
standard format to another. Nonstandard formats supported by the device owning
the bit map will also be valid for GpiSetBitmapBits.
If an application creates bit maps another application might use, it should
create them by using the standard IBM OS/2 bit-map file format.
Deleting a Bit Map
It is good practice always to delete a bit map from memory when you have
finished using it. To delete a bit map, use GpiDeleteBitmap. If you have
loaded a bit map from a resource file, GpiDeleteBitmap deletes only its memory
version. If the bit map has not been deleted when the owning process ends, it
is deleted automatically by the system.
Making Bit Maps Available to Other Processes
When an application creates a bit map or loads one from a resource file, it
can make the bit map available to other processes by placing the bit-map
handle in the clipboard.
ΓòÉΓòÉΓòÉ 6.2. Using Bit Maps ΓòÉΓòÉΓòÉ
An application can use bit-map functions to:
Copy an image from a raster device (such as a display screen) to a bit
map
Copy an image from a raster device (such as a display screen) to the same
device
Copy an image from a bit map to a raster device
Copy an image from a bit map to another bit map
Copy an image from application memory to a bit map
Copy an image from application memory to a raster device
Scale bit-map images
Create custom fill patterns for area primitives and paths
Load a bit map created with the Icon Editor
Draw bit-map images
Store bit maps in a metafile or application memory
ΓòÉΓòÉΓòÉ 6.2.1. Copying an Image from a Display Screen to a Bit Map ΓòÉΓòÉΓòÉ
To copy an image from a display screen to a bit map:
1. Associate the memory device context with a presentation space.
2. Create a bit map.
3. Select the bit map into the memory device context by calling
GpiSetBitmap.
4. Determine the location (in device coordinates) of the image.
5. Call GpiBitBlt and copy the image to the bit map.
The following figure demonstrates these steps.
Uses
Os2Def,Os2PmApi;
Var
HdcMem : HDC;
PszData : Array[0..3] of PSZ;
HpsMem, hps : HPS;
Hab : HAB;
sizlPage : SIZEL;
bmp : BITMAPINFOHEADER2;
pbmi : PBITMAPINFO2;
Hbm : HBITMAP;
SWidth, SHeight : SHORT;
Aptl : Array[0..2] of POINTL;
AlData : Array[0..1] of LONG;
Begin
SWidth := 128;
SHeight := 128;
FillChar(sizlPage,SizeOf(sizlPage),0);
FillChar(PszData[1],SizeOf(PszData[1]),nil);
FillChar(PszData[2],SizeOf(PszData[2]),nil);
FillChar(PszData[3],SizeOf(PszData[3]),nil);
StrCopy(PszData[0],'Display');
(*
* Create the memory device context and presentation space so they
* are compatible with the screen device context and presentation space.
*)
hdcMem := DevOpenDC(hab, OD_MEMORY, '*', 4,
pszData, NULLHANDLE);
hpsMem := GpiCreatePS(hab, hdcMem, sizlPage,
PU_PELS or GPIA_ASSOC or GPIT_MICRO);
(* Determine the device's plane/bit-count format. *)
GpiQueryDeviceBitmapFormats(hpsMem, 2, alData);
(*
* Load the BITMAPINFOHEADER2 and BITMAPINFO2 structures. The sWidth and
* sHeight fields specIfy the width and height of the destination
* rectangle.
*)
bmp.cbFix := sizeof(BITMAPINFOHEADER2);
bmp.cx := sWidth;
bmp.cy := sHeight;
bmp.cPlanes := alData[0];
bmp.cBitCount := alData[1];
bmp.ulCompression := BCA_UNCOMP;
bmp.cbImage := (((sWidth *
(1 shl bmp.cPlanes) * (1 shl bmp.cBitCount)) + 31) / 32) * sHeight;
bmp.cxResolution := 70;
bmp.cyResolution := 70;
bmp.cclrUsed := 2;
bmp.cclrImportant := 0;
bmp.usUnits := BRU_METRIC;
bmp.usReserved := 0;
bmp.usRecording := BRA_BOTTOMUP;
bmp.usRendering := BRH_NOTHALFTONED;
bmp.cSize1 := 0;
bmp.cSize2 := 0;
bmp.ulColorEncoding := BCE_RGB;
bmp.ulIdentIfier := 0;
DosAllocMem(pbmi, sizeof(BITMAPINFO2) +
(sizeof(RGB2) * (1 shl bmp.cPlanes) * (1 shl bmp.cBitCount)),
PAG_COMMIT or PAG_READ or PAG_WRITE);
pbmi^.cbFix := bmp.cbFix;
pbmi^.cx := bmp.cx;
pbmi^.cy := bmp.cy;
pbmi^.cPlanes := bmp.cPlanes;
pbmi^.cBitCount := bmp.cBitCount;
pbmi^.ulCompression := BCA_UNCOMP;
pbmi^.cbImage := ((sWidth+31)/32) * sHeight;
pbmi^.cxResolution := 70;
pbmi^.cyResolution := 70;
pbmi^.cclrUsed := 2;
pbmi^.cclrImportant := 0;
pbmi^.usUnits := BRU_METRIC;
pbmi^.usReserved := 0;
pbmi^.usRecording := BRA_BOTTOMUP;
pbmi^.usRendering := BRH_NOTHALFTONED;
pbmi^.cSize1 := 0;
pbmi^.cSize2 := 0;
pbmi^.ulColorEncoding := BCE_RGB;
pbmi^.ulIdentIfier := 0;
(* Create a bit map that is compatible with the display. *)
hbm := GpiCreateBitmap(hpsMem, bmp, Ord(False), nil, pbmi);
(* Associate the bit map and the memory presentation space. *)
GpiSetBitmap(hpsMem, hbm);
(* Copy the screen to the bit map. *)
aptl[0].x := 0; (* Lower-left corner of destination rectangle *)
aptl[0].y := 0; (* Lower-left corner of destination rectangle *)
aptl[1].x := sWidth; (* Upper-right corner of destination rectangle *)
aptl[1].y := sHeight; (* Upper-right corner of destination rectangle *)
aptl[2].x := 0; (* Lower-left corner of source rectangle *)
aptl[2].y := 0; (* Lower-left corner of source rectangle *)
hps := WinGetScreenPS(HWND_DESKTOP);
GpiBitBlt(hpsMem, hps,
sizeof(aptl) / sizeof(POINTL), (* Number of points in aptl *)
aptl, ROP_SRCCOPY, BBO_IGNORE);
WinReleasePS(hps);
End.
ΓòÉΓòÉΓòÉ 6.2.2. Scaling and Drawing a Bit-Map Image ΓòÉΓòÉΓòÉ
You can scale a bit map by calling GpiBitBlt or GpiWCBitBlt and altering the
dimensions of the target rectangle. The following figure shows how to shrink
the screen copied in the first example to half its original size, and then
redraw it by calling GpiBitBlt.
Uses
Os2Def,Os2PmApi;
Var
Aptl : Array[0..2] of POINTL;
HpsMem, hps : HPS;
Hwnd : HWND;
SWidth,SHeight : SHORT;
Begin
SWidth := 128;
SHeight := 128;
(* Target-rectangle dimensions (in device coordinates) *)
aptl[0].x := 0;
aptl[0].y := 0;
aptl[1].x := sWidth / 2;
aptl[1].y := sHeight / 2;
(* Source-rectangle dimensions (in device coordinates) *)
aptl[2].x := 0;
aptl[2].y := 0;
aptl[3].x := sWidth;
aptl[3].y := sHeight;
GpiBitBlt(hps, hpsMem,
sizeof(aptl) / sizeof(POINTL), (* Number of points in aptl *)
aptl, ROP_SRCCOPY, BBO_IGNORE);
WinReleasePS(hps);
End.
ΓòÉΓòÉΓòÉ 6.2.3. Creating a Custom Fill Pattern ΓòÉΓòÉΓòÉ
To create a custom fill pattern that the operating system will use to fill area
primitives and paths:
1. Set an array of bits for a bit map that measures 8-bits-by-8-bits
(remember that the operating system pads the bit-map bits on a ULONG
(32-bit) boundary).
2. Create a bit map in a screen presentation space by calling
GpiCreateBitmap and passing it the address of the array of bits from Step
1.
3. Assign a local identifier (lcid) to the bit map by calling
GpiSetBitmapId.
4. Set the attribute of the pattern set in the AREABUNDLE structure by
calling GpiSetPattern.
The following figure shows how to create the pattern.
Uses
Os2Def,Os2PmApi;
Var
LcidCustom : LONG;
Hps : HPS;
Pbmi : PBITMAPINFO2;
Bmp : BITMAPINFOHEADER2;
Hbm : HBITMAP;
prgb2 : PRGB2;
(* Define an array of bytes; this array creates a grid pattern. *)
CONST AbPattern5 : Array[0..63] of BYTE = (
$FF, $FF, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00,
$80, $00, $00, $00 );
Begin
LcidCustom := 1;
(* Create the bit map, passing the address of the array of bytes. *)
hbm := GpiCreateBitmap(hps, bmp, CBM_INIT, (PBYTE) abPattern5, pbmi);
(* Assign a local identIfier to the bit map. *)
GpiSetBitmapId(hps, hbm, lcidCustom);
(* Set the pattern-set attribute in the AREABUNDLE structure. *)
GpiSetPatternSet(hps, lcidCustom);
End.
ΓòÉΓòÉΓòÉ 6.2.4. Loading a Bit Map from a File ΓòÉΓòÉΓòÉ
You can load a bit map from a file if the format of the file corresponds to the
standard IBM OS/2 bit-map file format. (Any bit map that you create with the
Icon Editor is automatically stored in this format.) To load a bit map:
1. Copy the bit-map file to the directory that contains your application's
resource file and source code.
2. Create an entry in your application's resource file, assigning a unique
integer identifier to the bit map.
3. Call GpiLoadBitmap in your application's source code, passing it the
integer identifier that you assigned to the bit map in your application's
resource file.
You can actually include your bit map in the application's .EXE file or in a
separate resource file. If the bit map is included in a separate resource
file, you must specify both the resource ID and the ID of the bit map within
the resource file on GpiLoadBitmap. If bit map is to be included in the
application's .EXE file, the resource ID is specified as NULL and only the ID
of the bit map is required by GpiLoadBitmap.
Following is an example of code from an application's resource file that
assigns the integer value 200 to a bit-map file called CUSTOM.BMP.
BITMAP 200 CUSTOM.BMP
The following figure is an example of code from the application that shows how
to retrieve a bit-map handle by calling GpiLoadBitmap, use the handle to tag
the bit map by calling GpiSetBitmapId, and then use the local identifier
supplied by GpiSetBitmapId to set the bit map as the current fill pattern,
using GpiSetPatternSet.
Uses
Os2Def,Os2PmApi;
Var
Hps : HPS;
Hbm : HBITMAP;
LcidCustom : LONG;
Ptl : POINTL;
Begin
LcidCustom := 1;
hbm := GpiLoadBitmap(hps, (* Presentation-space handle *)
NULLHANDLE, (* Resource in application's module *)
IDB_PATTERN, (* Bit-map ID *)
16, (* Bit-map width *)
16); (* Bit-map height *)
(* Assign a local identIfier to the bit map. *)
GpiSetBitmapId(hps, hbm, lcidCustom);
(* Set the pattern-set attribute in the AREABUNDLE structure. *)
GpiSetPatternSet(hps, lcidCustom);
ptl.x := 100;
ptl.y := 100;
GpiMove(hps, ptl);
ptl.x := 200;
ptl.y := 200;
GpiBox(hps, DRO_OUTLINEFILL, ptl, 0, 0);
ΓòÉΓòÉΓòÉ 6.2.5. Storing a Bit Map in a Metafile ΓòÉΓòÉΓòÉ
You can draw bit maps in a metafile or segment by calling GpiWCBitBlt. The
operating system converts this function to a drawing order. The
target-rectangle dimensions that you pass to GpiWCBitBlt are in world
coordinates, not device coordinates. The following figure shows how to draw a
bit map in a metafile, and then play the metafile.
Uses
Os2Def,Os2PmApi;
Var
Dop : DEVOPENSTRUC;
HdcMeta : HDC;
Hps : HPS;
HpsMeta : HPS;
SizlPage : SIZEL;
Hmf : HMF;
Hbm : HBITMAP;
Hab : HAB;
Hwnd : HWND;
Aptl : Array[0..3] of POINTL;
Begin
dop.pszLogAddress := nil;
dop.pdriv := nil;
dop.pszDataType := nil;
StrCopy(dop.pszDriverName,'DISPLAY');
hdcMeta := DevOpenDC(hab, OD_METAFILE, '*', 4L,
dop, NULLHANDLE);
hpsMeta := GpiCreatePS(hab, hdcMeta, sizlPage, PU_PELS or GPIA_ASSOC);
hbm := GpiLoadBitmap(hpsMeta, NULLHANDLE, IDB_PATTERN, 16, 16);
*
aptl[0].x := aptl[0].y := 0; (* Lower-left corner target rectangle *)
aptl[1].x := 150; (* X coordinate upper-right target rectangle *)
aptl[1].y := 300; (* Y coordinate upper-right target rectangle *)
aptl[2].x := aptl[2].y := 0; (* Lower-left corner source rectangle *)
aptl[3].x := aptl[3].y := 16; (* Upper-right corner source rectangle *)
GpiWCBitBlt(hpsMeta, hbm, 4L, aptl, ROP_SRCCOPY, BBO_IGNORE);
GpiAssociate(hpsMeta, NULLHANDLE);
hmf := DevCloseDC(hdcMeta);
GpiPlayMetaFile(hps, hmf, 0, nil, nil, 0, nil);
WinReleasePS(hps);
End.
You can also store a bit map in a metafile by calling GpiBitBlt. In this case,
however, the bit map will be stored inside an escape order.
ΓòÉΓòÉΓòÉ 7. Creating and Drawing Retained Graphics ΓòÉΓòÉΓòÉ
There are two types of graphics output in the OS/2 operating system:
Retained graphics, which are stored in segments and can be redrawn or
edited when necessary
Nonretained graphics, which are drawn immediately but not stored and
therefore cannot be used again without repeating the graphics functions
needed to re-create the picture
This chapter describes the advantages of using retained graphics and provides
information on creating and drawing retained graphics.
The following topics are related to the information in this chapter:
Presentation spaces and device contexts
Coordinate spaces and transformations
Editing retained graphics and graphics segments
ΓòÉΓòÉΓòÉ 7.1. About Creating and Drawing Retained Graphics ΓòÉΓòÉΓòÉ
An application draws by calling graphics functions. Applications store retained
graphics in segments, which can be edited. This means that the retained image
can be modified without having to re-create the unmodified portion using
multiple GPI functions.
When using nonretained graphics, the output appears on the output device (for
example, a window) immediately. However, if part of the picture is erased or
must be repeated, the application must call the same graphics functions a
second, or even a third time.
There are many other advantages to using retained graphics, including:
Convenience-An application can draw retained graphics with a single
function that accesses the storage area containing all the individual
functions necessary for the object.
Flexibility-An application can redraw graphics retained in the segment
store to any number of device contexts.
Editing-An application can modify an object without having to call all
the functions necessary to re-create the picture. Individual segments can
be moved, scaled, or rotated; then, redrawn.
Editing the graphics within a segment is described in Editing Retained
Graphics and Graphics Segments.
Power-An application can access the more powerful and useful graphics
functions only when graphics are stored in segments.
Organization-An application can use segments to store the components that
will be assembled into the final picture.
Primarily, a graphics segment is a means of grouping and storing graphics
primitives and their attributes. Although the graphics within a segment
usually are related in some way, they do not have to be. A segment might
contain a number of unrelated GPI functions that you want to keep and execute
at specific times.
Retained graphics do affect application performance, however, in that a normal
presentation space requires 114KB of main memory more than a micro
presentation space, and using the drawing mode DM_RETAIN adds an additional
46KB.
Note: Your application can have up to 16KB (16378) segments in the segment
store of a single presentation space. The size of an individual segment
is limited only by the amount of storage available to you.
Do not confuse a graphics segment with a memory segment.
ΓòÉΓòÉΓòÉ 7.1.1. Drawing Modes ΓòÉΓòÉΓòÉ
When you create a presentation space, the drawing mode is set to draw. Your
application can change this mode using GpiSetDrawingMode. The two additional
drawing modes provided by the PM are retain (DM_RETAIN) and draw-and-retain
(DM_DRAWANDRETAIN). Your application can determine which drawing mode is set by
using GpiQueryDrawingMode.
The drawing mode that you select becomes current for the presentation space,
and it can be changed any number of times. Select the appropriate drawing mode
before creating a segment. The drawing mode affects the segment type.
Draw Mode
In draw mode, graphics output is provided immediately to the currently
associated device and is not retained in a segment store. When the graphics
have been drawn, they cannot be used again unless they are re-created. For
example, when a window containing draw mode graphics is moved or sized, the
graphics have to be re-created by the application.
Draw mode graphics are suitable if an application is creating fairly simple
graphics quickly or is maintaining its own graphics database. In the latter
case, there is nothing to gain by retaining graphics.
A segment created when the drawing mode is DM_DRAW, is called a nonretained
segment. While it might sound contradictory, nonretained segments have certain
advantages that are described in Nonretained Graphic Segments.
Retain Mode
In retain mode, graphics are retained in the segment store only. They are not
directed to the current device as they are created.
In retain mode, the presentation space does not have to be associated with a
device context when graphics are being defined. It is possible to define
graphics and store their definitions without sending them to a display screen
or printer. The concept of attribute currentness, however, is relevant only
when you are drawing graphics to an output device. For example, the color or
other attribute that is current when you define a primitive is the color in
which the line is drawn. That color or other attribute might not be the color
that is current when you you actually draw the primitive. This is described in
Attribute Currentness.
Many of the GPI queries that return current attribute values are invalid in
retain mode because current attribute values have no effect when graphics are
not sent to an output device.
Draw-and-Retain Mode
In draw-and-retain mode, graphics are both drawn on the current device as they
are created and stored for later use. The GPI queries that return current
attribute values are valid in draw-and-retain mode.
ΓòÉΓòÉΓòÉ 7.1.2. Creating a Graphics Segment ΓòÉΓòÉΓòÉ
Your application signals the start of a graphics segment using GpiOpenSegment,
which is valid only in a normal presentation space. The following figure is an
example of two segments in a presentation space.
Presentation Space
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé Γöé
Γöé Graphics Segment 1 Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé Γöé
GpiOpenSegment (hps,1); Γöé Γöé Γöé Γöé
GpiSet... (hps,...); ΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöé Γöé
GpiLine (hps,...); ΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇ Γöé Γöé
GpiCloseSegment (hps); Γöé Γöé Γöé Graphics Segment 2Γöé
Γöé Γöé Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé Γöé Γöé Γöé
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé Γöé Γöé
Γöé Γöé Γöé Γöé
GpiOpenSegment (hps,2); Γöé Γöé Γöé Γöé
GpiSet... (hps,...); ΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇ Γöé Γöé
GpiLine (hps,...); ΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇ Γöé Γöé
GpiCloseSegment (hps); Γöé Γöé Γöé Γöé
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé Γöé
Γöé Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Graphics Segments in a Presentation Space
GpiOpenSegment accepts, as input, the presentation space handle and a long
integer value, which names each segment.
OS/2 applications identify segments with long integer values. If you want to
refer to the segment individually in later graphics operations (for example, to
edit the segment) the identifier you supply must be greater than 0 and unique
within the presentation space.
If you do not want to refer to the segment individually after it is created,
you can give the segment an identifier of 0. You might do this when you are
creating nonretained segments, for example. Any number of segments can have the
0 identifier. They are referred to throughout this book as zero segments.
To determine which names already have been used in a presentation space, use
GpiQuerySegmentNames. This function returns an array of segment names for all
retained segments, excluding zero segments, within a specified name range.
Segments do not have to be named in consecutive order (although it is
recommended for organizational purposes) because the segment order can be
changed using GpiSetSegmentPriority.
ΓòÉΓòÉΓòÉ 7.1.3. Filling a Graphics Segment ΓòÉΓòÉΓòÉ
After a graphics segment is opened, the GPI functions that follow become a part
of a retained segment and are executed every time the segment itself is drawn.
The typical GPI functions that would be called are those that:
Create graphics primitives-such as lines or markers
Assign attributes to those primitives-such as color or line type.
However, there are a few GPI functions that you cannot call while there is an
open segment-for example a second GpiOpenSegment. These functions are
identified in GPI Function Context.
A presentation space can contain many segments. Each time you open a new
segment, many attributes reset themselves to default values. Therefore, the
current position and attribute values that apply before you call
GpiOpenSegment cannot be guaranteed to be in effect after you call the
function. Beginning each segment with a number of attribute-setting requests
and, possibly, with GpiSetCurrentPosition, is recommended. Your application
also might take advantage of GpiSetDefAttrs, for example, to minimize the
number of attributes that must be dealt with upon opening a new segment.
ΓòÉΓòÉΓòÉ 7.1.4. Closing a Graphics Segment ΓòÉΓòÉΓòÉ
When you have finished creating a graphics segment, close it using
GpiCloseSegment. There can be only one open segment at a time in a single
graphics presentation space, so you must close one segment before going on to
the next.
There is some degree of clean-up processing associated with using
GpiCloseSegment, known as close-segment processing, that can make current
attribute values unreliable. For more information about the effects of
GpiOpenSegment and GpiCloseSegment on current attributes, see Graphics
Attributes.
ΓòÉΓòÉΓòÉ 7.1.5. Segment Attributes ΓòÉΓòÉΓòÉ
Each segment, whether retained or nonretained, has a number of characteristics,
called attributes that you can set in accordance with your application's
requirements. The attributes of a segment are quite different from those of a
graphics primitive in that segment attributes have ON and OFF settings. There
are seven segment attributes. However, only two are described in this chapter:
chained (ATTR_CHAINED) and fast-chained (ATTR_FASTCHAIN).
When an application creates a segment in a presentation space, the operating
system assigns initial attributes to it. By default, five of the attributes
will be set ON and two will be set OFF. The chained and fast-chained attributes
are set ON. Your application can alter these values using
GpiSetInitialSegmentAttrs or retrieve the values of the current initial
attributes using GpiQueryInitialSegmentAttrs.
The chain attribute tells the operating system to add each new segment in your
application's presentation space to the segment chain. The fast-chained
attribute tells the operating system to prevent the resetting of the primitive
attributes to their default values before drawing the segment chain.
Chained Attribute
When you define a segment with the chained attribute switched ON, that segment
becomes a part of the segment chain and is called a chained segment. The
segment chain is composed of all chained segments defined in a single
presentation space. Segments can be chained together so that they can be drawn
as a group. By default, each new segment is chained to the previous segment.
There can be only one segment chain at a time in a single presentation space,
and all chained segments are chained to each other in the order in which you
created them. Zero segments must have the chained attribute.
Usually, a logical relationship exists between the segments in a segment chain,
although this is not a requirement. The whole segment chain can be drawn using
GpiDrawChain. Each segment in the chain is called a root segment. Root segments
are affected by those GPI functions that act on the segment chain, but they
also can be manipulated independently of the chain.
Segments that are defined with the chained attribute switched OFF are called
unchained segments. Your application can switch off the chain attribute using
GpiSetInitialSegmentAttrs (hps, ATTR_CHAIN, ATTR_OFF). Unchained segments
always are retained when they are created, regardless of the current
drawing-mode parameter. An unchained segment must have a unique name.
There are a number of reasons for defining a segment as unchained. For example,
a particular segment might not belong to the picture that is defined by the
segment chain. You also are likely to define as unchained any segment that
belongs to the picture but that has no single, fixed place in the segment
chain. A car wheel, for example, could be defined once but drawn four times in
a picture of a car. It would have no single, fixed place in the segment chain,
but would be included four times in the picture by being called from one or
more root segments.
A segment is called from another segment by including GpiCallSegmentMatrix in
the calling segment. A segment and the segments it calls logically are one
object. An important point about called segments is that they assume the
primitive attribute settings of the calling segment. Of course, you can change
the attribute settings within the called segment if the inherited values are
inappropriate.
A closed, unchained segment can be called from any other segment. Chained
segments, however, cannot be called from other segments.
Fast-Chained Attribute
The fast-chained attribute applies only to chained segments. It prevents
primitive attributes from being reset to their default values at the beginning
of the segment, an aid to performance. There is unnecessary overhead in
resetting attributes to their defaults if either of the following is true:
You are going to change the default values of the attributes at the start
of the segment.
You know that attributes have not been altered previously from their
default values.
The fast-chained attribute is switched ON by default, and you should leave it
on unless you specifically want attributes to be set to their default values.
To turn off the fast-chained attribute, call GpiSetInitialSegmentAttrs (hps,
ATTR_FASTCHAIN, ATTR_OFF).
ΓòÉΓòÉΓòÉ 7.1.6. Actual Drawing Mode ΓòÉΓòÉΓòÉ
The drawing mode, as defined by GpiSetDrawingMode, works in conjunction with
the segment status to produce the actual drawing mode. It is the actual drawing
mode that determines whether graphics are:
Drawn directly to the output device
Retained in the segment store
Both drawn and retained
The actual drawing mode is summarized in the following table.
The Current Drawing Mode
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé Γöé ΓöéContext Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéGpiSetDrawingModeΓöéChained SegmentΓöéUnchained ΓöéOutside of anyΓöé
Γöéparameter Γöé ΓöéSegment Γöésegment Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéDM_DRAWANDRETAIN Γöédraw-and-retainΓöéretain Γöédraw Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéDM_RETAIN Γöéretain Γöéretain Γöédraw Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéDM_DRAW Γöédraw Γöéretain Γöédraw Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
As you can see in the preceding table, graphics within chained segments always
conform to the current drawing mode parameter. That is, they are drawn in
DM_DRAW mode, retained in DM_RETAIN mode, and both drawn and retained in
DM_DRAWANDRETAIN mode.
Graphics in unchained segments always are retained, regardless of the current
drawing-mode parameter. You cannot retain segments created when the current
drawing-mode parameter is DM_DRAW, unless they are unchained segments.
Similarly, graphics outside segments always are drawn without being retained.
You cannot retain primitives outside segments, regardless of the current
drawing mode.
Note: A micro presentation space has no segment store. Therefore, you cannot
create graphics segments in a micro presentation space, nor can you change the
drawing mode, which is always DM_DRAW.
ΓòÉΓòÉΓòÉ 7.1.7. Drawing a Retained Graphic ΓòÉΓòÉΓòÉ
Your application can draw a complete segment chain with GpiDrawChain. The
segments are drawn in the order in which they appear in the chain. For example,
the segments in the following figure are drawn in the following order:
1. Root segment 1
2. Unchained segment A
3. Unchained segment B
4. Root segment 2
5. Unchained segment B
6. Root segment 3.
Chained and Called Segments
Segment A is called by root segment 1, and segment B is called by both segment
A and root segment 2. Segment C calls segment D. Both C and D are unchained
segments that are not called from the segment chain, and consequently, are not
part of the segment chain.
GpiSetSegmentPriority changes the position of a root segment (which must not
be a zero segment) in the chain. As input to this function, you supply the
name of the segment you want to reorder and the name of a reference segment.
The reference segment is the segment that either will be immediately before,
or immediately after, the reordered segment's new position in the chain.
If the segment you are moving is to come after the reference segment in the
chain, it is said to have a higher priority (HIGHER_PRI). If it is to come
before the reference segment, it is said to have a lower priority (LOWER_PRI).
The nearer a segment is to the end of the chain, the higher its priority.
If you supply the name of an unchained segment as input to
GpiSetSegmentPriority, the segment is added to the chain in the position you
specify. To learn the position of a segment in the chain, use
GpiQuerySegmentPriority.
If your application called the following functions:
GpiSetSegmentPriority (hps, C, 2, LOWER_PRI)
GpiSetSegmentPriority (hps, 3, 0, HIGHER_PRI)
GpiSetSegmentPriority (hps, B, 0, LOWER_PRI)
the segment chain in the previous figure would appear as in the following
figure; and GpiDrawChain would draw the segments in the following order:
1. Root segment 3
2. Root segment 1
3. Unchained segment A
4. Unchained segment B
5. Segment C
6. Unchained segment D.
7. Root segment 2
8. Unchained segment B.
9. Segment B
Chained and Called Segments Reordered Using GpiSetSegmentPriority
Segment Priority
The priority of a segment, in conjunction with the current foreground and
background mix attributes, affects how the picture is presented to the user.
The segment with the highest priority is drawn last, and appears on top of the
previously drawn primitives. Picture components in segments with low
priorities risk being drawn over and never seen by the user. The mix
attributes affect the graphics functions within each segment.
GpiDrawSegment
GpiDrawSegment accepts as input any segment name greater than zero.
GpiDrawSegment can draw individual segments both inside and outside the
segment chain. Any segment that is called from the GpiDrawSegment-named
segment also is drawn.
GpiDrawFrom
You can draw a smaller portion of the entire segment chain (but a larger
portion than a single segment) using GpiDrawFrom. GpiDrawFrom, as input, a
presentation space handle and two nonzero segment names, the first of which
must be part of the segment chain. GpiDrawFrom then draws the segments,
starting with the first and ending with the last, including all chained and
called segments.
ΓòÉΓòÉΓòÉ 7.1.8. Attribute Modes ΓòÉΓòÉΓòÉ
You can change primitive-attribute settings at any time. The new values you
specify replace the existing values. For example, if the current foreground
color is green and you change it to red, red replaces green as the foreground
color attribute.
When you set primitive attributes within a retained or nonretained segment, you
can save the existing attribute values on a last-in-first-out (LIFO) stack,
from where they can later be retrieved and made current again. You do this by
selecting either of the two attribute modes:
AM_PRESERVE mode-Also known as push-and-set mode
AM_NOPRESERVE mode-Also known as set mode.
In AM_NOPRESERVE mode, which is the default setting, existing attribute values
are replaced by any new attribute values that you supply. In AM_PRESERVE mode,
the existing attribute values are stored on a LIFO stack, and then the new
values that you specify take effect. AM_PRESERVE mode also causes the current
position to be saved if the position was specified using
GpiSetCurrentPosition. If you use GpiMove to set the current position, the
position is not saved, regardless of the attribute mode.
To select a current attribute mode, use GpiSetAttrMode. The current attribute
mode affects subsequent attribute-setting requests in the presentation space.
Attribute modes are not applicable to micro presentation spaces, because
graphics segments can be created only in normal presentation spaces.
To retrieve an attribute value from the LIFO stack, use GpiPop, which pulls
back the attribute that was stored most recently on the stack. You can
retrieve more than one attribute value by supplying a number as an input
parameter of this function. For example, if you specify 4, GpiPop retrieves
the four attributes that were most recently stored on the stack. If each of
the values retrieved applies the same type of attribute to the same primitive
(for example, if all four are line-type settings), the last one to be
retrieved (and, therefore, the first one on the stack) becomes the current
setting.
If you save attribute values from any segment called from another segment, and
do not retrieve the values using GpiPop, the values are restored automatically
when the end of the segment is reached. If you save attribute values from any
segment that is not called from another segment and do not explicitly restore
those values using GpiPop, they are lost at the end of the segment.
The AM_PRESERVE mode is useful when you do not want attributes in calling
segments to be overwritten by attributes specified in the called segments.
This overwriting happens because a calling segment and the segments it calls
are logically one object. Attribute changes within a called segment remain
current upon return to the calling segment. If you set some attribute values
at the start of a called segment, and the current attribute mode is
AM_PRESERVE, the attribute values of the calling segment are stored on the
LIFO stack. At the end of the called segment, the values on the stack are
retrieved automatically so that the calling segment continues with its own
attribute values.
ΓòÉΓòÉΓòÉ 7.1.9. Reusing the Presentation Space ΓòÉΓòÉΓòÉ
A normal presentation space with segments retained in the segment store can be
costly in terms of storage. Therefore, delete any presentation space that you
no longer need, using GpiDestroyPS. If, for example, your application is using
a series of presentation spaces, each with a different format, the creation and
deletion activity also can be costly. The PM provides the following functions
that let you reuse or redefine an existing presentation space so you can create
a presentation space once and use it any number of times.
GpiSavePS
GpiRestorePS
GpiResetPS
GpiSetPS
GpiSavePS
GpiSavePS saves presentation space information (such as current primitive
attributes and the current position) on a dedicated LIFO stack. The
presentation space itself is unchanged; that is, it still exists, has the same
presentation space handle, and the presentation page dimensions and format are
the same.
Output from GpiSavePS is a number that identifies the saved information on the
LIFO stack. An output of 3, for example, tells you that this is the third lot
of presentation space data on the stack.
GpiRestorePS
GpiRestorePS retrieves the saved information from the LIFO stack and reapplies
it to the presentation space. Input to this function can be either the
identifier returned to you from GpiSavePS or a relative value. A relative
value of -1, for example, retrieves the information most recently stored on
the stack. You do not have to restore the information that was most recently
saved. However, any data that you skip over is discarded.
A LIFO Stack with Four Items
GpiResetPS
When a presentation space is first created, it is in a neutral state. Current
attributes are set to their initial default values. The current position is
(0,0). The segment store contains no segments, and there are no
application-defined resources, such as logical color tables.
You can return an existing presentation space to this state using GpiResetPS.
GpiResetPS has three levels of reset activity, each more powerful than the
last. These are:
1. GRES_ATTRS, which is equivalent to the processing done by
GpiCloseSegment.
2. GRES_SEGMENTS, which is equivalent to creating a new presentation space,
but without deleting any logical resources. All retained segments are
deleted from the segment store.
3. GRES_ALL, which is equivalent to creating a new presentation space.
GpiResetPS does not alter the size or format of the presentation page.
GpiSetPS
GpiSetPS redefines the size and format of the presentation page. The
processing performed when you call GpiSetPS is similar to that performed by
GpiCreatePS, except that the presentation space already exists. The
presentation space is returned to a neutral state (which is the equivalent of
requesting GRES_ALL using GpiResetPS), and the presentation page is redefined.
For example, you can change a presentation page defined in 0.01mm units to one
defined in pels. Essentially, this lets you work with a new presentation space
without having to delete one and create another.
You also can use GpiSetPS to change the current mapping mode of a presentation
space. To do this, use the PS_NORESET flag, which is the equivalent of
requesting GRES_SEGMENTS using GpiResetPS. This feature is particularly useful
if you are designing an application that deals with page layout and drafting,
or if you want the screen size to correspond to the page size for the printed
output.
ΓòÉΓòÉΓòÉ 7.1.10. Nonretained Graphic Segments ΓòÉΓòÉΓòÉ
It is valid segment construction to create a segment bracket while the drawing
mode is DM_DRAW. The GPI functions contained within the bracket are drawn
immediately rather than being retained for future use. This type of segment is
called a nonretained segment.
Because the usual reason for constructing segments is to take advantage of
retained graphics, nonretained segments might appear as a contradiction in
terms at first. However, there are four particular advantages in their use:
If ATTR_FASTCHAIN is set to OFF, the GpiOpenSegment implicitly resets all
attributes to their defaults.
The GpiOpenSegment and GpiCloseSegment initialize and reset the viewing
transform matrix, just as they do for retained segments.
Nonretained segments can be recorded in a metafile, just as a retained
segment can.
A graphic in a nonretained segment, with a unique name, can be converted
easily to a retained graphic for future use.
ΓòÉΓòÉΓòÉ 7.2. Using Segment Creating and Drawing Functions ΓòÉΓòÉΓòÉ
You can use retained-drawing and segment functions to:
Create a chained or called segment
Draw the picture associated with one or more segments
ΓòÉΓòÉΓòÉ 7.2.1. Creating a Chained Segment ΓòÉΓòÉΓòÉ
To create a chained segment, you must:
1. Set the drawing mode to DM_RETAIN.
2. Check to see if the chained attribute is one of the initial segment
attributes using GpiQueryInitialSegmentAttrs.
3. Set the chained attribute, if necessary, with GpiSetInitialSegmentAttrs.
4. Open the segment using GpiOpenSegment.
5. Perform the necessary drawing operations.
6. Close the segment using GpiCloseSegment.
The following figure is an example of a segment containing a box primitive and
calling another segment using GpiCallSegmentMatrix.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure FncSEGS01;
Var
Ptl : POINTL;
Hps : HPS;
IdSegment : LONG;
IdNonChained : LONG;
CONST matlfTransform : MATRIXL = (fxM11:MAKEFIXED(2,0),fxM12:MAKEFIXED(0,0),
lM13:0,fxM21:MAKEFIXED(0,0),
fxM22:MAKEFIXED(1,0),lM23:0,lM31:0,lM32:0,
lM33:1);
Begin
IdSegment := 1;
IdNonChained := 2;
(************************************************************************)
(* Turns chaining on. Adds the new segment to the segment chain. *)
(* Segment idNonChained is called, whether chained or not. *)
(************************************************************************)
If (ATTR_OFF = GpiQueryInitialSegmentAttrs(hps, ATTR_CHAINED)
GpiSetInitialSegmentAttrs(hps, ATTR_CHAINED, ATTR_ON);
GpiOpenSegment(hps, idSegment);
ptl.x := 150; ptl.y := 150;
GpiMove(hps, ptl);
ptl.x := 225; ptl.y := 225;
GpiBox(hps, DRO_FILL, ptl, 0, 0);
GpiCallSegmentMatrix(hps, idNonChained, 9, matlfTransform,
TRANSFORM_REPLACE);
GpiCloseSegment(hps);
End; (* fncSEGS01 *)
ΓòÉΓòÉΓòÉ 7.2.2. Creating a Called Segment ΓòÉΓòÉΓòÉ
To create a called segment, you must:
1. Set the drawing mode to DM_RETAIN.
2. Check to see whether the chained attribute is one of the initial segment
attributes using GpiQueryInitialSegmentAttrs.
3. Set the chained attribute, if necessary, with GpiSetInitialSegmentAttrs.
4. Open the segment using GpiOpenSegment.
5. Perform the necessary drawing operations.
6. Close the segment using GpiCloseSegment.
The following figure shows an example of how to draw a box in a called
segment.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure FncSEGS02;
Var
Ptl : POINTL;
Hps : HPS;
IdNonChained : LONG;
Begin
IdNonChained := 2;
GpiSetDrawingMode(hps, DM_RETAIN);
(* Creates a non-chained segment. *)
If (ATTR_ON = GpiQueryInitialSegmentAttrs(hps, ATTR_CHAINED)) Then
GpiSetInitialSegmentAttrs(hps, ATTR_CHAINED, ATTR_OFF);
GpiOpenSegment(hps, idNonChained);
ptl.x := 100;
ptl.y := 100;
GpiMove(hps, ptl);
ptl.x := 200;
ptl.y := 200;
GpiLine(hps, ptl);
GpiCloseSegment(hps);
End; (* fncSEGS02 *)
ΓòÉΓòÉΓòÉ 7.2.3. Drawing a Segment Chain ΓòÉΓòÉΓòÉ
The following figure shows an example of how to draw a segment chain using
GpiDrawChain.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure FncSEGS03(VOID);
Var
Hps : HPS;
Begin
If (DM_DRAW <> GpiQueryDrawingMode(hps)) Then
GpiSetDrawingMode(hps, DM_DRAW);
GpiDrawChain(hps);
End; (* fncSEGS03 *)
ΓòÉΓòÉΓòÉ 8. Character String Primitives ΓòÉΓòÉΓòÉ
Character string primitives are printed or displayed text limited to a length
of 256 characters by the PM.
The following topics are related to information in this chapter:
Presentation spaces and device contexts
Color and mix attributes
Fonts
Coordinate spaces and transformations
ΓòÉΓòÉΓòÉ 8.1. About Character String Primitives ΓòÉΓòÉΓòÉ
A PM application must make certain choices about fonts in preparation for text
display or printing. Often these choices are driven by selections from a user.
After the selections are made, as discussed in Fonts, the application can make
additional decisions about the appearance of the individual characters within
the font by setting attributes in the CHARBUNDLE data structure. CHARBUNDLE is
the lowest of three levels of data structures that define the appearance of
displayed or printed text. The other two, FONTMETRICS and FATTRS, are described
in Fonts.
A font family-for instance, Helvetica** or Courier-is a collection of fonts.
Fonts within the same family share certain attributes such as stroke width and
serif characteristics. Stroke width refers to the width of lines used to draw
characters and symbols from a font. A serif is a short crossline drawn at the
ends of the main strokes that form a character or symbol.
Individual fonts within a family differ from each other in the following ways:
Height
Line weight
Appearance
Height refers to the point size of a font. A common example of line weight is
boldface. A common example of appearance is italic.
The most important factor that affects the CHARBUNDLE attributes is whether
the current font is an image or an outline font. The following figure shows an
example of the difference.
Image and Outline Fonts
Outline fonts are composed of characters drawn with straight and curved lines.
Image fonts, also called bit map fonts, are composed of pels arranged in
certain shapes.
ΓòÉΓòÉΓòÉ 8.1.1. Attributes of Character String Primitives ΓòÉΓòÉΓòÉ
Attributes of the character string primitives contained in CHARBUNDLE are as
follows:
Character set
Character mode
Character cell
Character angle
Character shear
Character direction
Character text alignment
Character extra
Character break extra
Foreground color
Background color
Foreground mix
Background mix
When an application creates a presentation space, the character string
attributes are set to the default values shown in the following table.
Character String Attribute Default Values
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéAttribute ΓöéDefault Value ΓöéFunction that Redefines Attribute Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéSet ΓöéLCID_DEFAULT ΓöéGpiSetCharSet Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéMode ΓöéCM_MODE1 ΓöéGpiSetCharMode Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCell ΓöéOutline font - Defined ΓöéGpiSetCharBox Γöé
Γöé Γöéby device Γöé Γöé
Γöé ΓöéImage font - Defined by Γöé Γöé
Γöé Γöéfont Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéAngle Γöé(1,0) ΓöéGpiSetCharAngle Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéShear Γöé(0,1) ΓöéGpiSetCharShear Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéDirection ΓöéLeft to right ΓöéGpiSetCharDirection Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéText ΓöéLeft ΓöéGpiSetTextAlignment Γöé
Γöéalignment Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéExtra Γöé0 ΓöéGpiSetCharExtra Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBreak extra Γöé0 ΓöéGpiSetCharBreakExtra Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéForeground ΓöéBlack ΓöéGpiSetAttrs(CBB_COLOR) Γöé
Γöécolor Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBackground ΓöéClear ΓöéGpiSetAttrs(CBB_BACK_COLOR) Γöé
Γöécolor Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéForeground ΓöéOverpaint ΓöéGpiSetAttrs(CBB_MIX_MODE) Γöé
Γöémix Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBackground ΓöéLeave alone ΓöéGpiSetAttrs(CBB_BACK_MIX_MODE) Γöé
Γöémix Γöé Γöé Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Current character attributes take effect when you send graphics characters to
an output device. They have no effect at the time you define a logical font.
Character Set
Character set defines the local identifier, lcid, of the current font. The
font lcid is set using GpiSetCharSet. GpiCreateLogFont associates the font
with an lcid.
The value of the current lcid is determined using GpiQueryCharSet.
Character Mode
Every presentation space has a current character mode, which determines the
extent to which a font can be affected by the attributes defined in
CHARBUNDLE. The mode affects compatibility issues that are invisible to both
the user and the programmer. The following table describes the character modes
and their influences on the current font.
An application selects a character mode using GpiSetCharMode. When a mode is
selected, it applies to any font (including the system font) used while the
mode is current. The character mode takes effect when you draw character
strings; it has no effect at the time you define a logical font.
Character Mode Effects on Character Attributes
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéCharacter ΓöéIf Image Font... ΓöéIf Outline Font... Γöé
ΓöéMode Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCM_MODE1 ΓöéIgnores all current ΓöéAffected by all Γöé
Γöé Γöécharacter attributes, exceptΓöécurrent character Γöé
Γöé Γöécharacter direction. Γöéattributes. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCM_MODE2 ΓöéUses the character shear, ΓöéAffected by all Γöé
Γöé Γöébox, angle, and direction Γöécurrent character Γöé
Γöé Γöéattributes to position the Γöéattributes. Γöé
Γöé Γöécharacter cell, but the Γöé Γöé
Γöé Γöécharacters themselves are Γöé Γöé
Γöé Γöénot sheared, rotated, Γöé Γöé
Γöé Γöéscaled, or reversed. Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCM_MODE3 ΓöéRaises an error if you try ΓöéAffected by all Γöé
Γöé Γöéto draw a character string. Γöécurrent character Γöé
Γöé ΓöéNote: Any font used when Γöéattributes. Γöé
Γöé Γöéthe current character mode Γöé Γöé
Γöé Γöéis CM_MODE3 must be an Γöé Γöé
Γöé Γöéoutline font. Γöé Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
The default character mode (CM_DEFAULT) is identical to CM_MODE1.
Character Cell
A character cell is an imaginary rectangular boundary that defines the
horizontal and vertical space occupied by a single character from an outline
character set.
The PM calculates character cell width and height from the point size. The
width value for the character cell is the nominal width of the lowercase
characters in the character set. In a monospace font, the width of all
character cells is identical. In a proportional font, the width of the
character cells depends on the character.
In an image font, the height of the character cell is the number of pels in
the font. In an outline font, the height of the character cell is the point
size of the font.
The characters in a character string are positioned one character per cell.
The spacing between adjacent characters in a string is affected by the
character cell attribute, except for image characters in CM_MODE1.
Cell width determines the spacing of consecutive characters along the
baseline, as illustrated in the following figure.
Character Cell Measurements
Current cell size is specified using GpiSetCharBox. As input, this function
accepts the desired height and width of the character cell in world
coordinates. These values are related to certain dimensions in the FONTMETRICS
structure that controls font attributes. Heights or widths of 0 are valid
input and cause the outline character to be drawn as a point or straight line.
Heights or widths of negative values cause certain special effects, for
example, reversed lettering.
The character cell value affects both the size and position of characters
drawn from an outline font, regardless of the current character mode. Each
character is scaled up or down to fit the cell size, as shown in the following
figure.
Effect of the Character Cell on an Outline Font
The character cell value is ignored if the current font is an image font and
the current character mode is CM_MODE1, as shown in the following figure.
Note: It is essential to code the character cell correctly, even if you
anticipate using image fonts. In case of a font match failure, an outline font
can be substituted for a image font.
Effect of the Character Cell on an Image Font in CM_MODE1
Although the character cell has been both increased and decreased, the
character string is unaltered.
The character cell value controls the positioning of image-font characters
when the current character mode is CM_MODE2; but it cannot cause the
characters to be scaled to fit the cell. This effect is shown in the following
figure.
Effect of the Character Cell on an Image Font in CM_MODE2
If you increase the character cell size for an image font in CM_MODE2, the
characters are more widely spaced, but their size is not changed. If you
decrease character cell size, the space between the characters is reduced, and
because the characters themselves cannot be scaled, they can overlap.
Default Character Cell
The default character-cell size is a device-dependent value. You do not need
to know this value unless you want to switch back to the initial default value
after having specified another value. It is recommended that you save initial
default values using GpiSavePS.
The default character cell, like other default attributes, can be set using
GpiSetDefAttrs(CBB_BOX). If necessary, you can query the current default value
using GpiQueryDefAttrs.
Coding a Character Cell
The dimensions that an application passes to GpiSetCharBox and that
GpiQueryCharBox returns are fixed-point values. A fixed value is a 32-bit
value whose high-order 16 bits contain the integral part of the floating-point
number and whose low-order 16 bits contain the fractional part. The fractional
part is the numerator of a fraction whose denominator is fixed at 65536. The
MAKEFIXED macro provides a method for producing fixed values. If, for example,
one of the character cell dimensions were 7.635 world units, an application
could obtain the corresponding fixed value by using the MAKEFIXED macro,
passing 7 as the first argument and 41615 as the second.
The purpose of the character cell is to assist other font metrics to define
text lines. For example, if you planned to have an average text line of 60
characters, dividing your output width by 60 would provide your character cell
width.
DevQueryCaps can be used to provide information about suitable character cell
values. DevQueryCaps returns two sets of values that can influence the
character cell:
Default cell values
- CAPS_GRAPHICS_CHAR_WIDTH
- CAPS_GRAPHICS_CHAR_HEIGHT.
Device resolution
- CAPS_HORIZONTAL_FONT_RES
- CAPS_VERTICAL_FONT_RES.
The default cell values return the size of the default character cell in pels.
Convert the device resolution into character cell values by multiplying it by
the desired point size, then dividing by 72 (72.2818).
Character Angle
The character angle is defined by the x-axis and a vector drawn through the
origin to a specified point in a Cartesian coordinate system. Neither (0,0)
nor the specified point need have any relation to the current position. The
operating system then aligns the baseline with this vector.
An application can retrieve the point that defines the character angle vector
using GpiQueryCharAngle. An application can set the character angle using
GpiSetCharAngle. This function accepts as input the x- and y-coordinates of a
point that defines the new vector. When you specify an angle, it becomes the
current setting. To reset the character angle vector to its default value
(parallel to the x-axis), call GpiSetCharAngle with both x and y equal to 0.
The effects of the current character angle vary depending on the current
character mode and the current font type. When the current font is an outline
font, the current character angle determines the angle of both the whole
string and the individual characters in the string, regardless of the current
character mode. The baseline of each character cell is drawn parallel to the
new baseline, as shown in the following figure.
Effect of the Character Angle on an Outline Font
The character string is drawn parallel to the vector drawn from the origin to
(10,7). The baseline of each of the character cells also is drawn parallel to
this vector.
The character angle value is ignored if the current font is an image font and
the current character mode is CM_MODE1, as shown in the following figure.
Effect of the Character Angle on an Image Font in CM_MODE1
The angle of the character string is unaltered by GpiSetCharAngle.
When the current font is an image font and the current character mode is
CM_MODE2, the current character angle determines the angle of the whole string
but does not affect the individual characters in the string. The character
reference point, which is the point at which the character baseline intersects
the left edge of the character cell, is placed on a line parallel to the new
baseline. The baseline of each character cell remains parallel to the x-axis,
as shown in the following figure.
Effect of the Character Angle on an Image Font in CM_MODE2
The character string is drawn parallel to the vector from (0,0) to (10,7).
Each of the characters in the string in the previous figure is drawn with the
vertical sides of its character cell parallel to the y-axis, and with the
horizontal sides of its character box parallel to the x-axis.
Character Shear
Character shear is the angle defined by the x-axis and a vector drawn through
the origin to a specified point in a Cartesian coordinate system. Neither
(0,0) nor the specified point need have any relation to the current position.
The operating system then aligns the vertical sides of the character cell. If
the font is an outline font, the operating system also aligns the vertical
strokes of the characters with the vector, regardless of the current character
mode, as shown in the following figure.
An application can retrieve the point that defines the character shear vector
using GpiQueryCharShear. An application can set the character shear using
GpiSetCharShear, which accepts as input the x- and y-coordinates of a point
that defines the new vector in a POINTL structure.
The shear of a character is the angle formed by the vertical lines of the
character cell, and it can affect both the positioning and shape of characters
in the character string. By default, the vertical lines of a character cell
are parallel to the y-axis of the presentation page. As input to
GpiSetCharShear supply the coordinates of the end point of a vector drawn from
the origin (0,0). The effects of the current character shear value vary,
depending on the current character mode and font type.
Effect of Character Shear on an Outline Font
The character cell is drawn with its vertical lines parallel to the vector
from the origin to (5,6). The character is sheared to the same degree.
The character-shear value is ignored if the current font is an image font and
the current character mode is CM_MODE1, as shown in the following figure.
Effect of Character Shear on an Image Font in CM_MODE1
The character string is unaffected by the character-shear value.
The character-shear value affects the positioning of the characters from an
image font in CM_MODE2 only if character direction is CHDIRN_TOPBOTTOM or
CHDIRN_BOTTOMTOP. That is, characters drawn vertically do not appear in a
vertical line for nonzero shear angle from the vertical. The characters
themselves cannot be sheared, as shown in the following figure.
Effect of Character Shear on an Image Font in CM_MODE2
The character cell is sheared, and it controls the positioning of the
characters; the characters themselves are unchanged.
If the x- and y-coordinate values you specify in GpiSetCharShear are both
positive and negative, the characters slant from lower left to upper right. If
you supply one negative and one positive value, the characters slant from
upper left to lower right, as illustrated in the following figure.
Effect of X- and Y-Values on Character Shear
Character shear, like other attributes, has a default value that can be
changed using GpiSetDefAttrs (CBB_SHEAR). To reset the character shear to its
default effect of drawing the vertical lines of the character cell parallel to
the y-axis, supply a coordinate value of (0,1) on GpiSetCharShear.
Character Direction
Character direction is the direction in which the characters in a string are
drawn in relation to the baseline. By default, the characters are drawn from
left to right. An application can change the direction using
GpiSetCharDirection. GpiSetCharDirection accepts as input one of the four
values illustrated in the following figure. The value CHDIRN_DEFAULT is
identical to CHDIRN_LEFTRIGHT.
ΓöîΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÉ ΓöîΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÉ
Γöé A Γöé B Γöé C Γöé Γöé C Γöé B Γöé A Γöé
ΓööΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÿ
start end end start
CHDIRN_LEFTRIGHT CHDIRN_RIGHTLEFT
start end
ΓöîΓöÇΓöÇΓöÇΓöÉ ΓöîΓöÇΓöÇΓöÇΓöÉ
Γöé A Γöé Γöé C Γöé
Γö£ΓöÇΓöÇΓöÇΓöñ Γö£ΓöÇΓöÇΓöÇΓöñ
Γöé B Γöé Γöé B Γöé
Γö£ΓöÇΓöÇΓöÇΓöñ Γö£ΓöÇΓöÇΓöÇΓöñ
Γöé C Γöé Γöé A Γöé
ΓööΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇΓöÇΓöÇΓöÿ
end start
CHDIRN_TOPBOTTOM CHDIRN_BOTTOMTOP
An application can determine the current character direction using
GpiQueryCharDirection.
Character Text Alignment
Character text alignment is the attribute that describes how the character
strings are drawn with respect to the boundary of the output, either the
current position or the starting position of the string, if a
GpiCharString...At function draws the string. The alignment is set using
GpiSetTextAlignment, which accepts as input a long value for horizontal and
vertical alignment.
The acceptable values for GpiSetTextAlignment depend on the direction of the
current coordinate system, as follows:
Value Corresponds to the direction of...
Left The lowest x-coordinate value
Right The highest x-coordinate value
Top The highest y-coordinate value
Bottom The lowest y-coordinate value
Internally, the PM determines a reference point within a character string that
is to be positioned over the starting point specified for the string.
If an application draws the string with either GpiCharString or
GpiCharStringPos, the starting point specified for the string is the current
position. If the application draws the string with either GpiCharStringAt or
GpiCharStringPosAt, the starting point specified for the string is accepted as
input by the function.
Horizontal Alignment of a Character String
When a horizontal character string does not fill the width of the output area,
it can be positioned in one of the three ways shown in the following figure.
All of these options can be set directly with the lHorizontal option of
GpiSetTextAlignment.
Horizontal Positioning of Text Strings
Text justification requires an application to perform both queries and
coordinate calculations. The following flags are used to specify types of
horizontal alignment:
Horizontal Alignment Values
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéIdentifier ΓöéAlignment Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéTA_LEFT ΓöéOn the left edge of the leftmost Γöé
Γöé Γöécharacter in the string Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéTA_RIGHT ΓöéOn the right edge of the rightmost Γöé
Γöé Γöécharacter in the string Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéTA_CENTER ΓöéOn the arithmetic mean of the Γöé
Γöé Γöéleftmost and rightmost characters inΓöé
Γöé Γöéthe string Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
There are two sets of default values for the lHorizontal option. They are
provided for compatibility and map into the horizontal alignment values
described above.
GpiQueryGraphicsField, GpiQueryPageViewport, and GpiQueryViewingLimits all
provide methods of determining the width of the output area so your
application can specify coordinates properly for the current position.
Vertical Alignment of a Character String
When a character string is to be displayed vertically, it can be positioned in
one of the four ways illustrated in the following figure. The vertical options
all can be set directly using the lVertical option of GpiSetTextAlignment.
Vertical Positioning of Text Strings
The following flags are used to specify types of vertical alignment:
Vertical Alignment Values
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéIdentifier ΓöéAlignment Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéTA_TOP ΓöéOn the top edge of the topmost Γöé
Γöé Γöécharacter in the string Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéTA_HALF ΓöéOn the arithmetic mean of the Γöé
Γöé Γöétopmost and bottommost characters inΓöé
Γöé Γöéthe string Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéTA_BASE ΓöéOn the baseline of the bottommost Γöé
Γöé Γöécharacter in the string Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéTA_BOTTOM ΓöéOn the bottom edge of the bottommostΓöé
Γöé Γöécharacter in the string Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
There are two sets of default values for the lVertical option. They are
provided for compatibility and map into the vertical alignment values
described above.
Character Extra and Break Extra
Certain output devices permit you to specify extra space between character
cells by using the character extra attribute. Sometimes the space between
words can also be expanded by increasing the size of the break character,
usually defined as the space character, by using the break extra attribute. If
this adjustment to either attribute is permitted, the result will be in
addition to the sizing effects caused by the following parameters:
Font kerning
Font proportional spacing
Width vectors
The break values you can specify create different effects, as follows:
Break Values and Their Effects
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéValue ΓöéEffect Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéPositive ΓöéForces characters apart. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé0 ΓöéResumes the default spacing created by Γöé
Γöé Γöéother parameters. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéNegative ΓöéForces characters together, even Γöé
Γöé Γöéoverlapped characters. Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
These effects are illustrated in the following figure.
The Cumulative Effect of Break Values
The above are fixed integer values specified in world coordinates. Both the
character extra and break extra attributes have initial default values of 0,
which can be changed using GpiSetDefAttrs (CBB_EXTRA) and (CBB_BREAK_EXTRA).
These values can be changed using GpiSetCharExtra or GpiSetCharBreakExtra
respectively, and the values can be queried using GpiQueryCharExtra and
GpiQueryCharBreakExtra.
Character Color and Mix
The color attribute defines the color used to draw a primitive or an object.
The mix attribute determines how the color of a primitive or an object is
combined with the color of the drawing surface or any other objects on the
surface.
The character-string color defines the color used to draw the output from any
of the draw-character-string functions. When a presentation space is created,
the character-string color default is black. Character strings are one of the
primitives that have both a foreground and a background color, as shown in the
following figure.
For image characters, colors are determined by setting pels. For outline
characters, the foreground consists of arcs and lines that define the
character; the background color appears between the foreground lines. The
character can be solid or filled, in which cases the background color does not
appear between the foreground lines.
Character string primitives have a color attribute for both the actual
character and its character cell, which surrounds the character. The
character-cell color is the background color.
The foreground mix attribute controls the combination of character-string
color and drawing-surface color, while the background mix attribute controls
the combination of the character-cell color and the drawing-surface color, as
illustrated in the following figure.
Character String Primitives
When a presentation space is created, the character string mix attribute
default is FM_OVERPAINT. The overpaint mix attribute specifies that the
character-string color is not to be modified by the color of the drawing
surface. If the character string mix attribute is changed, the
character-string color is mixed with colors that are already on the drawing
surface.
The character string background color default is CLR_BACKGROUND, usually
defined by the application as the same color as the drawing surface. The
character string background mix attribute default is BM_LEAVEALONE. The
leave-alone background mix attribute specifies that the character string
background color not be drawn. The cell that surrounds the character string
appears only if the background character-string color and mix attributes are
changed.
Use GpiSetAttrs to specify a new color or mix attribute. As input, this
function accepts the following:
Type of primitive, for example, PRIM_CHAR
List of attributes to be changed
List of attributes to be set to their default values
Values for the attributes to be changed
GpiSetAttrs also is useful to specify color and mix attributes for a specific
data structure -for example, CHARBUNDLE. GpiSetAttrs provides some protection
against invalid colors.
To determine the current character-string color and mix attributes, call
GpiQueryAttrs, which accepts as input the primitive type and the attributes in
question. GpiQueryAttrs returns an array of values for the queried attributes.
To reset the default character-string color and mix attributes, as with all
attributes specified in CHARBUNDLE, call GpiSetDefAttrs, which accepts as
input the type of primitive, attributes to be changed, and values that will
become the new default values. Changing default values is especially important
when working with segments. Changing the default values during a series of
drawing functions is not recommended.
The character color and mix attributes also can be specified using the
following functions:
GpiSetColor
GpiSetMix
GpiSetBackColor
GpiSetBackMix
If the character color, character background color, mix, or background mix
attributes are specified individually, the following queries can return a
value inconsistent with the current character attributes:
GpiQueryColor
GpiQueryMix
GpiQueryBackColor
GpiQueryBackMix
ΓòÉΓòÉΓòÉ 8.2. Using Character String Primitives ΓòÉΓòÉΓòÉ
You can use the character string primitive functions to perform the following
tasks:
Draw a string of characters using the selected font.
Modify the string by using one or more of the following operations:
Scaling
Shearing
Rotating
Transforming
Changing the angle of the baseline
Aligning text
ΓòÉΓòÉΓòÉ 8.2.1. Drawing Text ΓòÉΓòÉΓòÉ
The following figure shows how to select a Helvetica outline font, set the size
of the character box, change the foreground color to red, set the character
angle, and move the cursor to a specified location. Then, GpiCharString is used
to write a string of characters with the specified size, color, angle, and
location.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure FNCFONT09;
Var
CONST ptl : POINTL = (x:100, y:50);
CONST grad : GRADIENTL = (x:4, y:1);
Ptl : POINTL;
Grad : GRADIENTL;
Sizfx : SIZEF;
Fat : FATTRS;
Cbnd : CHARBUNDLE;
Afm : Array[0..79] of FONTMETRICS;
Hps : HPS;
Hdc : HDC;
CHelvFonts, i : LONG;
CFonts : LONG;
Lcid : LONG;
DevRes : Array[0..1] of LONG; (* Horizontal, vertical font resolutions *)
Begin
CFonts := 0;
Lcid := 1;
cHelvFonts := GpiQueryFonts(hps, QF_PUBLIC, 'Helv',
cFonts, sizeof(FONTMETRICS), nil);
GpiQueryFonts(hps, QF_PUBLIC, 'Helv', cHelvFonts,
sizeof(FONTMETRICS), afm);
(* Find an outline Helvetica font. *)
i :=0;
While (NOT (afm[i].fsDefn AND FM_DEFN_OUTLINE)) AND i < cHelvFonts Do
Inc(i);
fat.usRecordLength := sizeof(FATTRS);
fat.fsSelection := 0;
fat.lMatch := afm[i].lMatch;
StringCopy(fat.szFacename, afm[i].szFacename);
fat.idRegistry := 0;
fat.usCodePage := 0;
fat.lMaxBaselineExt := 0;
fat.lAveCharWidth := 0;
fat.fsType := 0;
fat.fsFontUse := FATTR_FONTUSE_OUTLINE;
GpiCreateLogFont(hps, (PSTR8) nil, lcid, fat);
GpiSetCharSet(hps, lcid);
DevQueryCaps(hdc, CAPS_HORIZONTAL_FONT_RES, 2, devRes);
sizfx.cx := MAKEFIXED((afm[i].sNominalPointSize * devRes[0])/ 720, 0);
sizfx.cy := MAKEFIXED((afm[i].sNominalPointSize * devRes[1])/ 720, 0);
GpiSetCharBox(hps, sizfx);
cbnd.lColor := CLR_RED;
GpiSetAttrs(hps, PRIM_CHAR, CBB_COLOR, NULLHANDLE, cbnd);
GpiSetCharAngle(hps, grad);
GpiMove(hps, ptl);
GpiCharString(hps, 11, 'Vector Text');
End; (* fncFONT09 *)
Certain parameters in the above example are explained in Fonts.
ΓòÉΓòÉΓòÉ 8.2.2. Formatting Text ΓòÉΓòÉΓòÉ
Graphics text, like all other graphics objects, has to be positioned correctly
in the output area, which usually consists of one of the following:
Entire client area of a PM window
Part of a PM window
Addressable area of a printer
Unlike other graphics objects, however, text is governed by well-established
readability and usability rules. These rules apply generally to text output,
whatever its method of production. Following are some recommendations:
Lines of text from fonts with large point sizes must be more widely
spaced for maximum readability.
The longer the line of text, the greater the space between lines must be
to ensure that the lines do not appear to merge.
Very small text must be split into multiple columns rather than continued
across the page.
Some of these considerations are taken care of by the font designer. The PM
enables you to control both the horizontal and vertical positioning of text.
ΓòÉΓòÉΓòÉ 8.2.3. Positioning Text in World Coordinates ΓòÉΓòÉΓòÉ
When considering text alignment, take the versatility of the coordinate systems
into account. The following definitions depend on the current coordinate
system:
World Coordinate Values
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéValue ΓöéCorresponds to the direction of... Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéLeft ΓöéThe lowest x-coordinate value Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéRight ΓöéThe highest x-coordinate value Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéTop ΓöéThe highest y-coordinate value Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBottom ΓöéThe lowest y-coordinate value Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
To position a character string horizontally, you must know the width of the
output area and the length of the character string. The PM provides three
different functions for determining the width of the output:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéFunction Name ΓöéDescription Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéGpiQueryGraphicsField ΓöéReturns the bottom-left and Γöé
Γöé Γöétop-right corners of the Γöé
Γöé Γöégraphics field in presentationΓöé
Γöé Γöépage units. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéGpiQueryViewingLimits ΓöéReturns the viewing limit. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéGpiQueryPageViewport ΓöéReturns the page viewport in Γöé
Γöé Γöédevice units. Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
GpiConvert changes coordinates into world coordinates. To calculate the width
of the output area, subtract its left from its right. For example, if the left
is 30, and right is 600, the width of the output area is 570 world coordinates.
The PM provides three different functions for determining the length of the
character string primitive:
GpiQueryTextBox
GpiQueryCharStringPos
GpiQueryCharStringPosAt
GpiQueryTextBox returns the relative coordinates of a parallelogram that
surrounds the character string. By subtracting the x-coordinate of
TXTBOX_BOTTOMRIGHT from the x-coordinate of TXTBOX_BOTTOMLEFT, an application
can determine the length of the string.
GpiQueryCharStringPos returns an array of points, in which the world
coordinate position of each character in the string is recorded. The last
value in the array becomes the new current position if the string is drawn
using GpiCharStringPos. By subtracting this position from the current position
(obtained using GpiQueryCurrentPosition), the length of the string can be
determined.
GpiQueryCharStringPosAt also returns an array of points, in which the world
coordinate position of each character in the string is recorded. The last
value of the array becomes the new current position if the string is drawn
using GpiCharStringPosAt. This function accepts a specified starting position
for the character string. By specifying a starting position of (0,0) for
example, an application can determine the length of the string without
subtraction.
The current position actually is not updated by either GpiQueryCharStringPos
or GpiQueryCharStringPosAt.
When a character string does not fill the width of the output area, it can be
positioned in one of the four ways illustrated in the following figure.
Horizontal Positioning of Text Strings
To left-align the text, set the x-coordinate of the current position to the
left of the output area before drawing the character string.
GpiSetCurrentPosition must be used to set the current position if your
application draws the string using either GpiCharString or GpiCharStringPos.
Both GpiCharStringAt and GpiCharStringPosAt accept a starting position as
input.
To right-align the text, subtract the length of the character string from the
width of the output area, then add the difference to the x-coordinate of the
current position before drawing the character string. If the output area is
570 world coordinates wide, for example, and the character string is 436 world
coordinates long, add 134 to the x-coordinate of the current position before
drawing the text.
To center the text, subtract the length of the character string from the width
of the output area, then divide the difference by 2 before adding it to the
x-coordinate of the current position. If the difference is 134, for example,
you add 67 to the x-coordinate of the current position.
To justify the text, so that the text string fills the width of the output
area, distribute the surplus space throughout the character string. For
example, you could add the extra space to the break characters only, or you
could share it equally among all characters in the string. Text justification
requires the individual positioning each character in the string using either
of the following calls:
GpiCharStringPos-draws at the current position and permits you to
position every character after the first.
GpiCharStringPosAt-permits you to position every character, including the
first.
Both functions enable you to specify a different character increment for each
character in the string. Distance is measured from the character reference
point of one character to the character reference point of the next character.
The values you specify apply only to the character string supplied at input;
they do not become current attribute values.
If you are formatting a block of text, the string might be wider than the
output area, or longer than 256 characters. In either case, your application
must separate the string into smaller groups of characters so that it fits
either criteria. A good starting point is to determine the number of
characters planned for each line. Dividing the output width by the character
cell width can provide a first estimate as to where to separate a character
string. An application can use this estimate to work through the string
looking for spaces. Each time you find a space, compare the length of the
string (up to the space) with the width of the output area. When the string is
longer than the output area, work back to the previous space and display or
print that part of the string. You can format the entire block of text for the
output area in this way.
When you are formatting a block instead of a single line of text, an
application must specify the vertical placement of each line. If you are using
an image font, you have the assurance that each character is the same height.
However, you do not have that assurance with an outline font, nor that the
text block is written in the same font. Therefore, when calculating the
separation of lines, avoid using complex combinations of font metrics values.
Instead, it is recommended that you multiply the desired point size, or
em-height metric, of the text by 1.2.
ΓòÉΓòÉΓòÉ 9. Clipping and Boundary Determination ΓòÉΓòÉΓòÉ
Both clipping and boundary determination are graphics operations concerned with
limiting the amount of graphics information passed between different coordinate
spaces. The following topics are related to the information in this chapter:
Presentation spaces and device contexts
Coordinate spaces and transformations
Regions
Paths
ΓòÉΓòÉΓòÉ 9.1. About Clipping ΓòÉΓòÉΓòÉ
Clipping enables the PM to discard parts of a picture that lie outside a
specified clipping boundary. The parts of the picture enclosed by the boundary
are said to be inside the clipping area. A clipping area might be a single
rectangle or a complex shape, depending on the method used to define it.
Note: In this chapter, the word area does not refer to an area primitive; it
describes the shape or shapes used for clipping graphics output.
If an application attempts to draw outside of a clipping area, the operating
system ensures that the output does not appear on the drawing surface of the
output device. For example, if an application defined a triangular clipping
area before drawing text output, all text outside of the triangle would be
discarded, even though an entire page of text was defined. The following figure
illustrates the result.
Triangular Clip Path
Clipping boundaries are defined by the application. The PM performs some
clipping automatically when, for example, your application's graphic output is
clipped to fit a client window area or the device's output area for a hardcopy
device.
ΓòÉΓòÉΓòÉ 9.1.1. Types of Clipping Areas ΓòÉΓòÉΓòÉ
The PM programming interface assembles the application's graphics output in a
process that can use up to five coordinate spaces, known collectively as the
viewing pipeline. Clipping can occur at each stage in the viewing pipeline.
Objects in world coordinate, model, page, or device space can be clipped. When
an application defines clipping areas in several coordinate spaces, the final
result is similar to combining all the areas into a single clipping area. This
single area is defined by the intersection of the areas in each coordinate
space.
Clipping in different coordinate spaces, however, is a means of conceptualizing
the process to aid in its understanding. Clipping, like transformations,
actually happens in one operation, with all the different types of clipping
being performed on all primitives in the device space at once.
The following table describes the different types of clipping areas associated
with the different coordinate spaces.
Clipping Areas and Coordinate Space Summary
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéClipping Area ΓöéCoordinate SpaceΓöéDescription Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéClip path ΓöéWorld space ΓöéAlways inclusive/inclusive Γöé
Γöé Γöé Γöé Γöé
Γöé Γöé ΓöéClipping area can have Γöé
Γöé Γöé Γöécurved edges Γöé
Γöé Γöé Γöé Γöé
Γöé Γöé ΓöéClipping area can be Γöé
Γöé Γöé Γöérotated. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéViewing limit ΓöéModel space ΓöéAlways a rectangular Γöé
Γöé Γöé Γöéclipping boundary Γöé
Γöé Γöé Γöé Γöé
Γöé Γöé ΓöéAlways inclusive/inclusive Γöé
Γöé Γöé Γöé Γöé
Γöé Γöé ΓöéRotating clipping area Γöé
Γöé Γöé Γöéresults in larger rectangle.Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéGraphics field ΓöéPage space ΓöéAlways a rectangular Γöé
Γöé Γöé Γöéclipping boundary Γöé
Γöé Γöé Γöé Γöé
Γöé Γöé ΓöéAlways inclusive/inclusive Γöé
Γöé Γöé Γöé Γöé
Γöé Γöé ΓöéRotating clipping area Γöé
Γöé Γöé Γöéimpossible. Cannot specify aΓöé
Γöé Γöé Γöédevice transform with Γöé
Γöé Γöé Γöérotation. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéClip region ΓöéDevice space ΓöéCan be a single rectangle orΓöé
Γöé Γöé Γöémultiple rectangles that Γöé
Γöé Γöé Γöéoverlap or remain separate Γöé
Γöé Γöé Γöé Γöé
Γöé Γöé ΓöéAlways inclusive/exclusive Γöé
Γöé Γöé Γöé Γöé
Γöé Γöé ΓöéRotating the clipping area Γöé
Γöé Γöé Γöéis impossible. Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Note: Inclusive/inclusive means that the operating system includes the bottom
and leftmost edges of the rectangle in the clipping area as well as the top and
rightmost edges. Inclusive/exclusive means that the operating system includes
the bottom and leftmost edges but excludes the top and rightmost edges.
The following figure illustrates the differences between inclusive-inclusive
and inclusive-exclusive clipping.
Inclusive/Inclusive and Inclusive/Exclusive Clipping
The Clip Path
The clip path defines the clipping boundary in world coordinate space. Paths
are graphic objects that serve many purposes, only one of which is to be used
as a clipping mechanism. Paths are described in Paths. The recommended
functional sequence for creating a clip path is as follows:
Function Effect
GpiBeginPath Begins the path definition.
Line and arc GPIs Gives the path shape.
GpiEndPath Ends the path definition.
GpiModifyPath An optional step explained below.
GpiSetClipPath Converts the path to a clip path.
Before converting to a clip path, the path can be modified using
GpiModifyPath. If modified, the path is converted to a geometric (wide) line
using the current geometric width, line join, and line end attributes. The
shape defined by the geometric line then is used for the clip path. The clip
path can be a simple unmodified path.
GpiSetClipPath accepts two different path identifiers as input:
1SCP_RESET (default)
0SCP_AND
The default path identifier, SCP_RESET, resets the clip path to infinity,
which displays the picture without clipping. If this value is selected, the
current clip path definition is discarded instead of stored.
A path identifier of SCP_AND specifies that the clip path be redefined as the
mathematical intersection of the stored clip path and the current path
definition.
The only method of specifying the clip path to the current path, after
GpiSetClipPath has been called, is to call GpiSetClipPath twice: the first
call with a path identifier of SCP_RESET, and the second with a path
identifier of SCP_AND.
The following figure shows a triangle shape that has been defined within a
path bracket and selected as the current clip path. The filled box shape is
drawn subsequently, and, therefore, is clipped to the triangle.
The Clipping Path
The broken lines show the area of the box that has been clipped.
Clip paths are most useful when you want to use an irregular clipping
boundary, or when the clipping boundary itself is an integral part of the
picture. Both are true of the clip path in the previous figure.
GpiSetClipPath also accepts one of two construction options as input:
SCP_ALTERNATE (default)
SCP_WINDING (must be selected if path has been modified).
Any drawing that is clipped to the current clip path must follow the alternate
or the winding rules as to whether that portion of a picture is included in
the clip area. The alternate and winding modes are described for paths in
Paths in Alternate Mode and Paths in Winding Mode. Any point on the boundary
of the path is considered within the path and is not clipped.
To end clipping to the current clip path, call GpiSetClipPath with an
identifier of 0. This function deselects the current clip path by setting it
to infinity. In some circumstances, the current clip path is deselected
automatically.
A path definition can be stored in a graphics segment, and if that segment is
retained, the path can be re-created as required when the segment is redrawn.
Clip path definitions can be stored in a retained segment also and redrawn
when required. In draw-and-retain mode (DM_DRAWANDRETAIN), the initial path or
clip path is created as the segment is constructed. If the current drawing
mode is retain (DM_RETAIN), however, the path or clip path is not created
until the first time the segment is drawn.
The Viewing Window
The viewing window defines a rectangular clipping boundary in model space. It
is defined with GpiSetViewingLimits. As input to this function, you supply the
model coordinates of the lower-left and upper-right corners of the viewing
window.
When a drawing primitive, such as a line, intersects a viewing window, any
part of that line outside of the viewing window is clipped. Any point on the
boundary of the viewing window is considered within the window, and is not
clipped. By default, the viewing window performs no clipping. In this case,
all graphics output in the model space is transformed. The following figure
shows how the viewing window outlines a part of model space. The Viewing
Window
This example shows how a presentation page is constructed. The viewing window
outlines the tail of the aircraft, which is scaled and translated when drawn
in presentation-page space. The rest of the aircraft is clipped away during
the drawing process.
The Graphics Field
The graphics field defines a rectangular clipping area in the presentation
page. It is defined in GpiSetGraphicsField.
Note: If this clipping area is to be used, it must be defined before any
drawing begins.
Specify the size of the graphics field in presentation page coordinates as
input to GpiSetGraphicsField.
Only the graphic output contained in this clipping boundary is visible when
the presentation page is transformed to device space. By default, the graphics
field is infinitely large and therefore performs no clipping. If you do
specify a graphics field, however, any point on its boundary is considered
within the graphics field and is not clipped. When a drawing primitive, such
as a line, intersects a graphic field, any part of the line outside the
graphics field is clipped. The following figure shows how a graphics field
could be defined for a presentation page.
The Graphics Field
The broken line shows an arbitrary graphics field that is smaller than the
presentation page. The aircraft tail, a separate object in the presentation
page, is outside the graphics field and is clipped away as it is drawn.
The picture assembled in the graphics field is the picture that is displayed
or printed. If you do not define a graphics field, the picture assembled in
the presentation page is the picture that is displayed or printed. The
presentation page is not a clipping boundary, and graphics in page coordinate
space that are outside the presentation page boundary, therefore, might be
visible.
The Current Clipping Region
Clipping regions are clipping areas defined (as regions) by one or more
rectangles in device coordinates. Because they are defined in device
coordinates, clipping regions do not suffer from the rounding errors
associated with other types of clipping. Therefore, they are ideally suited to
redraw part of the picture without boundary discontinuities, for example,
after a BitBlt operation has been used to scroll a picture in a window.
Regions are not available automatically for clipping. To select an existing
region as the current clipping region, use GpiSetClipRegion. By default, the
clipping region is the same size as the drawing surface. Only one clipping
region can exist in the presentation space at one time. To end clipping to the
current clipping region, deselect it by calling GpiSetClipRegion with a NULL
region handle. A deselected clipping region retains the effects of any changes
made to it while it was a clipping region and can be reselected.
You do not have to deselect the current clipping region before selecting
another. Each selected clipping region automatically replaces the one before
it. If a clipping region exists when you call GpiSetClipRegion, the existing
clipping region reverts to being a normal region, and its handle is returned.
Clip paths and clip regions share a common implementation, but clip regions
are faster to create than clip paths. This might be a performance factor when
designing your application for repairing the screen or redrawing the picture
in a client window after the display has changed. The following figure
illustrates this use of regions.
Screen Repairing
Note: GpiSetClipRegion does not cause graphics orders to be added to the
current segment. Therefore, variations in the clip region must not be used to
construct the picture. The clip region is intended to define a fixed clipping
area for the entire picture.
When you select the current clipping region, none of the region-related GPI
functions can be used for that region. The PM provides a series of functions
that mirror the region-related functions. However, all of these functions work
in world coordinates rather than device coordinates, and, therefore, are
subject to current transformations.
Any of the following functions can be used to get information about or to
redefine the current clipping region.
GpiQueryClipBox
You can request the dimensions of the smallest rectangle that encloses
all current clipping boundaries by calling GpiQueryClipBox. The following
boundaries are included in this calculation:
- Current clip path
- Current viewing window
- Current graphics field
- Current clipping region
- Visible region of the window
GpiIntersectClipRectangle
GpiIntersectClipRectangle redefines the current clipping region to the
intersection of the existing clipping region with the rectangle whose
dimensions you supply in this function. This has the same effect as
CRGN_AND in GpiCombineRegion.
GpiExcludeClipRectangle
You also can redefine the current clipping region using
GpiExcludeClipRectangle. This function excludes a specified rectangle
from the current region and has the same effect as CRGN_DIFF on
GpiCombineRegion.
GpiOffsetClipRegion
The current clipping region can be moved from its current position using
GpiOffsetClipRegion.
GpiPtVisible
GpiPtVisible tells you whether a point, expressed in world coordinates,
is visible on the screen. A point is visible if it is within all current
clipping boundaries and is in the visible region of the window.
GpiRectVisible
GpiRectVisible tells you whether any part or the whole of a rectangle,
whose dimensions you supply in world coordinates, is visible on the
screen. The rectangle is visible if it intersects both the visible region
of the window and all current clipping boundaries.
ΓòÉΓòÉΓòÉ 9.1.2. How Clipping Is Implemented ΓòÉΓòÉΓòÉ
The rules by which the PM implements clipping are as follows:
Any primitive completely outside the clipping boundary is discarded.
When a primitive crosses a clipping boundary, any part outside the
boundary is discarded.
Any primitive completely within the clipping boundary is retained.
When a primitive crosses a clipping boundary, any part within the
boundary is retained.
When the clipping boundary is a clip path, viewing window, or graphics
field, any point that falls on the boundary is considered within the
clipping boundary.
When the clipping boundary is a clipping region, any point on the top or
right boundaries of a rectangle is discarded; and any point on the bottom
or left boundaries of a rectangle, that is not on the right or top
boundaries also, is included in the region.
ΓòÉΓòÉΓòÉ 9.1.3. Redrawing Nondynamic Graphics ΓòÉΓòÉΓòÉ
An interactive graphics application usually permits changes to the displayed
picture. For example, an object can be moved or sized, and you can plan for
this by defining particular segments as dynamic. Dynamic segments are described
in Editing Retained Graphics and Graphics Segments.
If dynamic segments are inappropriate (when you are using nonretained graphics,
for example), you can repair the picture using a clipping region, for example,
a picture of a hexagon and a circle as shown in the following figure.
A Hexagon and Circle
If the circle is moved to another screen position by the use of an input
device, you must repair its original location and redraw it in its new
location. The following figure shows this sequence of events. Following are the
steps required to do this:
1. Determine the size of the smallest rectangle that contains the circle in
its current position using a process called boundary determination.
2. Switch off the DCTL_DISPLAY flag of GpiSetDrawControl, apply a
translation transformation to the circle, and redraw it in its new
position.
3. Determine the size of the smallest rectangle that contains the circle in
its new position using boundary determination.
4. Use GpiConvert to convert the model-space coordinates provided by the
boundary-determination process to device-space coordinates.
5. Use the device-space coordinates of the two rectangles to create a
region, and select it as the current clipping region.
6. Switch on the DCTL_DISPLAY flag of GpiSetDrawControl.
7. Call GpiErase (or set the erase-before-draw control) to erase the current
contents of the clipping region.
8. Redraw the picture with the circle in its new position. Any part of the
picture within the clipping region is redrawn. That part of the hexagon
that is outside the clipping region is unaffected by the change and does
not have to be redrawn.
Defining a Clipping Region
The broken circle shows the position to which the circle is to be moved. The
two bounding rectangles overlap, and produce a complex region. If the circle
were to be moved much farther away from its start position, the region would
comprise two disjoint rectangles.
ΓòÉΓòÉΓòÉ 9.2. About Boundary Determination ΓòÉΓòÉΓòÉ
Boundary determination is an operation to compute the size of the smallest
rectangle that encloses a graphics output in model space. One use of boundary
determination is to enable you to repair only the affected parts of the screen,
when a graphics object is moved, for example, or when a graphics object is
changed some other way. Dynamic segments are not included in
boundary-determination operations.
Boundary determination can be performed on both retained and nonretained
graphics. In both instances, you request boundary data to be calculated by
setting the boundary data flag (DCTL_BOUNDARY) in GpiSetDrawControl. If you do
not set this flag (for example, if you do not want to collect boundary data
unnecessarily) and later find that you need boundary data for a particular
object, you can do the following:
1. Switch on the boundary-data flag, and switch off the display flag, using
GpiSetDrawControl.
2. Redraw the object in its current location. Boundary data is collected,
but the object is unaltered.
If you are drawing retained graphics, each drawing request (GpiDrawSegment,
GpiDrawFrom, and GpiDrawChain) causes the boundary data resulting from the
drawing to be made available. The application must request this data
explicitly by calling GpiQueryDeviceBitmapFormats after each drawing request
for which it wants to examine boundary data. Boundary data is returned to the
application in model space coordinates. The boundary data is reset before each
retained drawing operation, so there is no risk of accumulating data from
separate operations.
If you are drawing nonretained graphics, boundary data is accumulated for each
GpiPutData and for each individual primitive drawing function. The application
can request the accumulated boundary data at any time by calling
GpiQueryBoundaryData. Data continues to accumulate unless you call the
GpiResetBoundaryData; it is not reset automatically.
The boundary data returned to you is in the form of four model-space
coordinates, which are the lowest (x,y) positions and the highest (x,y)
positions of the bounding rectangle in model space as illustrated in the
following figure.
The Bounding Rectangle
ΓòÉΓòÉΓòÉ 9.3. Using Clipping and Boundary Determination ΓòÉΓòÉΓòÉ
This section explains how to use clipping functions to:
Create a clip path or clip region
Exclude a rectangular area from a clip region
Add a rectangular area to a clip region
Set the clip region to the intersection of the current clip region and a
specified rectangle
Determine the size of the smallest rectangle that will surround the
intersection of the current clipping areas completely
ΓòÉΓòÉΓòÉ 9.3.1. Creating a Clip Path ΓòÉΓòÉΓòÉ
A drawing and computer-aided-design (CAD) application may require the ability
to clip to curved edges. If so, it must use a clip path to define a curved
clipping area in world coordinates. Because clip paths (especially ones that
clip to curved edges) require considerable memory and processing time, use them
only when necessary. Whenever possible, your application must use a clip
region, graphics field, or viewing limit.
To create a clip path, do the following:
1. Determine the clip path's shape and size (in world coordinates).
2. Use GpiBeginPath to begin defining the path.
3. Create the path.
4. Close the path definition with GpiEndPath.
5. Create a clip path from the path definition with GpiSetClipPath.
The following figure uses this procedure to create an elliptical clip path.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure FncCLIP01;
Var
Hps : HPS; (* Presentation-space handle *)
Ptl1 : POINTL; (* Point structure *)
FxArc : FIXED; (* Multiplier for arc *)
IdPath : LONG; (* Path identifier *)
Begin
.
. (* Load ptl1 with coordinates of clip path. *)
.
idPath := 1;
GpiBeginPath(hps, idPath); (* Begins path *)
GpiMove(hps, ptl1); (* Sets current position *)
fxArc := MAKEFIXED(50, 0); (* Sets arc multiplier *)
GpiFullArc(hps, DRO_OUTLINE, fxArc); (* Defines ellipse *)
GpiEndPath(hps); (* Ends path *)
GpiSetClipPath(hps, idPath, SCP_ALTERNATE OR SCP_AND);
End; (* fncCLIP01 *)
ΓòÉΓòÉΓòÉ 9.3.2. Creating a Clip Region ΓòÉΓòÉΓòÉ
To create a clip region, first determine its size and shape (in device
coordinates). Load the coordinates for the rectangles that define the clip
region into an array of RECTL structures. Then create the region and set it to
a clip region with GpiCreateRegion and GpiSetClipRegion respectively.
The following figure shows how to create a clip region.
Uses
Os2Def,Os2PmApi;
Procedure fncCLIP02;
Var
Hps : HPS;
Hrgn : HRGN;
Arcl : Array[0..2] : RECTL;
Begin
.
. (* Load array of RECTL structures with coordinates. *)
.
GpiSetClipRegion(hps, hrgn, nil);
End; (* fncCLIP02 *)
ΓòÉΓòÉΓòÉ 9.3.3. Excluding a Rectangular Area from a Clip Region ΓòÉΓòÉΓòÉ
Some applications let you prepare output in multiple stages. For example, a
word processing application might permit you to prepare your text first and
then add bit maps that enhance and support the text. These applications can use
GpiExcludeClipRectangle to exclude an area from a clip region, preventing the
user from deleting output that already exists.
To exclude an area from a clip region, first determine the dimensions (in
device coordinates) of the smallest rectangle that completely surrounds the
area to exclude from the clip region. Then call GpiExcludeClipRectangle,
including as input the dimensions of the area to exclude. The following figure
illustrates these steps.
Uses
Os2Def,Os2PmApi;
Procedure fncCLIP03;
Var
Hps : HPS;
Rcl : RECTL;
Begin
.
. (* Set rectangle coordinates here. *)
.
GpiExcludeClipRectangle(hps, rcl);
End; (* fncCLIP03 *)
ΓòÉΓòÉΓòÉ 9.3.4. Adding a Rectangular Area to a Clip Region ΓòÉΓòÉΓòÉ
Some applications might need to increase the size of a clip region. For
example, a user might request that a desktop publishing application extend a
column of text on a page.
To add a rectangular area to a clip region, follow these steps:
1. Determine the dimensions (in device coordinates) of the rectangular area
to add to the current clip region.
2. Release the current clip region using GpiSetClipRegion. GpiCombineRegion
cannot combine regions if either of the regions is a clip region.
3. Call GpiCreateRegion and pass it the dimensions of the rectangle that you
defined in Step 1. This creates a second region that you can combine with
the first.
4. Call GpiCreateRegion again and create a third region that will be the
final destination region.
5. Call GpiCombineRegion to create a region that combines the original
region and the region you created in Step 2. It is not essential to
create a third region because GpiCombineRegion can use one of the 2
source regions being combined for a target region.
6. Call GpiSetClipRegion and pass it the handle returned by
GpiCombineRegion.
The following figure illustrates these steps.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure FncCLIP04;
Var
Hps : HPS;
Rcl1, Rcl2, Rcl3 : RECTL;
Hrgn1, Hrgn2, Hrgn3 : HRGN;
Begin
hrgn1 := GpiCreateRegion(hps, sizeof(rcl1) div sizeof(RECTL), rcl1);
GpiSetClipRegion(hps, hrgn1, nil); (* Creates first clipping region *)
.
. (* Compute coordinates of second region here. *)
.
GpiSetClipRegion(hps, NULLHANDLE, nil); (* Releases first clipping region*)
hrgn2 := GpiCreateRegion(hps, sizeof(rcl2) div Sizeof(RECTL), rcl2);
hrgn3 := GpiCreateRegion(hps, sizeof(rcl3) div Sizeof(RECTL), rcl3);
GpiCombineRegion(hps, hrgn3, hrgn1, hrgn2, CRGN_OR);
GpiSetClipRegion(hps, hrgn3, nil); (* Creates second clipping region*)
End; (* fncCLIP04 *)
ΓòÉΓòÉΓòÉ 9.3.5. Setting the Clip Region to a Region Intersection ΓòÉΓòÉΓòÉ
Your application might require the ability to set the clip region to the
intersection of the current clip region and another region. Do this with
GpiIntersectClipRectangle, as shown in the following:
Uses
Os2Def,Os2PmApi;
Procedure fncCLIP05;
Var
Rcl : RECTL;
Hps : HPS;
Begin
.
. (* Load rcl with coordinates of rectangle to intersect. *)
.
GpiIntersectClipRectangle(hps, rcl);
End; (* fncCLIP05 *)
ΓòÉΓòÉΓòÉ 9.3.6. Determining the Size of a Clipping Area ΓòÉΓòÉΓòÉ
If an application is able to specify a clip path in world space, a viewing
limit in model space, a graphics field in page space, and a clip region in
device space, it might be necessary for your application to determine the size
of the clipping area formed by the intersection of the four. GpiQueryClipBox
returns the dimensions (in world coordinates) of the smallest rectangle that
completely surrounds the intersection of all the defined clipping areas,
including the visible region.
The following figure shows how to use GpiQueryClipBox to fill a RECTL structure
with the desired coordinates.
Uses
Os2Def,Os2PmApi;
Procedure fncCLIP06;
Var
Hps : HPS;
RclClip : RECTL;
Begin
GpiQueryClipBox(hps, rclClip);
End; (* fncCLIP06 *)
ΓòÉΓòÉΓòÉ 10. Color and Mix Attributes ΓòÉΓòÉΓòÉ
This chapter describes color and mix attributes and their use in OS/2
applications. The following topics are related to information in this chapter:
Presentation spaces and device contexts
Line and arc primitives
Marker primitives
Area primitives
Character string primitives
Bit maps and images primitives
ΓòÉΓòÉΓòÉ 10.1. About Color and Mix Attributes ΓòÉΓòÉΓòÉ
Color and mix are two attributes of graphics primitives. They can be specified
by an application in a number of ways, and are specified in the ...BUNDLE data
structures associated with the five graphics primitives and in bit maps. Bit
maps and some of the primitives have both foreground and background color
attributes. For example, a character string primitive has a foreground color
attribute that specifies the color of the character and a background color
attribute that specifies the color of the character cell surrounding the
character.
The mix attribute controls how each primitive is combined with the existing
drawing. Among other things, it affects the color that results when primitives
of different colors overlap. Primitives with foreground and background color
attributes also have foreground and background mix attributes.
ΓòÉΓòÉΓòÉ 10.2. Color Implementation ΓòÉΓòÉΓòÉ
Understanding how colors are implemented can assist in understanding how the
color and mix attributes work.
The pel is the smallest element of the display screen that can be addressed.
For monochrome displays, pels are either turned off or turned on. For color
displays, each pel contains a red, green, and blue section, each of which is
called a phosphor.
The display has color guns of red, blue, and green light that illuminate the
phosphors in a single pel. By switching these color guns on and off in
different combinations, eight standard colors can be produced. By varying the
intensities of the color guns, additional colors can be produced. The following
table shows the eight standard colors that can be generated from the three
color guns.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéPel appears... ΓöéRed ΓöéGreen ΓöéBlue Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéRed ΓöéON ΓöéOFF ΓöéOFF Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéGreen ΓöéOFF ΓöéON ΓöéOFF Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBlue ΓöéOFF ΓöéOFF ΓöéON Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéWhite ΓöéON ΓöéON ΓöéON Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBlack ΓöéOFF ΓöéOFF ΓöéOFF Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCyan ΓöéOFF ΓöéON ΓöéON Γöé
Γöé(Turquoise) Γöé Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéPink ΓöéON ΓöéOFF ΓöéON Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéYellow ΓöéON ΓöéON ΓöéOFF Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Each pel is described internally by a number of bits of storage. In a
monochrome display, only one bit per pel is required, and that bit is either on
or off. In an eight-color system, three bits per pel are necessary. Each of
those three bits records the on or off setting of one color gun.
To be able to control the intensity of a color and obtain more than eight
colors, more than three bits per pel are needed. For example, six bits per pel
provide 32 different combinations.
The wider the range of available colors, the more bits per pel required for
each color. This storage issue is resolved by keeping a wide choice of colors
but restricting the number of colors available at any given time. Applications
define the colors that they want to use in a logical color table. Selecting a
color defined in the logical color table produces the nearest available color
in the hardware palette.
ΓòÉΓòÉΓòÉ 10.2.1. RGB Color Encoding ΓòÉΓòÉΓòÉ
The red, green, and blue (RGB) components of a color are stored in either an
RGB or RGB2 data structure, or as a long integer (32-bit) value. The color
fields in the RGB2 structure and in the long integer follow the same rules.
If stored as a long integer, the RGB value has the first 8 bits reserved for a
flag value and the remaining 24 bits reserved for color intensity. The flag
byte must be set to 0. Each of the last three bytes specifies a color
intensity, in the range 0 through 255, for a single primary color.
If a byte contains 0, the corresponding primary color is not present. As the
value in the byte increases, the intensity of the primary color increases. For
example, if the byte contains 128, the primary color is pale; if the byte
contains 255, the primary color is as intense as the device permits.
The RGB value is determined by the following equation:
RGB Value = (R * 65536) + (G * 256) + B
Where:
R is the red intensity
G is the green intensity
B is the blue intensity
If all three bytes are set to 0, the resulting color is black; if they all are
set to 255, the resulting color is white. The RGB value associated with each of
the standard eight colors is in the following table.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéColor ΓöéRGB value Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBlack Γöé0x00000000 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéRed Γöé0x00FF0000 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéGreen Γöé0x0000FF00 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBlue Γöé0x000000FF Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéPink Γöé0x00FF00FF Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCyan Γöé0x0000FFFF Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéYellow Γöé0x00FFFF00 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéWhite Γöé0x00FFFFFF Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 10.2.2. Color Tables ΓòÉΓòÉΓòÉ
A color table is an array of RGB values. There are two kinds of color tables:
logical and physical. The logical color table is a list of colors specific to a
presentation space. An application typically uses a logical color table to
define colors specific to that application.
The physical color table specifies colors the device can generate currently.
These device colors are shared by every application on the system. Because some
display adapters cannot generate every possible device color at the same time,
the physical color table can be a subset of the full range of possible device
colors. The operating system maps the RGB values specified in the logical color
table to device colors in the physical color table.
ΓòÉΓòÉΓòÉ 10.2.3. Logical Color Table ΓòÉΓòÉΓòÉ
A logical color table contains a variable number of entries, each of which
describes a different RGB (Red, Green, Blue) combination that produces a color.
The principle of the color table is illustrated in the following figure.
Logical Color Table
This simplified example demonstrates that to produce yellow on the computer
screen, red and green are mixed in equal intensities, and no blue is used at
all. In this example, yellow is addressed in the color table by index 21.
Notice that this is not the same index number used in the default logical color
table, which indicates that this color table has been changed by the
application.
A logical color table is stored in a presentation space and is specific to that
presentation space. A logical color table enables applications to specify
colors as indexes rather than explicit RGB values.
The colors displayed are likely to vary from one output device to another so
the definitions in the color table can be fine-tuned to get the best results.
Any color can be made more or less intense by altering its definition in the
logical color table.
Default Logical Color Table
The PM provides a default logical color table, which defines the colors and the
indexes that retrieve them, as shown in the following table.
Default Logical Color Table
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéColor Index ΓöéIndex ΓöéEffect Γöé
Γöé ΓöéNumberΓöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_FALSE Γöé-5 ΓöéAll bits are set to 0. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_TRUE Γöé-4 ΓöéAll bits are set to 1. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_DEFAULT Γöé-3 ΓöéDefault value Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_WHITE Γöé-2 ΓöéWhite Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_BLACK Γöé-1 ΓöéBlack Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_BACKGROUND Γöé0 ΓöéNatural background color for the Γöé
Γöé Γöé Γöédevice Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_BLUE Γöé1 ΓöéBlue Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_RED Γöé2 ΓöéRed Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_PINK Γöé3 ΓöéPink Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_GREEN Γöé4 ΓöéGreen Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_CYAN Γöé5 ΓöéCyan Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_YELLOW Γöé6 ΓöéYellow Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_NEUTRAL Γöé7 ΓöéNeutral - The contrasting color to Γöé
Γöé Γöé ΓöéCLR_BACKGROUND Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_DARKGRAY Γöé8 ΓöéDark gray Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_DARKBLUE Γöé9 ΓöéDark blue Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_DARKRED Γöé10 ΓöéDark red Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_DARKPINK Γöé11 ΓöéDark pink Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_DARKGREEN Γöé12 ΓöéDark green Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_DARKCYAN Γöé13 ΓöéDark cyan Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_BROWN Γöé14 ΓöéBrown Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_PALEGRAY Γöé15 ΓöéPale gray Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Note: Entries after CLR_PALEGRAY have device-dependent defaults.
PM maps the color index name to the index number (shown in the second column of
the previous table), then uses that number to address the appropriate color.
Device-Independent Color Indexing
Three of the index names provide a level of device independence in choosing
colors: CLR_DEFAULT, CLR_BACKGROUND, and CLR_NEUTRAL. These indexes enable an
application to select colors according to their purpose, and thus build device
independence into your applications. The purpose of a color does not vary from
one device to another, although the actual color used to implement that purpose
might. The following table describes these indexes and the purpose of each:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéIndex ΓöéPurpose Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_BACKGROUND ΓöéThe natural background color for the Γöé
Γöé Γöédevice. This is the color of the paper Γöé
Γöé Γöéon a printer, and the window background Γöé
Γöé Γöécolor (white, by default) on a display. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_NEUTRAL ΓöéThe contrast color to CLR_BACKGROUND. Γöé
Γöé ΓöéThis is usually black on a printer, and Γöé
Γöé Γöéthe default window text color (black, byΓöé
Γöé Γöédefault) on a display. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéCLR_DEFAULT ΓöéUnless redefined, this has the same Γöé
Γöé Γöéeffect as CLR_NEUTRAL. Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
The colors produced by CLR_DEFAULT, CLR_BACKGROUND, and CLR_NEUTRAL in the
default logical color table depend on the output device. For example,
CLR_NEUTRAL could produce black on a device with a white background or white on
a device with a black background.
ΓòÉΓòÉΓòÉ 10.2.4. Defining a Logical Color Table ΓòÉΓòÉΓòÉ
To change the values in the default logical color table (that is, to load a new
logical color table), use GpiCreateLogColorTable. Using this function, an
application can do the following:
Replace part or all of the default color table.
Add color definitions to the default color table.
Reset the logical color table to its default values.
There are two methods of making changes:
To add to a table or change some of its contents, rather than replace
the table completely, supply an array of color indexes and their
associated RGB values.
To load a consecutive sequence of index values, supply only an array of
RGB values without index values.
Color Tables in Index Mode
The default logical color table is defined as an array of color indexes and
their associated RGB values. A table in this format is in index mode.
To alter a logical color table in index mode, specify either LCOLF_INDRGB or
LCOLF_CONSECRGB as the format value in GpiCreateLogColorTable. If an
application uses the color index names to address the contents of a loaded
color table in index mode, the color identified by the associated index number
is retrieved. For example, CLR_NEUTRAL produces the color addressed by index
number 7. If CLR_NEUTRAL must be blue, the application must define the color
table so that index number 7 addresses the RGB definition of the appropriate
shade of blue.
If an application uses the format LCOLF_INDRGB when calling
GpiCreateLogColorTable, the application supplies an array of index and RGB
pairs to update the table. These values do not have to be consecutive. An
application can change the contents of an existing table and add entries to
the end of the table.
If an application calls GpiCreateLogColorTable using the LCOLF_CONSECRGB
format, the application supplies an array of RGB values and a starting index.
When using this format, the RGB values must be consecutive. You cannot use a
single call to GpiCreateLogColorTable to redefine CLR_BLUE and CLR_PINK
without also specifying an RGB value for CLR_RED. As with LCOLF_INDRGB, this
format can be used to change the contents of the existing table and to add
entries to the end of the table.
When an application calls GpiSetAttrs to put a value into the color field of a
graphics primitive attribute structure, the value is an index into the logical
color table. When the operating system draws the primitive, it uses this index
to determine the RGB value specified in the logical color table by the
application. It then searches the physical color table for the color closest
to this RGB value. The operating system then draws the primitive, using the
color from the physical color table. How closely the drawn colors match the
colors in the logical color table depends on the device colors in the physical
color table.
Color Tables in RGB Mode
The color values specified with GpiSetAttrs and GpiSetColor also can be
specified directly as RGB values rather than as indexes. To enable this, the
logical color table must be switched into RGB mode by calling
GpiCreateLogColorTable, specifying a format of LCOLF_RGB. (No color array is
passed.)
If the color table is in RGB mode, it can be switched back to index mode and
reset to its original default values by specifying either LCOLF_INGRGB or
LCOLF_CONSECRGB in GpiCreateLogColorTable.
ΓòÉΓòÉΓòÉ 10.2.5. Querying the Available Colors ΓòÉΓòÉΓòÉ
Several query functions are provided for applications to get information about
the current logical and physical color tables before defining a logical color
table.
Applications use GpiQueryColorData to determine whether the default logical
color table is in effect. If it is not, the following information about the
loaded logical color table is returned:
Format of the current logical color table
Smallest and largest color indexes (if the table is in index mode)
supported in this color table. The smallest color index is always 0, and
the largest color index is never less than 15, because deleting entries
from the default logical color table is not permitted.
GpiQueryRealColors returns the RGB values of each of the distinct colors
defined in the physical color table of the current device. It also can return
the index in the current logical color table that references each of the
colors in the physical table.
To determine the available colors nearest to a specified color on a particular
device, call GpiQueryNearestColor, which accepts as input the RGB value of the
desired color. The function returns the RGB value of the nearest available
color in the physical color table of the associated device.
Applications can use GpiQueryRGBColor to determine the RGB value of a
particular color. GpiQueryRGBColor accepts as input the index to the logical
color table entry of the color in question. Output from this function is the
RGB value that the index would reference in the physical color table. If a
logical color table is loaded in RGB mode, GpiQueryRGBColor returns the same
results as GpiQueryNearestColor.
Conversely, to determine the index value that references a given RGB color (or
the closest match to that color) in the physical color table, an application
uses GpiQueryColorIndex. The application can determine which colors are in the
current logical color table by calling GpiQueryLogColorTable. To determine
which colors are in the physical color table, call GpiQueryRealColors.
ΓòÉΓòÉΓòÉ 10.2.6. Physical Color Table ΓòÉΓòÉΓòÉ
Each output device has its own physical color table, which is organized like a
logical color table. The physical color table contains the RGB color
definitions of the distinct colors that the device can produce, while a logical
color table contains the definitions of the colors as chosen by an application.
When an application draws on an output device, the PM maps the index value that
addresses the current color in the logical color table to the index that
retrieves the closest match for the current color in the physical color table.
Because this substitution occurs when the graphics are drawn, the presentation
space can be associated with a number of different device contexts without
invalidating the logical color definitions. For example, an application can
create a picture on the screen using a wide range of colors, then direct that
drawing to an eight-pen vector plotter. The drawing is reproduced without
having to be re-created. Although the picture, as drawn by the plotter, does
not have the variety of colors displayed on the screen, the substitution
process selects the nearest match for each color on the screen from the eight
available colors on the plotter.
ΓòÉΓòÉΓòÉ 10.2.7. Palette Manager ΓòÉΓòÉΓòÉ
Applications can use GpiCreatePalette to change the physical color palette by
creating a new palette. This function is used if the application has specific
color needs and must ensure that the color is part of the physical color
palette. GpiCreatePalette also enables an application to prevent dithering of
the 16 default colors by setting the flag parameter to LCOL_PURECOLOR. If the
full 256 colors in the palette are needed, the application can set the flag to
LCOL_OVERRIDE_DEFAULT_COLORS. It is recommended that the palette manager
functions be used only when really necessary because the operating system
cannot guarantee consistent colors in other windows and the ability to change
the physical palette is device dependent.
After the palette is created, an application can set or change any of the
values in the palette by calling GpiSetPaletteEntries. To delete the palette,
applications use GpiDeletePalette, passing the handle of the palette to be
deleted. (The handle is returned by GpiCreatePalette when the palette is
created.)
GpiQueryPalette enables applications to determine the palette currently
selected for a given presentation space. A palette can be used by more than one
presentation space at the same time. The operating system maintains a count of
the number of presentation spaces using a specific palette. Complete
information on the current palette can be accessed by GpiQueryPaletteInfo.
Palettes also can be shared by using a palette handle.
When coding an application, color table functions and color palette functions
must not be mixed. The application can call DevQueryCaps to determine whether
the hardware supports palettes, then call the appropriate functions.
Realizing a Color Palette
WinRealizePalette maps the colors requested by the application into the color
palette for the system. When the application's window is activated, the palette
changes are transferred, or realized, into the physical palette for the system.
When a palette is realized, there might not be enough empty palette entries to
accommodate the additional palette changes (a maximum of 256 entries). For
example, it is possible that some of the colors changed in the physical palette
are being used by another application. In this situation, a WM_REALIZEPALETTE
message is posted to all the applications running on the desktop.
On receiving the WM_REALIZEPALETTE message, applications using palette manager
functions must repaint their screens. The original application colors are
mapped to the closest matching color in the new palette. Applications that do
not use palette manager functions normally perform default processing within
their applications causing a repaint of their windows with the closest match
from the palette. If there are no changes, just additions, to the physical
palette, no message is sent.
Note: The palette manager maps a window's colors to the closest available
value in the palette when the physical palette has to be changed, but this does
not guarantee that the color will be a close match to the original color used.
As the focus changes from window to window, the physical palette changes
according to the activated window. Notification messages are sent as necessary
to other applications.
If the physical color values in the palette have to change to accommodate the
number of palette entries passed from the application when a palette is
realized, the number of altered entries in the physical palette is returned by
WinRealizePalette.
Color palette realization is available only to systems that have a minimum of
256 colors.
ΓòÉΓòÉΓòÉ 10.2.8. Color Attribute ΓòÉΓòÉΓòÉ
The PM graphic interface uses a variety of colors. These colors are referred to
as the system colors, and they are defined in the system color table, which is
separate from an application's logical color table. To find out the RGB values
of the system colors, call WinQuerySysColor.
The colors of graphic primitives are specified separately from the system
colors. Every primitive has a foreground color, and some also have a background
color.
Primitive Foreground
The foreground of a primitive is the primitive itself. For example, the
foreground of a full arc primitive is the full arc, as shown in the following
figure.
Foreground of a Primitive
The full arc primitive is drawn in a different color from the window
background.
By default, the foreground color of all primitives is the color addressed by
the index CLR_DEFAULT. In the default color table, this produces black on a
graphics display. If the application replaces the default logical color table,
CLR_DEFAULT produces the color addressed by index number 7 (CLR_NEUTRAL).
Primitive Background
The following primitives have a background:
Areas
Character strings
Images
Markers
The background of any character or marker primitive, whether the primitive is
from an image or an outline font, is the entire character or marker box. First
the background is drawn, then the foreground is drawn on top of it. Similarly,
the background of an area primitive is the entire area to be filled. The
background of an image primitive, however, is that part of the primitive in
which the pels are not set. The following figure shows the background of a
primitive.
Background of a Primitive
The background of this character-string primitive is the entire character box.
The index to the default background color is CLR_BACKGROUND, which provides a
background color appropriate for the device. On a printer, CLR_BACKGROUND is
the color of the paper. On a display screen, CLR_BACKGROUND is the default
window background color.
Changing the Foreground and Background Colors of Primitives
To change the current foreground color, use GpiSetColor. As input, the
application supplies either the index to the required color in the current
logical color table or the RGB value of the color, depending on the mode of
the table. Color indexes higher than those supplied in the default color table
must be loaded explicitly before they can be used.
It is possible to specify one of the system colors (for example,
SYSCLR_ACTIVEBORDER) as the current foreground (or background) color of a
primitive. The color appears as defined in the system color table, and the
logical color table is not used.
The specified color becomes the current color, and the foreground of any
primitive drawn subsequently is drawn in that color. The current foreground
color for a particular primitive type is set by calling GpiSetAttrs. For
example, if an application sets the current foreground color to CLR_RED by
calling GpiSetColor, and sets the current foreground color for marker
primitives to CLR_CYAN by calling GpiSetAttrs, all subsequent markers are
cyan, and all other primitives are red.
To change the current primitive background color, call GpiSetBackColor. To
ensure that this color is different from the background color of the output
area (so that the entire primitive background is visible), the current window
background color must not be the same as the current primitive background
color. Also, select an appropriate background mix attribute.
GpiQueryBackColor returns the current background color setting for a character
primitive. To learn the current foreground color setting, use GpiQueryColor.
GpiQueryAttrs can be used to determine the current foreground and background
color values for a single primitive type.
ΓòÉΓòÉΓòÉ 10.2.9. Color Output and Mix Attributes ΓòÉΓòÉΓòÉ
A mix attribute is a bitwise operation on the color indexes in a device's
logical color table. Mix attributes enable colors to be specified in relation
to other colors. When an application draws a graphics primitive, the operating
system uses a mix attribute to determine the color that appears on the output
device.
For example, instead of specifying that a line should be black and, therefore,
invisible if the background also is black, an application can use a mix
attribute of FM_XOR to specify that the line always should be drawn the inverse
of the background color.
Suppose an application has set the lColor field in the LINEBUNDLE structure to
CLR_RED and the usMixMode field in the same structure to FM_OR. The current
color of the drawing surface is CLR_GREEN. To determine the color of a line,
the operating system performs a bitwise OR operation on the indexes of these
colors, as follows:
0010 (the default index for red)
0100 (the default index for green)
------
0110 (result of bitwise OR)
In this case, the result is 6-the index for yellow. This means that even though
the application specified CLR_RED in the LINEBUNDLE structure, a yellow line
appears when the application calls any of the functions that draw a line
primitive.
ΓòÉΓòÉΓòÉ 10.2.10. Mix Attribute ΓòÉΓòÉΓòÉ
The mix attribute determines how each primitive an application draws is
combined with any existing drawing. In color applications, the mix attribute
determines the color that results when one primitive is drawn on top of
another. There are two forms of the mix attribute: foreground mix and
background mix.
The foreground mix attribute governs how the foreground of a primitive is
combined with the existing drawing, and it applies to all primitive types. The
background mix attribute governs how the background of a primitive is combined
with the existing drawing, and it is applicable only to those primitives that
have a background. Primitives that can be affected by the background mix
attribute are areas, character strings, images, and markers. The primitive
attribute data structures contain fields for both foreground and background
color and mix attributes.
There are 17 foreground mix attributes. For each mix attribute, the indexes of
the foreground and current drawing-surface colors are combined by using one of
the bitwise operators. The available foreground mix settings are listed in the
following table.
Foreground Mix Attributes
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéMix Attribute ΓöéEffect ΓöéDescription Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_DEFAULT ΓöéDefault ΓöéDefault foreground mix Γöé
Γöé Γöé Γöéattribute (overpaint). Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_OR ΓöéOR ΓöéIndex value of the final colorΓöé
Γöé Γöé Γöéis determined by a bitwise OR Γöé
Γöé Γöé Γöéoperation on the index of the Γöé
Γöé Γöé Γöéforeground color and the indexΓöé
Γöé Γöé Γöéof the color of the drawing Γöé
Γöé Γöé Γöésurface. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_OVERPAINT ΓöéOverpaint ΓöéIndex value of the final colorΓöé
Γöé Γöé Γöéis that of the foreground Γöé
Γöé Γöé Γöécolor. This is the default Γöé
Γöé Γöé Γöéforeground mix attribute. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_XOR ΓöéExclusive-OR ΓöéIndex value of the final colorΓöé
Γöé Γöé(XOR) Γöéis determined by a bitwise XORΓöé
Γöé Γöé Γöéoperation on the index of the Γöé
Γöé Γöé Γöéforeground color and the indexΓöé
Γöé Γöé Γöéof the color of the drawing Γöé
Γöé Γöé Γöésurface. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_LEAVEALONE ΓöéLeave-alone ΓöéIndex value of the final colorΓöé
Γöé Γöé(Invisible) Γöéis that of the index of the Γöé
Γöé Γöé Γöécolor of the drawing surface. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_AND ΓöéAND ΓöéIndex value of the final colorΓöé
Γöé Γöé Γöéis determined by a bitwise ANDΓöé
Γöé Γöé Γöéoperation on the index of the Γöé
Γöé Γöé Γöéforeground color and the indexΓöé
Γöé Γöé Γöéof the color of the drawing Γöé
Γöé Γöé Γöésurface. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_SUBTRACT Γöé(Inverse ΓöéIndex value of the final colorΓöé
Γöé ΓöéSource) AND Γöéis determined by inverting theΓöé
Γöé ΓöéDestination Γöéindex of the foreground color Γöé
Γöé Γöé Γöéand performing a bitwise AND Γöé
Γöé Γöé Γöéoperation on this value and Γöé
Γöé Γöé Γöéthe index of the color of the Γöé
Γöé Γöé Γöédrawing surface. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_MASKSRCNOT ΓöéSource AND ΓöéIndex value of the final colorΓöé
Γöé Γöé(Inverse Γöéis determined by inverting theΓöé
Γöé ΓöéDestination) Γöéindex value of the Γöé
Γöé Γöé Γöédrawing-surface color and Γöé
Γöé Γöé Γöéperforming a bitwise AND Γöé
Γöé Γöé Γöéoperation on this value and Γöé
Γöé Γöé Γöéthe index value of the Γöé
Γöé Γöé Γöéforeground color. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_ZERO ΓöéAll zeros ΓöéRGB value of the final color'sΓöé
Γöé Γöé Γöéis always 0x00000000. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_NOTMERGESRC ΓöéInverse (SourceΓöéIndex value of the final colorΓöé
Γöé ΓöéOR Destination)Γöéis always the inverse of the Γöé
Γöé Γöé ΓöéFM_OR result. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_NOTXORSRC ΓöéInverse (SourceΓöéIndex value of the final colorΓöé
Γöé ΓöéXOR Γöéis always the inverse of the Γöé
Γöé ΓöéDestination) ΓöéFM_XOR result. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_INVERT ΓöéInverse ΓöéIndex value of the final colorΓöé
Γöé Γöé(Destination) Γöéis always the inverse of the Γöé
Γöé Γöé Γöéindex of the color of the Γöé
Γöé Γöé Γöédrawing surface. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_MERGESRCNOT ΓöéSource OR ΓöéIndex value of the final colorΓöé
Γöé Γöé(Inverse Γöéis determined by performing a Γöé
Γöé ΓöéDestination) Γöébitwise OR operation on the Γöé
Γöé Γöé Γöéindex of the foreground color Γöé
Γöé Γöé Γöéand the inverse of the index Γöé
Γöé Γöé Γöéof the color of the drawing Γöé
Γöé Γöé Γöésurface. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_NOTCOPYSRC ΓöéInverse ΓöéIndex value of the final colorΓöé
Γöé Γöé(Source) Γöéis the inverse of the index ofΓöé
Γöé Γöé Γöéthe foreground color. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_MERGENOTSRC Γöé(Inverse ΓöéIndex value of the final colorΓöé
Γöé ΓöéSource) OR Γöéis determined by performing a Γöé
Γöé ΓöéDestination Γöébitwise AND operation on the Γöé
Γöé Γöé Γöéindex of the drawing surface'sΓöé
Γöé Γöé Γöécolor and the inverse of the Γöé
Γöé Γöé Γöéindex of the foreground color.Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_NOTMASKSRC ΓöéInverse (SourceΓöéIndex value of the final colorΓöé
Γöé ΓöéAND Γöéis the inverse of the FM_AND Γöé
Γöé ΓöéDestination) Γöéresult. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéFM_ONE ΓöéAll 1's. ΓöéRGB value of the final color Γöé
Γöé Γöé Γöéis always 0x00FFFFFF. Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
There are five background mix attributes. For each mix attribute, the index
value for the background color and the current drawing-surface color (in the
device's physical color table) are combined using one of the bitwise operators.
The RGB values are those from the physical color table. When the result of the
mix attribute's bitwise operation defines a color different from that of both
the drawing surface and the drawing attribute, the resulting index accesses an
RGB color in the physical table. The color, therefore, is unpredictable unless
the logical color table has been realized (using the palette manager).
The first five of the foreground mix attributes also are available as
background mix attributes. The background mix attributes are listed in the
following table.
Background Mix Attributes
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéMix Attribute ΓöéEffect ΓöéDescription Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBM_DEFAULT ΓöéDefault ΓöéDefault background mix Γöé
Γöé Γöé Γöéattribute (Leave-alone). Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBM_OR ΓöéOR ΓöéIndex value of the final colorΓöé
Γöé Γöé Γöéis determined by a bitwise OR Γöé
Γöé Γöé Γöéoperation on the index of the Γöé
Γöé Γöé Γöébackground color and the indexΓöé
Γöé Γöé Γöéof the color of the drawing Γöé
Γöé Γöé Γöésurface. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBM_OVERPAINT ΓöéOverpaint ΓöéIndex value of the final colorΓöé
Γöé Γöé Γöéis that of the background Γöé
Γöé Γöé Γöécolor. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBM_XOR ΓöéExclusive-OR ΓöéIndex value of the final colorΓöé
Γöé Γöé(XOR) Γöéis determined by a bitwise XORΓöé
Γöé Γöé Γöéoperation on the index of the Γöé
Γöé Γöé Γöébackground color and the indexΓöé
Γöé Γöé Γöéof the color of the drawing Γöé
Γöé Γöé Γöésurface. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéBM_LEAVEALONE ΓöéLeave-alone ΓöéIndex value of the final colorΓöé
Γöé Γöé(Invisible) Γöéis that of the drawing-surfaceΓöé
Γöé Γöé Γöécolor. Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
The most frequently used foreground mix attributes are FM_OVERPAINT, which is
the default value, FM_OR, and FM_XOR. The most frequently used background mix
attributes are BM_LEAVEALONE, which is the default value, and BM_OVERPAINT.
Overpaint Mix Attribute
When using FM_OVERPAINT, the foreground of the primitive replaces any existing
drawing in the same area of the presentation page. If the existing drawing is
yellow, for example, and the new drawing is red, the drawing is red at the
points of overlap. (This is the default foreground mix attribute.) Because one
color is replacing another and no color mixing is being performed, the effects
of the overpaint mix attribute are entirely predictable. This is shown in the
following figure.
Overpaint Foreground Mix Attribute
The circle is drawn on top of the square. At the points of overlap, the output
is the color of the circle.
When using BM_OVERPAINT, the primitive background replaces the existing
drawing. drawing, as shown in the following figure.
Overpaint Background Mix Attribute
Using BM_OVERPAINT, the background of the primitive is apparent only if it is
drawn in a different color from the output-area background. Notice that, in
this example, the foreground mix attribute is FM_OVERPAINT.
OR Mix Attribute
When using FM_OR, the foreground of the new primitive is merged with the
existing drawing at the points of overlap. This is effected by ORing the
indexes of the overlapping colors to produce a third color. The resulting color
is unpredictable if the logical color table has not been realized (using the
palette manager). The OR mix attribute is useful for making the common points
of two graphics distinct from the points belonging to one of the graphics only,
as shown in the following figure.
OR Mix Attribute
The circle is drawn on top of the square. At the points of overlap, indexes are
OR'd to produce a new index referencing a new RGB color in the physical color
table.
When using the BM_OR attribute, the background of the primitive is merged with
the existing drawing according to the same rules that apply to the FM_OR
attribute.
Exclusive-OR (XOR) Mix Attribute
The FM_XOR attribute enables objects to be drawn in such a way that they can be
removed easily by simply drawing them a second time using the FM_XOR attribute.
The FM_XOR attribute is available on display devices only and is useful for
graphics animation when an application must move an individual graphic and
completely restore the graphics that it originally overlapped. Typically, an
application would do the following:
1. Draw the graphics object using the FM_XOR attribute.
2. Calculate the object's next position.
3. Draw the object again in its current position, still using the FM_XOR
attribute. This effectively erases it from its current position without
destroying the graphics with which it overlaps.
4. Draw the object in its new position using the FM_XOR mix attribute.
For retained graphics, this sequence can be automated to some extent by
defining specific graphics segments as dynamic. Dynamic graphics always are
drawn using the FM_XOR attribute, regardless of the current mix attributes.
The effects of the FM_XOR attribute are shown in the following figure.
Exclusive-OR (XOR) Mix Attribute
The circle is drawn on top of the square. At the points of overlap, graphics
are not drawn if the two overlapping figures are an identical color.
When using the BM_XOR attribute, the background of the primitive is merged
with the existing picture according to the same rules that apply to the FM_XOR
attribute.
Leave-Alone Mix Attribute
The leave-alone mix attribute most often is used as a background mix
attribute. When using the FM_LEAVEALONE attribute, the foreground of the
primitive is not drawn. When using the BM_LEAVEALONE attribute, the background
of the primitive is not drawn, as shown in the following figure.
Leave-Alone Background Mix Attribute The leave-alone background mix attribute
is the background mix attribute that most often is used for character strings
and marker primitives. It is generally used with a foreground mix value of
FM_OVERPAINT.
Specifying Foreground and Background Mix Attributes
Specify the current foreground mix value for all primitives using GpiSetMix.
To learn the current foreground mix setting, use GpiQueryMix, which returns
the current foreground mix setting for a character string primitive.
GpiQueryAttrs can be used to determine the current foreground and background
mix values for a single primitive type.
To specify a background mix value for all primitives, use GpiSetBackMix.
GpiQueryBackMix returns the current background mix value for a
character-string primitive. To specify the current foreground and background
mix values for a single primitive type, call GpiSetAttrs.
Note: Not all devices support all of the background and foreground mix
attributes described. When a device does not support the mix attribute chosen
by an application, the default mix attribute is used; no error condition is
raised. DevQueryCaps can be used to determine whether a mix attribute is
supported on a specific device.
ΓòÉΓòÉΓòÉ 10.2.11. Color on Advanced Display Devices ΓòÉΓòÉΓòÉ
Some devices can display simultaneously a fixed number of colors (typically
156), chosen from a much larger number of colors (often more than 256000). An
application can use the palette manager functions to take advantage of the
extra capabilities of these devices. These functions enable an application to
change the colors in a device's physical color table and the displayed colors
rapidly without explicitly redrawing the screen.
An application can use the CAPS_ADDITIONAL_GRAPHICS option of DevQueryCaps to
determine whether the display device supports palette functions.
ΓòÉΓòÉΓòÉ 10.2.12. Dithering ΓòÉΓòÉΓòÉ
If an application requests a color not available in the physical color table,
the operating system can approximate the color by a process called dithering.
For example, if the physical color table does not contain a light green color
but does contain a yellow and a green, the operating system can create what
appears to be light green by mixing yellow pels and green pels. Dithering is a
variation on the way red, green, and blue color guns illuminate the phosphors
in a single pel to produce a color that is not pure red, green, or blue (for
example, yellow).
The dithering process takes advantage of the way the human eye interprets
color. If every other pel is set to one color, and all the intermediate pels to
a different color, together they produce the effect of a third color at normal
viewing distances.
The checkerboard effect is just one of the ways in which dithering can be
implemented. Dithering works only when producing a solid mass of color, such as
an area fill pattern. It does not have the desired effect on line primitives.
Dithering is especially important on monochrome devices. By combining various
combinations of black pels with white pels, the operating system can create
numerous shades of gray.
To use only the pure colors defined in the physical color table, that is, to
prevent color dithering, set LCOL_PURECOLOR in GpiCreateLogColorTable. When
LCOL_PURECOLOR is set, the nearest available color to the one selected is used.
ΓòÉΓòÉΓòÉ 10.2.13. Considerations When Using Monochrome Displays ΓòÉΓòÉΓòÉ
When a graphic primitive that is drawn in color is displayed on a monochrome
display, the operating system maps the colors that the application uses to the
colors supported by the monochrome display.
Drawing Color Graphics on Monochrome Devices
When mapping color graphics to a monochrome device (screen, printer, or bit
map), the monochrome device has a reset color and a contrast color. The reset
color is the color GpiErase clears to and is either black or white. If the
reset color is black, the contrast color is white, and if the reset color is
white, the contrast color is black.
To determine whether the reset color is to be black or white, the color
retrieved by the index CLR_BACKGROUND from the current logical color table is
examined. If a logical color table has not been loaded, CLR_BACKGROUND is
either the paper color on a printer or SYSCLR_WINDOW on a display. If a logical
color table has been loaded, CLR_BACKGROUND is the color addressed by color
index 0 on any device.
If the color retrieved by CLR_BACKGROUND is either white or black, that color
becomes the reset color. For example, if an application is drawing to a screen,
has not loaded a color table, and the system colors have not been altered, the
background color is white, because SYSCLR_WINDOW produces a white background by
default. In this instance, the contrast color is black.
If the color retrieved by CLR_BACKGROUND is neither white nor black, the color
translates to whichever of black and white it is nearest to. As a rule, dark
colors produce a black background, and pale colors produce a white background.
For example, if an application is using a loaded color table, or if the color
retrieved by SYSCLR_WINDOW has been altered (either interactively or by
WinSetSysColors), CLR_BACKGROUND could be dark gray. In this instance, the
reset color would be black, and the contrast color would be white.
When the reset color has been established, the PM applies the following rules
when mapping color graphics to a monochrome device:
Any color graphics drawn in CLR_BACKGROUND, and any graphics defined in
the actual reset color (which is either black or white), are drawn in the
reset color. Any other graphics are drawn in the contrast color.
The index CLR_WHITE produces white, and the index CLR_BLACK produces
black, regardless of whether the reset color is black or white.
If no color table is loaded and CLR_DEFAULT or CLR_NEUTRAL are used as
the foreground color, they produce the contrast color. If they are used
as the background color, they produce the reset color.
If an application calls GpiQueryNearestColor for a monochrome device, one
of the following occurs:
- If the color supplied on input is the reset color, the reset color
is returned.
- If the color supplied on input is not the reset color, the contrast
color is returned.
Drawing Color Area Fill Patterns on Monochrome Devices
An area primitive is drawn according to the current foreground and background
mix attributes and in the current area foreground and area background colors.
When an application draws a monochrome pattern on a color device, the bits of
the pattern set to 1 translate to the current area foreground color, and the 0
bits translate to the current area background color. When the application
draws a color pattern on a monochrome device, and if the current pattern is
anything other than PATSYM_DEFAULT or PATSYM_SOLID from the default pattern
set, the color closest to white is translated into 1 bits. For example, if a
pattern of diagonal lines is being drawn in which the foreground color is red
and the background color is cyan, the cyan is translated to white (1 bits)
because cyan is closer than red is to white. Red, therefore is translated to
black (0 bits). The effect of translating this color pattern to a monochrome
surface is summarized as follows:
0s Surface Surface
\ \ 10001000 RcccRccc 01110111
\ \ 01000100 cRcccRcc 10111011
\ \ 00100010 ccRcccRc 11011101
\ \ 00010001 cccRcccR 11101110
\ \ 10001000 RcccRccc 01110111
\ \ 01000100 cRcccRcc 10111011
\ \ 00100010 ccRcccRc 11011101
\ \ 00010001 cccRcccR 11101110
The original pattern of 1's and 0's is used, however, when deciding which part
of the pattern is the background and which part is the foreground. Thus, if
the background mix attribute is BM_LEAVEALONE, the following occurs:
Pattern As 1s and Color Monochrome
0s Surface Surface
\ \ 10001000 R...R... 0...0...
\ \ 01000100 .R...R.. .0...0..
\ \ 00100010 ..R...R. ..0...0.
\ \ 00010001 ...R...R ...0...0
\ \ 10001000 R...R... 0...0...
\ \ 01000100 .R...R.. .0...0..
\ \ 00100010 ..R...R. ..0...0.
\ \ 00010001 ...R...R ...0...0
The 1 bits on the monochrome surface still are interpreted as the background
of the primitive and are not drawn when the BM_LEAVEALONE attribute is
specified.
When a bit map is used as an area fill pattern, any bit drawn in the current
area background color is set to 0, and all other bits are set to 1 on a
monochrome surface. Thus, if the current area background color is blue, all
blue bits in the bit map are set to 0, and all other bits are set to 1. The 0
bits constitute the background of the primitive.
If the pattern is solid (PATSYM_DEFAULT or PATSYM_SOLID in the supplied
pattern set), the following occurs:
If color dithering is switched off, and the application is drawing a
color pattern to a color surface, the color nearest the color specified
is used.
If color dithering is switched on, and the application is drawing a color
pattern to a color surface, a combination of colors can be used to
achieve the effect of the requested color. For example, if the
application chooses pink on a surface where pink is not available, a
combination of red and white pels can be used to achieve the effect of
the color.
If color dithering is switched on, and the application is drawing a color
pattern to a monochrome surface, sufficient pels are set to suggest the
intensity of the requested color.
Dithering can be enabled and disabled using LCOL_PURECOLOR in
GpiCreateLogColorTable.
ΓòÉΓòÉΓòÉ 10.3. Using Color and Mix Attributes ΓòÉΓòÉΓòÉ
The color- and mix-attribute functions can be used to perform the following
tasks:
Create a logical color table
Determine the format and the starting and ending index values of the
current logical color table
Determine the index value for an entry in the logical color table that is
the closest match to an RGB value
Determine the RGB value associated with a particular entry in the logical
color table
Determine and set the current foreground and background colors
Determine and set the current foreground and background mix attributes
ΓòÉΓòÉΓòÉ 10.3.1. Creating a Logical Color Table ΓòÉΓòÉΓòÉ
To create a logical color table, the application creates an array of RGB values
that replace the existing logical color table, then calls
GpiCreateLogColorTable, using the LCOL_RESET and LCOLF_CONSECRGB flags. The
following figure demonstrates this process.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure fncCOLR01;
Var
Hps : HPS;
CONST AlTable : Array[0..15] of LONG = (
$FFFFFF, (* White *)
$FF88FF,
$FF8800,
$FF8888,
$FF0088,
$880088,
$008888,
$00FF88,
$00F800,
$008800,
$000088,
$0000F8,
$0800F8,
$888888,
$080808,
$000000 ); (* Black *)
Begin
GpiCreateLogColorTable(hps,
LCOL_RESET, (* Start with the default *)
LCOLF_CONSECRGB, (* Consecutive RGB values *)
0, (* Starting index in table *)
sizeof(alTable) / sizeof(LONG), (* Number of elements in table *)
alTable);
End; (* fncCOLR01 *)
ΓòÉΓòÉΓòÉ 10.3.2. Determining the Color-Table Format and Index Values ΓòÉΓòÉΓòÉ
To determine the format and the starting and ending index values of the current
logical color table, applications call GpiQueryColorData. The following figure
is an example of using GpiQueryColorData to determine whether the default
logical color table is loaded. If so, the code fragment loads a new table.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure fncCOLR02;
Var
Hps : HPS;
AClrData : Array[0..2] of LONG;
AlTable : Array[0..15] of LONG;
Begin
GpiQueryColorData(Hps, 3, aClrData);
If (aClrData[QCD_LCT_FORMAT] = LCOLF_DEFAULT)
GpiCreateLogColorTable(hps,
LCOL_RESET, (* Start with the default *)
LCOLF_CONSECRGB, (* Consecutive RGB values *)
0, (* Starting index in table *)
sizeof(alTable) / sizeof(LONG), (* Number of elements in table *)
alTable);
End; (* fncCOLR02 *)
ΓòÉΓòÉΓòÉ 10.3.3. Determining the Index Value of an RGB Value ΓòÉΓòÉΓòÉ
Applications call GpiQueryColorIndex to find the closest match in a logical
color table to an RGB value. This function finds the closest match for this RGB
value in the physical color table, then finds the color in the logical color
table closest to the color in the physical color table. The function returns
the index value of that entry in the logical color table. The followiing figure
is an example of how to determine which index value in the logical color table
matches the RGB value for pink (0x00FF00FF), then uses that index entry to set
the foreground color to pink for each of the primitive attributes.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure fncCOLR03;
Var
LIndex : LONG; (* Logical-color-table index *)
Hps : HPS;
Begin
LIndex := GpiQueryColorIndex(Hps, LCOLOPT_REALIZED, $00FF00FF);
If ((LIndex >= 0) AND (LIndex <= 15)) (* Check for valid index *)
GpiSetColor(Hps, LIndex);
End; (* fncCOLR03 *)
ΓòÉΓòÉΓòÉ 10.3.4. Setting the Primitive Color Attributes ΓòÉΓòÉΓòÉ
To set the color attributes for one type of graphics primitive, an application
uses GpiSetAttrs. To set the color attributes for each type of primitive in a
presentation space, use GpiSetColor and GpiSetBackColor. The following figure
shows how to use GpiSetAttrs to set the color attribute of line primitives to
dark gray.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure fncCOLR04;
Var
Lbnd : LINEBUNDLE; (* Line-primitive attribute structure *)
Hps : HPS;
Begin
Lbnd.lColor := CLR_DARKGRAY;
GpiSetAttrs(Hps, PRIM_LINE, LBB_COLOR, 0, Lbnd);
End; (* fncCOLR04 *)
The following figure is an example of how to use GpiSetColor to set the
foreground color attribute to dark gray in all of the primitives.
Uses
Os2Def,Os2PmApi;
Procedure fncCOLR05;
Var
Hps : HPS;
Begin
GpiSetColor(Hps, CLR_DARKGRAY);
End; (* fncCOLR05 *)
ΓòÉΓòÉΓòÉ 10.3.5. Creating a Palette ΓòÉΓòÉΓòÉ
To create a palette, an application must first call DevQueryCaps with the
CAPS_ADDITIONAL_GRAPHICS option to determine whether the device supports
palette functions. Next the application creates an array of RGB values or an
array of RGB2 structures, then calls GpiCreatePalette. Next the applications
calls GpiSelectPalette to select the palette for the presentation space and
calls WinRealizePalette to map the RGB values to device colors for subsequent
drawing. When the application is finished drawing, it calls GpiSelectPalette to
disassociate the presentation space and the palette. Then it deletes the
palette by calling GpiDeletePalette.
The following figure demonstrates these steps.
Uses
Os2Def,Os2Base,Os2PmApi;
Procedure FNCCOLR06;
Var
ClrCurrent : COLOR;
Hpal : HPAL;
Hdc : HDC;
Hps : HPS;
Hab : HAB;
Hwnd : HWND;
Aptl : Array[0..1] of POINTL;
Ptl : POINTL;
CSimulColors : LONG;
LPalSupport : LONG;
J : SHORT;
prgb2ColorData : ^RGB2;
Begin
.*
.*=== FOR BOOKMASTER ====
.*=== END BOOKMASTER ====
.*
(* Determine how many colors the device can display at once. *)
DevQueryCaps(hdc, CAPS_COLORS, 1, cSimulColors);
(* Determine If the device supports palette manager functions. *)
DevQueryCaps(hdc, CAPS_ADDITIONAL_GRAPHICS, 1, lPalSupport);
(* Allocate space for the array of RGB2 structures. *)
DosAllocMem(prgb2ColorData, cSimulColors * sizeof(RGB2), fALLOC);
(* Fill the array of RGB2 structures with as many dIfferent *)
(* shades of blue as the device will support. *)
.*
.*=== FOR BOOKMASTER ====
.*=== END BOOKMASTER ====
.*
clrCurrent := $000000FF;
For j := 0 To cSimulColors-1 Do Begin
prgb2ColorData[j].bRed := 0;
prgb2ColorData[j].bGreen := 0;
prgb2ColorData[j].bBlue := clrCurrent;
prgb2ColorData[j].fcOptions := 0;
If (clrCurrent > 0) Then Dec(clrCurrent) Else clrCurrent := $000000FF;
End;
.*
.*=== FOR BOOKMASTER ====
.*=== END BOOKMASTER ====
.*
If (lPalSupport) AND (CAPS_PALETTE_MANAGER) Then Begin
hpal := GpiCreatePalette(hab, (* Create palette *)
0,
LCOLF_CONSECRGB, (* Format of color table entries *)
cSimulColors, (* Number of entries in table *)
prgb2ColorData); (* Pointer to color table *)
End;
GpiSelectPalette(hps, hpal);
WinRealizePalette(hwnd, hps);
GpiSelectPalette(hps, NULLHANDLE); (* Restore default physical colors *)
GpiDeletePalette(hpal); (* Delete palette *)
End; (* fncCOLR06 *)