source: trunk/Sibyl/RTL/PMBITMAP.PAS@ 201

Last change on this file since 201 was 8, checked in by RBRi, 19 years ago

+ rest of sibyl stuff

  • Property svn:eol-style set to native
File size: 6.9 KB
Line 
1UNIT PMBitMap;
2
3
4INTERFACE
5
6USES Os2Def;
7
8{ bitmap parameterization used by GpiCreateBitmap and others }
9
10TYPE
11 PBITMAPINFOHEADER=^BITMAPINFOHEADER;
12 BITMAPINFOHEADER=RECORD
13 cbFix:ULONG;
14 cx:USHORT;
15 cy:USHORT;
16 cPlanes:USHORT;
17 cBitCount:USHORT;
18 END;
19
20 { RGB data for _BITMAPINFO struct }
21
22TYPE
23 PRGB=^RGB;
24 RGB=RECORD {pack 1}
25 bBlue:BYTE;
26 bGreen:BYTE;
27 bRed:BYTE;
28 END;
29
30 TRGBArray=ARRAY[0..0] OF RGB;
31
32 { bitmap data used by GpiSetBitmapBits and others }
33TYPE
34 PBITMAPINFO=^BITMAPINFO;
35 BITMAPINFO=RECORD
36 cbFix:ULONG;
37 cx:USHORT;
38 cy:USHORT;
39 cPlanes:USHORT;
40 cBitCount:USHORT;
41 argbColor:ARRAY[0..0] OF RGB;
42 END;
43
44 { Constants for compression/decompression command }
45CONST
46 CBD_COMPRESSION =1;
47 CBD_DECOMPRESSION =2;
48 CBD_BITS =0;
49
50 { Flags for compression/decompression option }
51
52 CBD_COLOR_CONVERSION=$00000001;
53
54 { Compression scheme in the ulCompression field of the bitmapinfo structure }
55CONST
56 BCA_UNCOMP =0;
57 BCA_HUFFMAN1D =3;
58 BCA_RLE4 =2;
59 BCA_RLE8 =1;
60 BCA_RLE24 =4;
61
62 BRU_METRIC =0;
63
64 BRA_BOTTOMUP =0;
65 BRH_NOTHALFTONED =0;
66 BRH_ERRORDIFFUSION =1;
67 BRH_PANDA =2;
68 BRH_SUPERCIRCLE =3;
69
70 BCE_PALETTE =-1;
71 BCE_RGB =0;
72
73TYPE
74 PBITMAPINFOHEADER2=^BITMAPINFOHEADER2;
75 BITMAPINFOHEADER2=RECORD
76 cbFix:ULONG; { Length of structure }
77 cx:ULONG; { Bit-map width in pels }
78 cy:ULONG; { Bit-map height in pels }
79 cPlanes:USHORT; { Number of bit planes }
80 cBitCount:USHORT;{ Number of bits per pel within
81 a plane }
82 ulCompression:ULONG;{ Compression scheme used to
83 store the bitmap }
84 cbImage:ULONG; { Length of bit-map storage data
85 in bytes}
86 cxResolution:ULONG;{x resolution of target device}
87 cyResolution:ULONG;{resolution of target device}
88 cclrUsed:ULONG; {Number of color indices used}
89 cclrImportant:ULONG;{ Number of important color indices }
90 usUnits:USHORT; { Units of measure }
91 usReserved:USHORT;
92 usRecording:USHORT; { Recording algorithm}
93 usRendering:USHORT; { Halftoning algorithm}
94 cSize1:ULONG; { Size value 1}
95 cSize2:ULONG; { Size value 2}
96 ulColorEncoding:ULONG; {Color encoding}
97 ulIdentifier:ULONG; {Reserved for application use}
98 END;
99
100TYPE
101 PRGB2=^RGB2;
102 RGB2=RECORD
103 bBlue:BYTE;
104 bGreen:BYTE;
105 bRed:BYTE;
106 fcOptions:BYTE; { Reserved, must be zero }
107 END;
108
109 TRGB2Array=ARRAY[0..0] OF RGB2;
110
111TYPE
112 PBITMAPINFO2=^BITMAPINFO2;
113 BITMAPINFO2=RECORD
114 cbFix:ULONG;
115 cx:ULONG;
116 cy:ULONG;
117 cPlanes:USHORT;
118 cBitCount:USHORT;
119 ulCompression:ULONG;
120 cbImage:ULONG;
121 cxResolution:ULONG;
122 cyResolution:ULONG;
123 cclrUsed:ULONG;
124 cclrImportant:ULONG;
125 usUnits:USHORT;
126 usReserved:USHORT;
127 usRecording:USHORT;
128 usRendering:USHORT;
129 cSize1:ULONG;
130 cSize2:ULONG;
131 ulColorEncoding:ULONG;
132 ulIdentifier:ULONG;
133 argbColor:ARRAY[0..0] OF RGB2;
134 END;
135
136TYPE
137 PBITMAPFILEHEADER=^BITMAPFILEHEADER;
138 BITMAPFILEHEADER=RECORD
139 usType:USHORT;
140 cbSize:ULONG;
141 xHotspot:SHORT;
142 yHotspot:SHORT;
143 offBits:ULONG;
144 bmp:BITMAPINFOHEADER;
145 END;
146
147TYPE
148 PBITMAPARRAYFILEHEADER=^BITMAPARRAYFILEHEADER;
149 BITMAPARRAYFILEHEADER=RECORD
150 usType:USHORT;
151 cbSize:ULONG;
152 offNext:ULONG;
153 cxDisplay:USHORT;
154 cyDisplay:USHORT;
155 bfh:BITMAPFILEHEADER;
156 END;
157
158TYPE
159 PBITMAPFILEHEADER2=^BITMAPFILEHEADER2;
160 BITMAPFILEHEADER2=RECORD
161 usType:USHORT;
162 cbSize:ULONG;
163 xHotspot:SHORT;
164 yHotspot:SHORT;
165 offBits:ULONG;
166 bmp2:BITMAPINFOHEADER2;
167 END;
168
169TYPE
170 PBITMAPARRAYFILEHEADER2=^BITMAPARRAYFILEHEADER2;
171 BITMAPARRAYFILEHEADER2=RECORD
172 usType:USHORT;
173 cbSize:ULONG;
174 offNext:ULONG;
175 cxDisplay:USHORT;
176 cyDisplay:USHORT;
177 bfh2:BITMAPFILEHEADER2;
178 END;
179
180{*************************************************************************
181 * These are the identifying values that go in the usType field of the *
182 * BITMAPFILEHEADER(2) and BITMAPARRAYFILEHEADER(2). *
183 * (BFT_ => Bit map File Type) *
184 *************************************************************************}
185CONST
186 BFT_ICON =$4349; { 'IC' }
187 BFT_BMAP =$4d42; { 'BM' }
188 BFT_POINTER =$5450; { 'PT' }
189 BFT_COLORICON =$4943; { 'CI' }
190 BFT_COLORPOINTER =$5043; { 'CP' }
191
192 BFT_BITMAPARRAY =$4142; { 'BA' }
193
194{ type of picture to print }
195CONST
196 PIP_MF =1;
197 PIP_PIF =2;
198
199{ type of conversion required }
200 PIC_PIFTOMET =0;
201 PIC_SSTOFONT =2;
202
203IMPORTS
204
205FUNCTION PicPrint(ahab:HAB;VAR pszFilename:PSZ;lType:LONG;VAR pszParams:PSZ):BOOL;
206 APIENTRY; 'PMPIC' index 11;
207FUNCTION PicIchg(ahab:HAB;VAR pszFilename1,pszFilename2:PSZ;lType:LONG):BOOL;
208 APIENTRY; 'PMPIC' index 12;
209
210END; {IMPORTS}
211
212IMPLEMENTATION
213
214
215BEGIN
216END.
Note: See TracBrowser for help on using the repository browser.