mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 17:29:33 +02:00
+ PMPIC.DLL functions added
This commit is contained in:
parent
f5c567928d
commit
088d2f8665
@ -2,37 +2,22 @@
|
|||||||
|
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
Copyright (c) 1999-2000 by Florian Klaempfl
|
This file is part of the Free Pascal run time library.
|
||||||
Copyright (c) 1999-2000 by Ramon Bosque
|
Copyright (c) 1999-2002 by the Free Pascal development team.
|
||||||
|
Copyright (c) 1999-2000 by Ramon Bosque
|
||||||
|
|
||||||
The Free Pascal runtime library is distributed under the Library GNU Public
|
Types and constants for bitmap images manipulation
|
||||||
License v2. So is this unit. The Library GNU Public License requires you to
|
plus functions implemented in PMPIC.DLL.
|
||||||
distribute the source code of this unit with any product that uses it.
|
|
||||||
Because the EMX library isn't under the LGPL, we grant you an exception to
|
|
||||||
this, and that is, when you compile a program with the Free Pascal compiler,
|
|
||||||
you do not need to ship source code with that program, AS LONG AS YOU ARE
|
|
||||||
USING UNMODIFIED CODE! If you modify this code, you MUST change the next
|
|
||||||
line:
|
|
||||||
|
|
||||||
<This an official, unmodified Free Pascal source code file.>
|
See the file COPYING.FPC, included in this distribution,
|
||||||
|
for details about the copyright.
|
||||||
|
|
||||||
Send us your modified files, we can work together if you want!
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
Free Pascal is distributed in the hope that it will be useful,
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
Library GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the Library GNU General Public License
|
|
||||||
along with Free Pascal; see the file COPYING.LIB. If not, write to
|
|
||||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
unit pmbitmap;
|
unit PMBitmap;
|
||||||
|
|
||||||
{Warning: This code is alfa. Future versions of this unit will propably
|
|
||||||
not be compatible.}
|
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
@ -62,31 +47,32 @@ type TBitmapInfoHeader=record
|
|||||||
cy:word;
|
cy:word;
|
||||||
cPlanes:word;
|
cPlanes:word;
|
||||||
cBitCount:word;
|
cBitCount:word;
|
||||||
aRgbColor:array[0..1-1] of TRgb;
|
aRgbColor:array[0..0] of TRgb;
|
||||||
end;
|
end;
|
||||||
PBitmapInfo=^TBitmapInfo;
|
PBitmapInfo=^TBitmapInfo;
|
||||||
BitmapInfo=TBitmapInfo;
|
BitmapInfo=TBitmapInfo;
|
||||||
|
|
||||||
TBitmapInfoHeader2=record
|
TBitmapInfoHeader2=record
|
||||||
cbFix:cardinal;
|
cbFix:cardinal; { Length of structure }
|
||||||
cx:cardinal;
|
cx:cardinal; { Bitmap width in pels }
|
||||||
cy:cardinal;
|
cy:cardinal; { Bitmap height in pels }
|
||||||
cPlanes:word;
|
cPlanes:word; { Number of bit planes }
|
||||||
cBitCount:word;
|
cBitCount:word; { Number of bits per pel within a plane }
|
||||||
ulCompression:cardinal;
|
ulCompression:cardinal; { Compression scheme used
|
||||||
cbImage:cardinal;
|
to store the bitmap }
|
||||||
cxResolution:cardinal;
|
cbImage:cardinal; { Length of bitmap storage data in bytes }
|
||||||
cyResolution:cardinal;
|
cxResolution:cardinal; { X resolution of target device }
|
||||||
cClrUsed:cardinal;
|
cyResolution:cardinal; { Y resolution of target device }
|
||||||
cClrImportant:cardinal;
|
cClrUsed:cardinal; { Number of color indices used }
|
||||||
usUnits:word;
|
cClrImportant:cardinal; { Number of important color indices }
|
||||||
|
usUnits:word; { Units of measure }
|
||||||
usReserved:word;
|
usReserved:word;
|
||||||
usRecording:word;
|
usRecording:word; { Recording algorithm }
|
||||||
usRendering:word;
|
usRendering:word; { Halftoning algorithm }
|
||||||
cSize1:cardinal;
|
cSize1:cardinal; { Size value 1 }
|
||||||
cSize2:cardinal;
|
cSize2:cardinal; { Size value 2 }
|
||||||
ulColorEncoding:cardinal;
|
ulColorEncoding:cardinal; { Color encoding }
|
||||||
ulIdentifier:cardinal;
|
ulIdentifier:cardinal; { Reserved for application use }
|
||||||
end;
|
end;
|
||||||
PBitmapInfoHeader2=^TBitmapInfoHeader2;
|
PBitmapInfoHeader2=^TBitmapInfoHeader2;
|
||||||
BitmapInfoHeader2=TBitmapInfoHeader2;
|
BitmapInfoHeader2=TBitmapInfoHeader2;
|
||||||
@ -95,7 +81,7 @@ type TBitmapInfoHeader=record
|
|||||||
bBlue,
|
bBlue,
|
||||||
bGreen,
|
bGreen,
|
||||||
bRed,
|
bRed,
|
||||||
fcOptions:byte;
|
fcOptions:byte; { Reserved, must be zero }
|
||||||
end;
|
end;
|
||||||
PRgb2=^TRgb2;
|
PRgb2=^TRgb2;
|
||||||
Rgb2=TRgb2;
|
Rgb2=TRgb2;
|
||||||
@ -120,7 +106,7 @@ type TBitmapInfoHeader=record
|
|||||||
cSize2:cardinal;
|
cSize2:cardinal;
|
||||||
ulColorEncoding:cardinal;
|
ulColorEncoding:cardinal;
|
||||||
ulIdentifier:cardinal;
|
ulIdentifier:cardinal;
|
||||||
aRgbColor:array[0..1-1] of TRgb2;
|
aRgbColor:array[0..0] of TRgb2;
|
||||||
end;
|
end;
|
||||||
PBitmapInfo2=^TBitmapInfo2;
|
PBitmapInfo2=^TBitmapInfo2;
|
||||||
BitmapInfo2=TBitmapInfo2;
|
BitmapInfo2=TBitmapInfo2;
|
||||||
@ -169,24 +155,36 @@ type TBitmapInfoHeader=record
|
|||||||
PBitmapArrayFileHeader2=^TBitmapArrayFileHeader2;
|
PBitmapArrayFileHeader2=^TBitmapArrayFileHeader2;
|
||||||
BitmapArrayFileHeader2=TBitmapArrayFileHeader2;
|
BitmapArrayFileHeader2=TBitmapArrayFileHeader2;
|
||||||
|
|
||||||
|
{ Constants for compression/decompression command }
|
||||||
const CBD_COMPRESSION = 1;
|
const CBD_COMPRESSION = 1;
|
||||||
CBD_DECOMPRESSION = 2;
|
CBD_DECOMPRESSION = 2;
|
||||||
CBD_BITS = 0;
|
CBD_BITS = 0;
|
||||||
|
|
||||||
|
{ Flags for compression/decompression option }
|
||||||
CBD_COLOR_CONVERSION =$0000001;
|
CBD_COLOR_CONVERSION =$0000001;
|
||||||
|
|
||||||
|
{ Compression scheme in the ulCompression field of the bitmapinfo structure }
|
||||||
BCA_UNCOMP = 0;
|
BCA_UNCOMP = 0;
|
||||||
BCA_HUFFMAN1D = 3;
|
BCA_HUFFMAN1D = 3;
|
||||||
BCA_RLE4 = 2;
|
BCA_RLE4 = 2;
|
||||||
BCA_RLE8 = 1;
|
BCA_RLE8 = 1;
|
||||||
BCA_RLE24 = 4;
|
BCA_RLE24 = 4;
|
||||||
|
|
||||||
BRU_METRIC = 0;
|
BRU_METRIC = 0;
|
||||||
|
|
||||||
BRA_BOTTOMUP = 0;
|
BRA_BOTTOMUP = 0;
|
||||||
|
|
||||||
BRH_NOTHALFTONED = 0;
|
BRH_NOTHALFTONED = 0;
|
||||||
BRH_ERRORDIFFUSION = 1;
|
BRH_ERRORDIFFUSION = 1;
|
||||||
BRH_PANDA = 2;
|
BRH_PANDA = 2;
|
||||||
BRH_SUPERCIRCLE = 3;
|
BRH_SUPERCIRCLE = 3;
|
||||||
BCE_PALETTE = (-1);
|
|
||||||
|
BCE_PALETTE = -1;
|
||||||
BCE_RGB = 0;
|
BCE_RGB = 0;
|
||||||
|
|
||||||
|
{ Values identifying bitmap types used in usType field
|
||||||
|
of BITMAPFILEHEADER(2) and BITMAPARRAYFILEHEADER(2).
|
||||||
|
(BFT_ => Bitmap File Type) }
|
||||||
BFT_ICON = $4349;
|
BFT_ICON = $4349;
|
||||||
BFT_BMAP = $4d42;
|
BFT_BMAP = $4d42;
|
||||||
BFT_POINTER = $5450;
|
BFT_POINTER = $5450;
|
||||||
@ -194,13 +192,36 @@ const CBD_COMPRESSION = 1;
|
|||||||
BFT_COLORPOINTER = $5043;
|
BFT_COLORPOINTER = $5043;
|
||||||
BFT_BITMAPARRAY = $4142;
|
BFT_BITMAPARRAY = $4142;
|
||||||
|
|
||||||
|
{ type of picture to print }
|
||||||
|
const PIP_MF = 1;
|
||||||
|
PIP_PIF = 2;
|
||||||
|
|
||||||
|
{ type of conversion required }
|
||||||
|
PIC_PIFTOMET = 0;
|
||||||
|
PIC_SSTOFONT = 2;
|
||||||
|
|
||||||
|
function PicPrint (ahab: longint; var pszFilename: PChar; lType: longint;
|
||||||
|
var pszParams: PChar): Longbool; cdecl;
|
||||||
|
|
||||||
|
function PicIchg (ahab: longint; var pszFilename1, pszFilename2: PChar;
|
||||||
|
lType: longint): Longbool; cdecl;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
function PicPrint (ahab: longint; var pszFilename: PChar; lType: longint;
|
||||||
|
var pszParams: PChar): Longbool; cdecl; external 'PMPIC' index 11;
|
||||||
|
|
||||||
|
function PicIchg (ahab: longint; var pszFilename1, pszFilename2: PChar;
|
||||||
|
lType: longint): Longbool; cdecl; external 'PMPIC' index 12;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 2002-09-07 16:01:25 peter
|
Revision 1.4 2002-11-02 11:16:38 hajny
|
||||||
|
+ PMPIC.DLL functions added
|
||||||
|
|
||||||
|
Revision 1.3 2002/09/07 16:01:25 peter
|
||||||
* old logs removed and tabs fixed
|
* old logs removed and tabs fixed
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user