Pen Styles
The Pen Style field of the Pen_Style record (see Record Type 41 (0x29) Pen_Style earlier in this
section) contains the style number of the pen style used to render subsequent objects and paths.
The table below illustrates the various pen styles and their associated style numbers.
Style #
| Pen Styles
|
|
|
0 (0x0)
| 1: 291 (0x123),0
|
|
|
1 (0x1)
| 1: 218 (0xDA),73 (0x49)
|
|
|
2 (0x2)
| 1: 145 (0x91),73 (0x49)
|
|
|
3 (0x3)
| 1: 73 (0x49),73 (0x49)
|
|
|
4 (0x4)
| 1: 36 (0x24),36 (0x24)
|
|
|
5 (0x5)
| 1: 18 (0x12),18 (0x12)
|
|
|
6 (0x6)
| 1: 18 (0x12),55 (0x37)
|
|
|
7 (0x7)
| 3: 18 (0x12),55 (0x37),18 (0x12),55 (0x37), 18 (0x12),127 (0x7F)
|
|
|
8 (0x8)
| 1: 164 (0xA4),55 (0x37),18 (0x12),55 (0x37)
|
|
|
9 (0x9)
| 3: 145 (0x91),36 (0x24),138 (0x8A),36 (0x24), 18 (0x12),36 (0x24)
|
|
|
10 (0xA)
| 3: 91 (0x5B),55 (0x37),91 (0x5B),55 (0x37), 18 (0x12),55 (0x37)
|
|
|
11 (0xB)
| 4: 91 (0x5B),36 (0x24),91 (0x5B),36 (0x24), 18 (0x12),36 (0x24),18
(0x12),36 (0x24)
|
|
|
12 (0xC)
| 2: 182 (0xB6),73 (0x49),73 (0x49),73 (0x49)
|
|
|
13 (0xD)
| 3: 182 (0xB6),36 (0x24),55 (0x37),36 (0x24), 55 (0x37),36 (0x24)
|
|
|
14 (0xE)
| 3: 255 (0xFF),73 (0x49),255 (0xFF),73 (0x49), 73 (0x49),73 (0x49)
|
|
|
15 (0xF)
| 4: 273 (0x111),36 (0x24),273 (0x111),36 (0x24), 55 (0x37),36
(0x24),55 (0x37),36 (0x24) |
Pen/Brush Patterns
The Pen Pattern and Brush Pattern fields of the Pen_Pattern and Brush_Pattern records (see
Record Type 42 (0x29) Pen_Pattern and Record Type 53 (0x35) Brush_Pattern earlier in this
section) contain the pattern numbers of the pen and brush patterns used to render subsequent
objects and paths. The following table illustrates the pen/brush patterns and their associated
pattern numbers.
Bitmap Color Formats
Bitmap color formats define the number of bits in the bitmap data stream corresponding to a
single pixel and the manner they specify the color of the pixel. The formats illustrated below
indicate color-indexed bitmap data. The bitmap data defines an index into a color map (see
Default Color Map in WPG Defaults to see the WPG color map defaults). In these formats, the
data is packed so a byte represents one or more pixels as shown below. The uppermost bit(s)
specify the left-most pixel.
Bits
| 7
| 6
| 5
| 4
| 3
| 2
| 1
| 0
|
| Bits
| 7
| 6
| 5
| 4
| 3
| 2
| 1
| 0
|
|
Format 1
| Process 0 - 7
| Format 3
| Process 0
| Process 1
|
|
Format 2
| P0
| P1
| P2
| P3
|
| Format 4
| Process 0
|
P=Pixel |
The remaining formats specify the gray level or color directly.
Format 12
| 7
| 6
| 5
| 4
| 3
| 2
| 1
| 0
|
Gray Scale |
Format 5
| 15
| 14
| 13
| 12
| 11
| 10
| 9
| 8
| 7
| 6
| 5
| 4
| 3
| 2
| 1
| 0
|
Gray Scale
| |
Format 6
| 15
| 14
| 13
| 12
| 11
| 10
| 9
| 8
| 7
| 6
| 5
| 4
| 3
| 2
| 1
| 0
|
Red
| Green
| Blue |
Format 7
| 15
| 14
| 13
| 12
| 11
| 10
| 9
| 8
| 7
| 6
| 5
| 4
| 3
| 2
| 1
| 0
|
Trans
| Blue
| Green
| Red |
Format 8
| 23
| 22
| 21
| 20
| 19
| 18
| 17
| 16
| 15
| 14
| 13
| 12
| 11
| 10
| 9
| 8
| 7
| 6
| 5
| 4
| 3
| 2
| 1
| 0
|
Blue
| Green
| Red |
Format 9
|
31
| 30
| 29
| 28
| 27
| 26
| 25
| 24
| 23
| 22
| 21
| 20
| 19
| 18
| 17
| 16
| 15
| 14
| 13
| 12
| 11
| 10
| 9
| 8
| 7
| 6
| 5
| 4
| 3
| 2
| 1
| 0
|
Transparency
| Blue
| Green
| Red |
Format 10
| 63...48
| 47...32
| 31...15
| 15...0
|
| Blue
| Green
| Red |
Format 11
| 63...48
| 47...32
| 31...15
| 15...0
|
Transpar
| Blue
| Green
| Red |
Bits 0-7 correspond to the first byte in a byte buffer, bits 8-15 to the second byte, and so on.
Bitmap Data Compression
The Bitmap record contains a data stream that defines bitmap image patterns. The data is in a
compressed format that is a form of run length encoding. The encoded data is a series of
encoding packets consisting of a one-byte instruction followed by zero or more bytes of data.
Encoding packets begin and end on raster boundaries; that is, no run lengths extend across two or
more rasters. The eight encoding packet types are defined as follows.
Instruction:
| NRP
|
Value:
| 0ccc cccc
|
Data Length:
| n(c+1)
|
Data:
| Non-repeating Bitmap Data
|
Description:
| Displays a single instance of "n(c+1)" bytes of bitmap data where "n" is
the size of the bitmap sample data unit (usually the number of bytes per
pixel) and c is the count given in the instruction. |
Instruction:
| REP
|
Value:
| 1ccc cccc
|
Data Length:
| n
|
Data:
| Repeating Bitmap Data
|
Description:
| Displays a repeating pattern of bitmap data. The size of the pattern, n,
is defined by the Sample Data Size instruction. The number of times
this pattern is to be repeated is "c+1" where c is the count given in the
instruction. |
Instruction:
| DSZ
|
Value:
| 0111 1101
|
Data Length:
| 1
|
Data:
| Sample Data Size (n <= 8)
|
Description:
| Specifies the size of a unit of bitmap sample data. The value of the
sample data size is used in decoding the NRP, REP, BLK, and WHT
instructions. The sample size must be >= 1 and <= 8. |
Instruction:
| EXT
|
Value:
| 1111 1101
|
Data Length:
| 1
|
Data:
| Count
|
Description:
| Extends the current repeating bitmap data pattern (as defined in a
preceding REP instruction) "c+1" times. This instruction can only
follow a REP or another EXT instruction. |
Instruction:
| XOR
|
Value:
| 0111 1110
|
Data Length:
| 0
|
Data:
|
|
Description:
| Indicates that the subsequent compressed data is the result of the XOR
of the current and previous rasters. This instruction is used for adjacent
rasters with nearly identical data. |
Instruction:
| RST
|
Value:
| 1111 1110
|
Data Length:
| 1
|
Data:
| Count
|
Description:
| Repeats the previous raster "c+1" times. This instruction is used for
adjacent rasters with identical data. |
Instruction:
| BLK
|
Value:
| 0111 1111
|
Data Length:
| 1
|
Data:
| Count
|
Description:
| Repeats a 0x00 value "n(c+1)" times. This instruction is included to
support the XOR instruction. |
Instruction:
| WHT
|
Value:
| 1111 1111
|
Data Length:
| 1
|
Data:
| Count
|
Description:
| Repeats a 0xFF value "n(c+1)" times. This instruction is included
because of the prevalence of the color WHITE, represented by the
value 0xFF, in many bitmaps. |
Object_Image Formats
The Object_Image record supports the following formats. The supplementary data length value
is 0 for all Object_Image formats except the EPS format, which has a data length of 16 bytes
(assuming single precision). See Format Type 10 (0xA) following this table for the structure of
the EPS supplementary data area.
ID
| Format
| Description
|
0 (0x0)
|
| unknown
|
1 (0x1)
| WPG10
| WordPerfect Graphics 1.0 Format
|
2 (0x2)
| WPG20
| WordPerfect Graphics 2.x Format
|
3 (0x3)
|
| Reserved
|
4 (0x4)
|
| Reserved
|
5 (0x5)
|
| Reserved
|
6 (0x6)
| BMP
| Microsoft Windows 3.0 Bitmap
|
7 (0x7)
| CGM
| Computer Graphics Metafile
|
8 (0x8)
| DHP
| Dr. Halo PIC Format
|
9 (0x9)
| DXF
| AutoCad Format
|
10 (0xA)
| EPS
| Encapsulated PostScript
|
11 (0xB)
| GEM
| GEM Draw Format
|
12 (0xC)
| GIF
| CompuServe Graphics Interchange Format
|
13 (0xD)
| HPGL
| Hewlett-Packard Graphics Language
|
14 (0xE)
| IMG
| GEM Paint Format
|
15 (0xF)
| LL
| Lasergraphics Language Format
|
16 (0x10)
| MSP
| Microsoft Windows Paint Format
|
17 (0x11)
| NTIF
| NeXT TIFF Format
|
18 (0x12)
| OLE
| Microsoft Windows OLE Format
|
19 (0x13)
| PCX
| PC Paintbrush Format
|
20 (0x14)
| PIC
| Lotus 1-2-3 PIC Format
|
21 (0x15)
| PICT
| Macintosh Quickdraw Picture Format
|
22 (0x16)
| PMM
| Presentation Manager Metafile
|
23 (0x17)
| PNTG
| Macintosh MacPaint Format
|
24 (0x18)
| PPIC
| PC Paint Plus Format
|
25 (0x19)
| PS
| PostScript
|
26 (0x1A)
| SCODL
| Scan Conversion Object Description
|
27 (0x1B)
| SRAS
| Sun Raster Image Format
|
28 (0x1C)
| TARGA
| TrueVision TGA Format
|
29 (0x1D)
| TIFF
| Tagged Image File Format
|
30 (0x1E)
| VideoShow
| General Parametrics Enhanced NAPLPS
|
31 (0x1F)
| WMF
| Microsoft Windows Metafile
|
32 (0x20)
| XBMP
| X Windows Bitmap |
Format Type 10 (0xA)
EPS - Encapsulated PostScript
The following defines the structure of the supplementary data area of the Encapsulated PostScript
format.
Structure:
{Xll coordinate (lower left coordinate of bounding box)}
{Yll coordinate}
{Xur coordinate (upper right coordinate of bounding box)}
{Yur coordinate}
The field length may be double, based on data precision or Object ID. See Field Precision under
Record Structureearlier in this section for more detailed information.