~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to rtl/os2/pmbitmap.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{****************************************************************************
2
 
 
3
 
    $Id: pmbitmap.pas,v 1.4 2002/11/02 11:16:38 hajny Exp $
4
 
 
5
 
    This file is part of the Free Pascal run time library.
6
 
    Copyright (c) 1999-2002 by the Free Pascal development team.
7
 
    Copyright (c) 1999-2000 by Ramon Bosque
8
 
 
9
 
    Types and constants for bitmap images manipulation
10
 
    plus functions implemented in PMPIC.DLL.
11
 
 
12
 
    See the file COPYING.FPC, included in this distribution,
13
 
    for details about the copyright.
14
 
 
15
 
    This program is distributed in the hope that it will be useful,
16
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
 
 
19
 
 ****************************************************************************}
20
 
unit PMBitmap;
21
 
 
22
 
interface
23
 
 
24
 
{$PACKRECORDS 1}
25
 
 
26
 
type    TBitmapInfoHeader=record
27
 
            cbFix:cardinal;
28
 
            cx:word;
29
 
            cy:word;
30
 
            cPlanes:word;
31
 
            cBitCount:word;
32
 
        end;
33
 
        PBitmapInfoHeader=^TBitmapInfoHeader;
34
 
        BitmapInfoHeader=TBitmapInfoHeader;
35
 
 
36
 
        TRgb=record
37
 
            bBlue,
38
 
            bGreen,
39
 
            bRed:byte;
40
 
        end;
41
 
        PRgb=^TRgb;
42
 
        Rgb=TRgb;
43
 
 
44
 
        TBitmapInfo=record
45
 
            cbFix:cardinal;
46
 
            cx:word;
47
 
            cy:word;
48
 
            cPlanes:word;
49
 
            cBitCount:word;
50
 
            aRgbColor:array[0..0] of TRgb;
51
 
        end;
52
 
        PBitmapInfo=^TBitmapInfo;
53
 
        BitmapInfo=TBitmapInfo;
54
 
 
55
 
        TBitmapInfoHeader2=record
56
 
            cbFix:cardinal;         { Length of structure }
57
 
            cx:cardinal;            { Bitmap width in pels }
58
 
            cy:cardinal;            { Bitmap height in pels }
59
 
            cPlanes:word;           { Number of bit planes }
60
 
            cBitCount:word;         { Number of bits per pel within a plane }
61
 
            ulCompression:cardinal; { Compression scheme used
62
 
                                      to store the bitmap }
63
 
            cbImage:cardinal;       { Length of bitmap storage data in bytes }
64
 
            cxResolution:cardinal;  { X resolution of target device }
65
 
            cyResolution:cardinal;  { Y resolution of target device }
66
 
            cClrUsed:cardinal;      { Number of color indices used }
67
 
            cClrImportant:cardinal; { Number of important color indices }
68
 
            usUnits:word;           { Units of measure }
69
 
            usReserved:word;
70
 
            usRecording:word;       { Recording algorithm }
71
 
            usRendering:word;       { Halftoning algorithm }
72
 
            cSize1:cardinal;        { Size value 1 }
73
 
            cSize2:cardinal;        { Size value 2 }
74
 
            ulColorEncoding:cardinal;   { Color encoding }
75
 
            ulIdentifier:cardinal;  { Reserved for application use }
76
 
        end;
77
 
        PBitmapInfoHeader2=^TBitmapInfoHeader2;
78
 
        BitmapInfoHeader2=TBitmapInfoHeader2;
79
 
 
80
 
        TRgb2=record
81
 
            bBlue,
82
 
            bGreen,
83
 
            bRed,
84
 
            fcOptions:byte; { Reserved, must be zero }
85
 
        end;
86
 
        PRgb2=^TRgb2;
87
 
        Rgb2=TRgb2;
88
 
 
89
 
        TBitmapInfo2=record
90
 
            cbFix:cardinal;
91
 
            cx:cardinal;
92
 
            cy:cardinal;
93
 
            cPlanes:word;
94
 
            cBitCount:word;
95
 
            ulCompression:cardinal;
96
 
            cbImage:cardinal;
97
 
            cxResolution:cardinal;
98
 
            cyResolution:cardinal;
99
 
            cClrUsed:cardinal;
100
 
            cClrImportant:cardinal;
101
 
            usUnits:word;
102
 
            usReserved:word;
103
 
            usRecording:word;
104
 
            usRendering:word;
105
 
            cSize1:cardinal;
106
 
            cSize2:cardinal;
107
 
            ulColorEncoding:cardinal;
108
 
            ulIdentifier:cardinal;
109
 
            aRgbColor:array[0..0] of TRgb2;
110
 
        end;
111
 
        PBitmapInfo2=^TBitmapInfo2;
112
 
        BitmapInfo2=TBitmapInfo2;
113
 
 
114
 
        TBitmapFileHeader=record
115
 
            usType:word;
116
 
            cbSize:cardinal;
117
 
            xHotspot:integer;
118
 
            yHotspot:integer;
119
 
            offBits:cardinal;
120
 
            bmp:TBitmapInfoHeader;
121
 
        end;
122
 
        PBitmapFileHeader=^TBitmapFileHeader;
123
 
        BitmapFileHeader=TBitmapFileHeader;
124
 
 
125
 
        TBitmapArrayFileHeader=record
126
 
            usType:word;
127
 
            cbSize:cardinal;
128
 
            offNext:cardinal;
129
 
            cxDisplay:word;
130
 
            cyDisplay:word;
131
 
            bfh:TBitmapFileHeader;
132
 
        end;
133
 
        PBitmapArrayFileHeader=^TBitmapArrayFileHeader;
134
 
        BitmapArrayFileHeader=TBitmapArrayFileHeader;
135
 
 
136
 
        TBitmapFileHeader2=record
137
 
            usType:word;
138
 
            cbSize:cardinal;
139
 
            xHotspot:integer;
140
 
            yHotspot:integer;
141
 
            offBits:cardinal;
142
 
            bmp2:TBitmapInfoHeader2;
143
 
        end;
144
 
        PBitmapFileHeader2=^TBitmapFileHeader2;
145
 
        BitmapFileHeader2=TBitmapFileHeader2;
146
 
 
147
 
        TBitmapArrayFileHeader2=record
148
 
            usType:word;
149
 
            cbSize:cardinal;
150
 
            offNext:cardinal;
151
 
            cxDisplay:word;
152
 
            cyDisplay:word;
153
 
            bfh2:TBitmapFileHeader2;
154
 
        end;
155
 
        PBitmapArrayFileHeader2=^TBitmapArrayFileHeader2;
156
 
        BitmapArrayFileHeader2=TBitmapArrayFileHeader2;
157
 
 
158
 
{ Constants for compression/decompression command }
159
 
const   CBD_COMPRESSION         =       1;
160
 
        CBD_DECOMPRESSION       =       2;
161
 
        CBD_BITS                =       0;
162
 
        
163
 
{ Flags for compression/decompression option }
164
 
        CBD_COLOR_CONVERSION    =$0000001;
165
 
        
166
 
{ Compression scheme in the ulCompression field of the bitmapinfo structure }
167
 
        BCA_UNCOMP              =       0;
168
 
        BCA_HUFFMAN1D           =       3;
169
 
        BCA_RLE4                =       2;
170
 
        BCA_RLE8                =       1;
171
 
        BCA_RLE24               =       4;
172
 
 
173
 
        BRU_METRIC              =       0;
174
 
 
175
 
        BRA_BOTTOMUP            =       0;
176
 
 
177
 
        BRH_NOTHALFTONED        =       0;
178
 
        BRH_ERRORDIFFUSION      =       1;
179
 
        BRH_PANDA               =       2;
180
 
        BRH_SUPERCIRCLE         =       3;
181
 
 
182
 
        BCE_PALETTE             =      -1;
183
 
        BCE_RGB                 =       0;
184
 
 
185
 
{ Values identifying bitmap types used in usType field
186
 
  of BITMAPFILEHEADER(2) and BITMAPARRAYFILEHEADER(2).
187
 
  (BFT_ => Bitmap File Type) }
188
 
        BFT_ICON                =   $4349;
189
 
        BFT_BMAP                =   $4d42;
190
 
        BFT_POINTER             =   $5450;
191
 
        BFT_COLORICON           =   $4943;
192
 
        BFT_COLORPOINTER        =   $5043;
193
 
        BFT_BITMAPARRAY         =   $4142;
194
 
 
195
 
{ type of picture to print }
196
 
const   PIP_MF       = 1;
197
 
        PIP_PIF      = 2;
198
 
 
199
 
{ type of conversion required }
200
 
        PIC_PIFTOMET = 0;
201
 
        PIC_SSTOFONT = 2;
202
 
 
203
 
function PicPrint (ahab: longint; var pszFilename: PChar; lType: longint;
204
 
                                        var pszParams: PChar): Longbool; cdecl;
205
 
 
206
 
function PicIchg (ahab: longint; var pszFilename1, pszFilename2: PChar;
207
 
                                              lType: longint): Longbool; cdecl;
208
 
 
209
 
    
210
 
implementation
211
 
 
212
 
function PicPrint (ahab: longint; var pszFilename: PChar; lType: longint;
213
 
             var pszParams: PChar): Longbool; cdecl; external 'PMPIC' index 11;
214
 
                  
215
 
function PicIchg (ahab: longint; var pszFilename1, pszFilename2: PChar;
216
 
                   lType: longint): Longbool; cdecl; external 'PMPIC' index 12;
217
 
 
218
 
end.
219
 
{
220
 
  $Log: pmbitmap.pas,v $
221
 
  Revision 1.4  2002/11/02 11:16:38  hajny
222
 
    + PMPIC.DLL functions added
223
 
 
224
 
  Revision 1.3  2002/09/07 16:01:25  peter
225
 
    * old logs removed and tabs fixed
226
 
 
227
 
}