mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-12 10:30:38 +01:00
* X,YPelsPerMeter properties. Kept old (not logical) default of 100 out of compatibility. Bug #29852
git-svn-id: trunk@33291 -
This commit is contained in:
parent
66608fec02
commit
02dbec2085
@ -62,6 +62,8 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
property XPelsPerMeter : integer read BFI.XPelsPerMeter;
|
||||||
|
property YPelsPerMeter : integer read BFI.YPelsPerMeter;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|||||||
@ -37,6 +37,8 @@ type
|
|||||||
BFH : TBitMapFileHeader;
|
BFH : TBitMapFileHeader;
|
||||||
BFI : TBitMapInfoHeader;
|
BFI : TBitMapInfoHeader;
|
||||||
Colinfo : array of TColorRGBA;
|
Colinfo : array of TColorRGBA;
|
||||||
|
fXPelsPerMeter,
|
||||||
|
fYPelsPerMeter : integer;
|
||||||
procedure SetColorSize (AValue : Byte);
|
procedure SetColorSize (AValue : Byte);
|
||||||
function GetColorSize : byte;
|
function GetColorSize : byte;
|
||||||
procedure SetBpp (const abpp : byte);
|
procedure SetBpp (const abpp : byte);
|
||||||
@ -54,6 +56,8 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
property BitsPerPixel : byte read FBpp write SetBpp;
|
property BitsPerPixel : byte read FBpp write SetBpp;
|
||||||
|
property XPelsPerMeter : integer read fXPelsPerMeter write fXPelsPerMeter;
|
||||||
|
property YPelsPerMeter : integer read fYPelsPerMeter write fYPelsPerMeter;
|
||||||
property RLECompress : boolean read FRleCompress write FRleCompress;
|
property RLECompress : boolean read FRleCompress write FRleCompress;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -86,6 +90,8 @@ end;
|
|||||||
constructor TFPWriterBMP.create;
|
constructor TFPWriterBMP.create;
|
||||||
begin
|
begin
|
||||||
inherited create;
|
inherited create;
|
||||||
|
fXPelsPerMeter:=100;
|
||||||
|
fYPelsPerMeter:=100;
|
||||||
FBpp:=24;
|
FBpp:=24;
|
||||||
FRleCompress:=false;
|
FRleCompress:=false;
|
||||||
end;
|
end;
|
||||||
@ -247,8 +253,8 @@ begin
|
|||||||
Planes:=1;
|
Planes:=1;
|
||||||
if FBpp=15 then BitCount:=16
|
if FBpp=15 then BitCount:=16
|
||||||
else BitCount:=FBpp;
|
else BitCount:=FBpp;
|
||||||
XPelsPerMeter:=100;
|
XPelsPerMeter:=fXPelsPerMeter;
|
||||||
YPelsPerMeter:=100;
|
YPelsPerMeter:=fYPelsPerMeter;
|
||||||
ClrImportant:=0;
|
ClrImportant:=0;
|
||||||
end;
|
end;
|
||||||
with BFH do
|
with BFH do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user