mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-24 18:42:53 +02:00
fixed parsing of with do try finally end
git-svn-id: trunk@4347 -
This commit is contained in:
parent
73abeb7bda
commit
5f79f11b3d
@ -2080,7 +2080,7 @@ begin
|
||||
if BlockStatementStartKeyWordFuncList.DoItUppercase(UpperSrc,CurPos.StartPos,
|
||||
CurPos.EndPos-CurPos.StartPos) then
|
||||
begin
|
||||
if not ReadTilBlockEnd(ExceptionOnError,CreateNodes) then exit;
|
||||
if not ReadTilBlockEnd(false,CreateNodes) then exit;
|
||||
ReadNextAtom;
|
||||
if CurPos.Flag<>cafSemicolon then UndoReadNextAtom;
|
||||
end else if UpAtomIs('WITH') then begin
|
||||
|
@ -659,6 +659,7 @@ type
|
||||
procedure FreeHandle; override;
|
||||
function ReleaseHandle: HBITMAP;
|
||||
function IsEmpty: boolean;
|
||||
function GetPixelFormat: TPixelFormat;
|
||||
public
|
||||
FDIB: TDIBSection;
|
||||
destructor Destroy; override;
|
||||
@ -1030,6 +1031,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.74 2003/06/30 17:25:26 mattias
|
||||
fixed parsing of with do try finally end
|
||||
|
||||
Revision 1.73 2003/06/30 16:31:04 mattias
|
||||
fixed find declaration of with A,B do C; statements
|
||||
|
||||
|
@ -165,22 +165,7 @@ end;
|
||||
|
||||
procedure TBitmap.UpdatePixelFormat;
|
||||
begin
|
||||
FPixelFormat := pfCustom;
|
||||
if HandleType = bmDDB then
|
||||
FPixelFormat := pfDevice
|
||||
else
|
||||
with FImage.FDIB, dsbmih do
|
||||
case biBitCount of
|
||||
1: FPixelFormat := pf1Bit;
|
||||
4: FPixelFormat := pf4Bit;
|
||||
8: FPixelFormat := pf8Bit;
|
||||
16: case biCompression of
|
||||
BI_RGB : FPixelFormat := pf15Bit;
|
||||
BI_BITFIELDS: if dsBitFields[1] = $7E0 then FPixelFormat := pf16Bit;
|
||||
end;
|
||||
24: FPixelFormat := pf24Bit;
|
||||
32: if biCompression = BI_RGB then FPixelFormat := pf32Bit;
|
||||
end;
|
||||
FPixelFormat := FImage.GetPixelFormat;
|
||||
end;
|
||||
|
||||
procedure TBitmap.Changed(Sender: TObject);
|
||||
@ -731,6 +716,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.36 2003/06/30 17:25:26 mattias
|
||||
fixed parsing of with do try finally end
|
||||
|
||||
Revision 1.35 2003/06/30 16:31:04 mattias
|
||||
fixed find declaration of with A,B do C; statements
|
||||
|
||||
|
@ -90,5 +90,26 @@ begin
|
||||
Result := (FHandle = 0) and (FDIBHandle = 0);
|
||||
end;
|
||||
|
||||
function TBitmapImage.GetPixelFormat: TPixelFormat;
|
||||
begin
|
||||
Result:=pfCustom;
|
||||
if GetHandleType = bmDDB then
|
||||
Result := pfDevice
|
||||
else
|
||||
case FDIB.dsBmih.biBitCount of
|
||||
1: Result := pf1Bit;
|
||||
4: Result := pf4Bit;
|
||||
8: Result := pf8Bit;
|
||||
16: case FDIB.dsBmih.biCompression of
|
||||
BI_RGB : Result := pf15Bit;
|
||||
BI_BITFIELDS: if FDIB.dsBitFields[1] = $7E0 then
|
||||
Result := pf16Bit;
|
||||
end;
|
||||
24: Result := pf24Bit;
|
||||
32: if FDIB.dsBmih.biCompression = BI_RGB then
|
||||
Result := pf32Bit;
|
||||
end;
|
||||
end;
|
||||
|
||||
// included by graphics.pp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user