Ignore:
Timestamp:
Apr 9, 2015, 9:58:36 PM (9 years ago)
Author:
chronos
Message:
  • Fixed: Use csOpaque control style also to Image, PaintBox and OpenGLControl.
  • Modified: Change size of test frame with SpinEdits as delayed using timer.
  • Updated: BRGABitmap package to version 8.1.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/Packages/bgrabitmap/bgracompressablebitmap.pas

    r452 r472  
    4444     procedure Decompress;
    4545     procedure FreeData;
     46     procedure Init;
    4647   public
    4748     CompressionLevel: Tcompressionlevel;
     
    6263     property Width : Integer read FWidth;
    6364     property Height: Integer read FHeight;
    64      property Caption : string read FCaption;
     65     property Caption : string read FCaption write FCaption;
    6566
    6667   end;
     
    7778constructor TBGRACompressableBitmap.Create;
    7879begin
    79   FUncompressedData := nil;
    80   FCompressedDataArray := nil;
    81   FWidth := 0;
    82   FHeight := 0;
    83   FCaption := '';
    84   FCompressionProgress := 0;
    85   CompressionLevel := clfastest;
     80  Init;
    8681end;
    8782
    8883constructor TBGRACompressableBitmap.Create(Source: TBGRABitmap);
    8984begin
    90   FUncompressedData := nil;
    91   FCompressedDataArray := nil;
    92   FWidth := 0;
    93   FHeight := 0;
    94   FCaption := '';
    95   FCompressionProgress := 0;
     85  Init;
    9686  Assign(Source);
    9787end;
     
    219209  setlength(FCaption,WinReadLongint(AStream));
    220210  AStream.Read(FCaption[1],length(FCaption));
    221   if (FWidth=0) or (FHeight = 0) then exit;
     211  if (FWidth=0) or (FHeight = 0) then
     212  begin
     213    FUncompressedData := TMemoryStream.Create;
     214    exit;
     215  end;
    222216
    223217  FBounds.Left := WinReadLongint(AStream);
     
    234228    FCompressedDataArray[i].CopyFrom(AStream,size);
    235229  end;
     230
     231  if FCompressedDataArray = nil then
     232    FUncompressedData := TMemoryStream.Create;
    236233end;
    237234
     
    270267end;
    271268
     269procedure TBGRACompressableBitmap.Init;
     270begin
     271  FUncompressedData := nil;
     272  FCompressedDataArray := nil;
     273  FWidth := 0;
     274  FHeight := 0;
     275  FCaption := '';
     276  FCompressionProgress := 0;
     277  CompressionLevel := clfastest;
     278end;
     279
    272280{ Copy a bitmap into this object. As it is copied, you need not
    273281  keep a copy of the source }
Note: See TracChangeset for help on using the changeset viewer.