Fully rewritten for Lazarus. Has no backward compatibility with Delphi XE4 now. Now it can be compiled for Windows/Linux/MacOSX.
This commit is contained in:
80
uscanresult.pas
Normal file
80
uscanresult.pas
Normal file
@@ -0,0 +1,80 @@
|
||||
unit uscanresult;
|
||||
|
||||
interface
|
||||
|
||||
uses fgl;
|
||||
|
||||
type
|
||||
TTimInfo = record
|
||||
Position: Integer;
|
||||
Size: Integer;
|
||||
Width: Integer;
|
||||
Height: Integer;
|
||||
BitMode: Byte;
|
||||
Cluts: Integer;
|
||||
Good: Boolean;
|
||||
end;
|
||||
|
||||
type
|
||||
TScanResult = class(TObject)
|
||||
private
|
||||
pScanFile: string;
|
||||
pIsImage: Boolean;
|
||||
pCount: Integer;
|
||||
pTims: array of TTimInfo;
|
||||
|
||||
procedure fSetCount(Value: Integer);
|
||||
|
||||
function fGetTim(Index: Integer): TTimInfo;
|
||||
procedure fSetTim(Index: Integer; Value: TTimInfo);
|
||||
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
|
||||
property ScanFile: string read pScanFile write pScanFile;
|
||||
property IsImage: Boolean read pIsImage write pIsImage;
|
||||
property Count: Integer read pCount write fSetCount;
|
||||
|
||||
property ScanTim[index: Integer]: TTimInfo read fGetTim write fSetTim;
|
||||
end;
|
||||
TScanResultList = specialize TFPGObjectList<TScanResult>;
|
||||
|
||||
implementation
|
||||
|
||||
{ TScanResult }
|
||||
|
||||
constructor TScanResult.Create;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
pScanFile := '';
|
||||
pIsImage := False;
|
||||
pCount := 0;
|
||||
pTims := nil;
|
||||
end;
|
||||
|
||||
destructor TScanResult.Destroy;
|
||||
begin
|
||||
SetLength(pTims, 0);
|
||||
pTims := nil;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TScanResult.fGetTim(Index: Integer): TTimInfo;
|
||||
begin
|
||||
Result := pTims[Index];
|
||||
end;
|
||||
|
||||
procedure TScanResult.fSetCount(Value: Integer);
|
||||
begin
|
||||
pCount := Value;
|
||||
SetLength(pTims, Value);
|
||||
end;
|
||||
|
||||
procedure TScanResult.fSetTim(Index: Integer; Value: TTimInfo);
|
||||
begin
|
||||
pTims[Index] := Value;
|
||||
end;
|
||||
|
||||
end.
|
||||
Reference in New Issue
Block a user