Ignore:
Timestamp:
Nov 28, 2012, 8:09:38 AM (12 years ago)
Author:
chronos
Message:
  • Added: Brief description for rest of available draw methods.
  • Added: Graphics32 method conditional compilation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/Methods/UBitmapRawImageDataPaintBox.pas

    r452 r459  
    66
    77uses
    8   Classes, SysUtils, UDrawMethod, UFastBitmap, Graphics, LCLType,
    9   FPimage, IntfGraphics, GraphType{$IFDEF windows}, Windows{$ENDIF};
     8  {$IFDEF windows}Windows,{$ENDIF}Classes, SysUtils, Controls, UDrawMethod, UFastBitmap, Graphics, LCLType,
     9  FPimage, IntfGraphics, GraphType;
    1010
    1111type
     
    1313
    1414  TBitmapRawImageDataPaintBox = class(TDrawMethodPaintBox)
     15    TempBitmap: TBitmap;
    1516    constructor Create; override;
     17    procedure Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override;
     18    procedure Done; override;
    1619    procedure Paint(Sender: TObject); override;
    1720    procedure DrawFrame(FastBitmap: TFastBitmap); override;
     
    2831  Caption := 'TBitmap.RawImage.Data PaintBox';
    2932  PaintObject := poPaintBox;
     33  Description.Add('Custom TFastBitmap data are converted to bitmap data compatible with screen. ' +
     34    'Then data is sent to PaintBox by Draw method.');
     35end;
     36
     37procedure TBitmapRawImageDataPaintBox.Init(Parent: TWinControl; Size: TPoint;
     38  PixelFormat: TPixelFormat);
     39begin
     40  inherited;
     41  TempBitmap := TBitmap.Create;
     42  TempBitmap.PixelFormat := PixelFormat;
     43  TempBitmap.SetSize(Size.X, Size.Y);
     44end;
     45
     46procedure TBitmapRawImageDataPaintBox.Done;
     47begin
     48  FreeAndNil(TempBitmap);
     49  inherited Done;
    3050end;
    3151
Note: See TracChangeset for help on using the changeset viewer.