Changeset 459 for GraphicTest/Methods/UBitmapRawImageDataPaintBox.pas
- Timestamp:
- Nov 28, 2012, 8:09:38 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/Methods/UBitmapRawImageDataPaintBox.pas
r452 r459 6 6 7 7 uses 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; 10 10 11 11 type … … 13 13 14 14 TBitmapRawImageDataPaintBox = class(TDrawMethodPaintBox) 15 TempBitmap: TBitmap; 15 16 constructor Create; override; 17 procedure Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override; 18 procedure Done; override; 16 19 procedure Paint(Sender: TObject); override; 17 20 procedure DrawFrame(FastBitmap: TFastBitmap); override; … … 28 31 Caption := 'TBitmap.RawImage.Data PaintBox'; 29 32 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.'); 35 end; 36 37 procedure TBitmapRawImageDataPaintBox.Init(Parent: TWinControl; Size: TPoint; 38 PixelFormat: TPixelFormat); 39 begin 40 inherited; 41 TempBitmap := TBitmap.Create; 42 TempBitmap.PixelFormat := PixelFormat; 43 TempBitmap.SetSize(Size.X, Size.Y); 44 end; 45 46 procedure TBitmapRawImageDataPaintBox.Done; 47 begin 48 FreeAndNil(TempBitmap); 49 inherited Done; 30 50 end; 31 51
Note:
See TracChangeset
for help on using the changeset viewer.